mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 07:28:10 +08:00
Add default behavior while there is no args_parser_func
This commit is contained in:
parent
128cb8ce29
commit
ca49aa7c98
@ -76,6 +76,9 @@ class Command:
|
|||||||
# fallback to command-level args_parser_func
|
# fallback to command-level args_parser_func
|
||||||
if self.args_parser_func:
|
if self.args_parser_func:
|
||||||
await self.args_parser_func(session)
|
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)
|
await self.func(session)
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user