mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-12-01 01:25:07 +08:00
Fix detail behavior
This commit is contained in:
parent
189cf23720
commit
0ecaa57230
@ -97,8 +97,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:
|
if session.current_key is not None and \
|
||||||
# no args_parser_func, fallback to default behavior
|
session.current_key not in session.state:
|
||||||
|
# args_parser_func didn't set state, here we set it
|
||||||
session.state[session.current_key] = session.current_arg
|
session.state[session.current_key] = session.current_arg
|
||||||
|
|
||||||
await self.func(session)
|
await self.func(session)
|
||||||
|
Loading…
Reference in New Issue
Block a user