mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-19 17:58:26 +08:00
Fix command finding bug
This commit is contained in:
parent
637a9aa8c2
commit
68813f9698
@ -200,7 +200,8 @@ def _find_command(name: Union[str, CommandName_T]) -> Optional[Command]:
|
|||||||
return None
|
return None
|
||||||
cmd_tree = cmd_tree[part]
|
cmd_tree = cmd_tree[part]
|
||||||
|
|
||||||
return cmd_tree.get(cmd_name[-1])
|
cmd = cmd_tree.get(cmd_name[-1])
|
||||||
|
return cmd if isinstance(cmd, Command) else None
|
||||||
|
|
||||||
|
|
||||||
class _FurtherInteractionNeeded(Exception):
|
class _FurtherInteractionNeeded(Exception):
|
||||||
|
Loading…
Reference in New Issue
Block a user