From ca49aa7c98f261af83bf67ec2d055ccb620cf725 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Fri, 25 Jan 2019 16:37:50 +0800 Subject: [PATCH] Add default behavior while there is no `args_parser_func` --- nonebot/command/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nonebot/command/__init__.py b/nonebot/command/__init__.py index d5a7a42f..62779121 100644 --- a/nonebot/command/__init__.py +++ b/nonebot/command/__init__.py @@ -76,6 +76,9 @@ class Command: # fallback to command-level args_parser_func if self.args_parser_func: await self.args_parser_func(session) + elif session.current_key is not None: + # no args_parser_func, fallback to default behavior + await argfilter.run_arg_filters(session, []) await self.func(session) return True