setguildicon: make filename grabbing slightly more reliable
This commit is contained in:
parent
16ae2615bb
commit
f6302f710c
1 changed files with 2 additions and 1 deletions
|
@ -26,8 +26,9 @@ class Mod:
|
||||||
log_channel = self.bot.get_channel(config.modlog_channel)
|
log_channel = self.bot.get_channel(config.modlog_channel)
|
||||||
log_msg = f"✏️ **Guild Icon Update**: {ctx.author} "\
|
log_msg = f"✏️ **Guild Icon Update**: {ctx.author} "\
|
||||||
"changed the guild icon."
|
"changed the guild icon."
|
||||||
|
img_filename = url.split("/")[-1].split("#")[0] # hacky
|
||||||
img_file = discord.File(io.BytesIO(img_bytes),
|
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)
|
await log_channel.send(log_msg, file=img_file)
|
||||||
|
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
|
|
Loading…
Reference in a new issue