From af03188f8894fe98768f5e576944064317971b97 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Wed, 29 Dec 2021 22:23:35 +0800 Subject: [PATCH] :bug: fix on_command block cannot set --- nonebot/plugin/on.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nonebot/plugin/on.py b/nonebot/plugin/on.py index e9b56395..b0ab2377 100644 --- a/nonebot/plugin/on.py +++ b/nonebot/plugin/on.py @@ -391,8 +391,9 @@ def on_command( """ commands = set([cmd]) | (aliases or set()) + block = kwargs.pop("block", False) return on_message( - command(*commands) & rule, block=False, **kwargs, _depth=_depth + 1 + command(*commands) & rule, block=block, **kwargs, _depth=_depth + 1 )