Browse Source

Fixed potential area for a bug

development
Roxie Gibson 5 years ago
parent
commit
c67d3f3393
No known key found for this signature in database
1 changed files with 10 additions and 9 deletions
  1. +10
    -9
      roxbot/cogs/image.py

+ 10
- 9
roxbot/cogs/image.py View File

@@ -216,15 +216,16 @@ class ImageEditor(commands.Cog):
async def image_logging(self, ctx, output):
"""Logging function for all image commands to avoid shit loads or repeating code.
Required because image has outputs that are user decided and therefore could need logging for."""
return await self.bot.log(
ctx.guild,
"image",
User=ctx.author,
User_ID=ctx.author.id,
Output_Message_ID=output.id,
Channel=ctx.channel,
Channel_Mention=ctx.channel.mention,
Time="{:%a %Y/%m/%d %H:%M:%S} UTC".format(ctx.message.created_at)
if isinstance(ctx.channel, discord.TextChannel):
return await self.bot.log(
ctx.guild,
"image",
User=ctx.author,
User_ID=ctx.author.id,
Output_Message_ID=output.id,
Channel=ctx.channel,
Channel_Mention=ctx.channel.mention,
Time="{:%a %Y/%m/%d %H:%M:%S} UTC".format(ctx.message.created_at)
)

@commands.group(case_insensitive=True)

Loading…
Cancel
Save