Skip to content

Commit

Permalink
fix: Catch discord.HTTPException instead of discord.Forbidden
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Jan 29, 2025
1 parent 7318dd5 commit 73be4b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hoyo_buddy/bot/error_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def get_error_embed(error: Exception, locale: discord.Locale) -> tuple[ErrorEmbe
if isinstance(error, AmbrDataNotFoundError | YattaDataNotFoundError | HakushinNotFoundError):
error = InvalidQueryError()

if isinstance(error, discord.Forbidden):
if isinstance(error, discord.HTTPException):
if error.code == 50013:
error = MissingPermissionsError()
elif error.code == 200000:
Expand Down

0 comments on commit 73be4b8

Please sign in to comment.