From f6302f710c7b40cfeb002ac7dba0a0fdbd585150 Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Wed, 20 Feb 2019 14:33:29 +0300 Subject: [PATCH] setguildicon: make filename grabbing slightly more reliable --- cogs/mod.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cogs/mod.py b/cogs/mod.py index b7f6489..48b70d0 100644 --- a/cogs/mod.py +++ b/cogs/mod.py @@ -26,8 +26,9 @@ class Mod: log_channel = self.bot.get_channel(config.modlog_channel) log_msg = f"✏️ **Guild Icon Update**: {ctx.author} "\ "changed the guild icon." + img_filename = url.split("/")[-1].split("#")[0] # hacky img_file = discord.File(io.BytesIO(img_bytes), - filename=url.split("/")[-1]) # hacky + filename=img_filename) await log_channel.send(log_msg, file=img_file) @commands.guild_only()