From 27fdc01266ee9e9d6a5443692037b0ec40b85825 Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Tue, 14 Apr 2026 13:36:15 -0700 Subject: [PATCH 1/2] Add protection to logger for gif pfp --- techsupport_bot/functions/logger.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/techsupport_bot/functions/logger.py b/techsupport_bot/functions/logger.py index 6cb4aefa..6966d484 100644 --- a/techsupport_bot/functions/logger.py +++ b/techsupport_bot/functions/logger.py @@ -190,7 +190,10 @@ async def send_message( attachments = await build_attachments(bot, config, message) # Add avatar to attachments to all it to be added to the embed - attachments.insert(0, await author.display_avatar.to_file(filename="avatar.png")) + try: + attachments.insert(0, await author.display_avatar.to_file(filename="avatar.png")) + except discord.errors.HTTPException: + attachments.insert(0, await author.default_avatar.to_file(filename="avatar.png")) # Make and send the embed and files embed = await build_embed( From ad149fa3da536c3a581d6fb981be22fedbaba8fd Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Tue, 14 Apr 2026 13:38:16 -0700 Subject: [PATCH 2/2] Formatting --- techsupport_bot/functions/logger.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/techsupport_bot/functions/logger.py b/techsupport_bot/functions/logger.py index 6966d484..e9b4b8dd 100644 --- a/techsupport_bot/functions/logger.py +++ b/techsupport_bot/functions/logger.py @@ -191,9 +191,13 @@ async def send_message( # Add avatar to attachments to all it to be added to the embed try: - attachments.insert(0, await author.display_avatar.to_file(filename="avatar.png")) + attachments.insert( + 0, await author.display_avatar.to_file(filename="avatar.png") + ) except discord.errors.HTTPException: - attachments.insert(0, await author.default_avatar.to_file(filename="avatar.png")) + attachments.insert( + 0, await author.default_avatar.to_file(filename="avatar.png") + ) # Make and send the embed and files embed = await build_embed(