Skip to content

Commit

Permalink
Update bot.py (#1235)
Browse files Browse the repository at this point in the history
`UserCommand` will get `AttributeError` when check `cmd.description_localizations`
  • Loading branch information
JC-Chung committed Apr 8, 2022
1 parent f2c09fb commit 3a4f0da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _check_command(cmd: ApplicationCommand, match: Dict) -> bool:
]:
# We have a difference
return True
elif getattr(cmd, check) != match.get(check):
elif getattr(cmd, check, None) != match.get(check):
# We have a difference
if check == "default_permission" and getattr(cmd, check) is True and match.get(check) is None:
# This is a special case
Expand Down

0 comments on commit 3a4f0da

Please sign in to comment.