Add default behavior while there is no args_parser_func

This commit is contained in:
Richard Chien 2019-01-25 16:37:50 +08:00
parent 128cb8ce29
commit ca49aa7c98

View File

@ -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