Skip to content

Commit f541c76

Browse files
committed
fix: Only Checking First Sub Command
1 parent 2f7892c commit f541c76

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

discord/bot.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,12 @@ def _check_command(cmd: ApplicationCommand, match: Mapping[str, Any]) -> bool:
464464
match_ = find(
465465
lambda x: x["name"] == subcommand.name, match["options"]
466466
)
467-
if match_ is not None:
468-
return _check_command(subcommand, match_)
467+
if match_ is None:
468+
return False
469+
elif not _check_command(subcommand, match_):
470+
return False
471+
else:
472+
return True
469473
else:
470474
if cmd.parent is None:
471475
return _compare_defaults(

0 commit comments

Comments
 (0)