Skip to content

Commit

Permalink
Update bot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dimoschi authored May 1, 2024
1 parent 7367529 commit 3cdf525
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ async def get_member_or_user(self, guild: Guild, id_: int) -> Member | User | No
logger.warning(f"Unauthorized attempt to fetch member with id: {id_}", exc_info=exc)
except NotFound as exc:
logger.warning(f"Could not find guild member with id: {id_}", exc_info=exc)
try:
return await self.get_or_fetch_user(id_)
except Forbidden as exc:
logger.warning(f"Unauthorized attempt to fetch member with id: {id_}", exc_info=exc)
except NotFound as exc:
logger.warning(f"Could not find guild member with id: {id_}", exc_info=exc)
except HTTPException as exc:
logger.error(f"Discord error while fetching guild member with id: {id_}", exc_info=exc)
except HTTPException as exc:
logger.error(f"Discord error while fetching guild member with id: {id_}", exc_info=exc)
try:
Expand Down

0 comments on commit 3cdf525

Please sign in to comment.