From 12b78834f651cf0e7111e5a30a5ea4d1c9e2e7ea Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Tue, 11 Jun 2024 11:57:07 -0400 Subject: [PATCH] Add a try/except to application fetch member --- techsupport_bot/commands/application.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/techsupport_bot/commands/application.py b/techsupport_bot/commands/application.py index a56e3e306..a687db178 100644 --- a/techsupport_bot/commands/application.py +++ b/techsupport_bot/commands/application.py @@ -900,7 +900,10 @@ async def execute(self: Self, config: munch.Munch, guild: discord.Guild) -> None # Update the database audit_log = [] for app in apps: - user = await guild.fetch_member(int(app.applicant_id)) + try: + user = await guild.fetch_member(int(app.applicant_id)) + except discord.NotFound: + user = None if not user: audit_log.append( f"Application by user: `{app.applicant_name}` was rejected because"