Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion techsupport_bot/functions/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,14 @@ 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(
Expand Down
Loading