Skip to content

Commit d6a6c62

Browse files
committed
fix: Refine exception handling in DM user method to remove NotFound case
1 parent bcea185 commit d6a6c62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hoyo_buddy/bot/bot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ async def dm_user(
290290
try:
291291
user = self.get_user(user_id) or await self.fetch_user(user_id)
292292
message = await user.send(content, **kwargs)
293-
except (discord.Forbidden, discord.NotFound) as e:
293+
except (discord.Forbidden) as e:
294294
logger.debug(f"Failed to DM user {user_id}: {e}")
295295
except Exception as e:
296296
self.capture_exception(e)

0 commit comments

Comments
 (0)