mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-19 17:58:26 +08:00
Fix bug of privileged command, so that fix #14
This commit is contained in:
parent
2e4c6d8535
commit
788aa62350
@ -413,6 +413,8 @@ async def handle_command(bot: NoneBot, ctx: Context_T) -> bool:
|
|||||||
"""
|
"""
|
||||||
cmd, current_arg = parse_command(bot, str(ctx['message']).lstrip())
|
cmd, current_arg = parse_command(bot, str(ctx['message']).lstrip())
|
||||||
is_privileged_cmd = cmd and cmd.privileged
|
is_privileged_cmd = cmd and cmd.privileged
|
||||||
|
if is_privileged_cmd and cmd.only_to_me and not ctx['to_me']:
|
||||||
|
is_privileged_cmd = False
|
||||||
disable_interaction = is_privileged_cmd
|
disable_interaction = is_privileged_cmd
|
||||||
|
|
||||||
if is_privileged_cmd:
|
if is_privileged_cmd:
|
||||||
|
Loading…
Reference in New Issue
Block a user