From 788aa62350dbd84533cf635783f619fb6e538133 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Sat, 10 Nov 2018 22:25:04 +0800 Subject: [PATCH] Fix bug of privileged command, so that fix #14 --- none/command.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/none/command.py b/none/command.py index f2ebf824..b82f7868 100644 --- a/none/command.py +++ b/none/command.py @@ -413,6 +413,8 @@ async def handle_command(bot: NoneBot, ctx: Context_T) -> bool: """ cmd, current_arg = parse_command(bot, str(ctx['message']).lstrip()) 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 if is_privileged_cmd: