-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无权限用户尝试添加订阅时返回提示信息 #617
无权限用户尝试添加订阅时返回提示信息 #617
Conversation
👷 Deploy request for nonebot-bison pending review.Visit the deploys page to approve it
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #617 +/- ##
==========================================
+ Coverage 85.28% 85.46% +0.18%
==========================================
Files 91 91
Lines 4777 4796 +19
==========================================
+ Hits 4074 4099 +25
+ Misses 703 697 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
@no_permission_matcher.handle() | ||
async def send_no_permission(): | ||
await no_permission_matcher.finish("您没有权限进行此操作,请联系Bot所有者") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await no_permission_matcher.finish("您没有权限进行此操作,请联系Bot所有者") | |
await no_permission_matcher.finish("您没有权限进行此操作,请联系 Bot 管理员") |
@@ -108,10 +108,21 @@ async def do_dispatch_command( | |||
asyncio.create_task(new_matcher_ins.run(bot, event, state)) | |||
|
|||
|
|||
no_permission_matcher = on_command( | |||
"无权限", rule=configurable_to_me, aliases={"添加订阅", "删除订阅", "群管理"}, priority=8, block=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个无权限的命令会不会和其他的冲突,为什么不直接命名为添加订阅然后别名删除订阅/群管理?
#243