mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-28 08:41:29 +00:00
Fix command finding bug
This commit is contained in:
@ -164,7 +164,7 @@ def _find_command(name: Union[str, CommandName_T]) -> Optional[Command]:
|
||||
|
||||
cmd_tree = _registry
|
||||
for part in cmd_name[:-1]:
|
||||
if part not in cmd_tree:
|
||||
if part not in cmd_tree or not isinstance(cmd_tree[part], dict):
|
||||
return None
|
||||
cmd_tree = cmd_tree[part]
|
||||
|
||||
|
Reference in New Issue
Block a user