Fix command finding bug

This commit is contained in:
Richard Chien 2018-12-26 21:36:23 +08:00
parent 637a9aa8c2
commit 68813f9698

View File

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