Skip to content

Commit 3a4f0da

Browse files
authored
Update bot.py (#1235)
`UserCommand` will get `AttributeError` when check `cmd.description_localizations`
1 parent f2c09fb commit 3a4f0da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discord/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def _check_command(cmd: ApplicationCommand, match: Dict) -> bool:
287287
]:
288288
# We have a difference
289289
return True
290-
elif getattr(cmd, check) != match.get(check):
290+
elif getattr(cmd, check, None) != match.get(check):
291291
# We have a difference
292292
if check == "default_permission" and getattr(cmd, check) is True and match.get(check) is None:
293293
# This is a special case

0 commit comments

Comments
 (0)