From 5661b64c241ba3d57b7b0f08e1c9153f373de79c Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Mon, 2 Aug 2021 23:54:11 -0600 Subject: [PATCH] Fix duplicate image sending --- jarvis/cogs/modlog/message.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jarvis/cogs/modlog/message.py b/jarvis/cogs/modlog/message.py index 65dff42..a77613b 100644 --- a/jarvis/cogs/modlog/message.py +++ b/jarvis/cogs/modlog/message.py @@ -79,11 +79,11 @@ class ModlogMessageCog(commands.Cog): add_file = False if ( message.attachments - and "image" in message.attachments[0].content_type ): - embed.set_image(url=message.attachments[0].url) - elif message.attachments: - add_file = True + if "image" in message.attachments[0].content_type: + embed.set_image(url=message.attachments[0].url) + else: + add_file = True embed.set_author( name=message.author.name, icon_url=message.author.avatar_url,