Browse Source

forgot a few things in image cog when cleaning up code.

forgot a few things in image cog when cleaning up code.
tags/v2.0.0
Roxie Gibson 6 years ago
parent
commit
4afb18ab14
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      roxbot/cogs/image.py

+ 2
- 3
roxbot/cogs/image.py View File

Required because image has outputs that are user decided and therefore could need logging for.""" Required because image has outputs that are user decided and therefore could need logging for."""
logging = roxbot.guild_settings.get(ctx.guild).logging logging = roxbot.guild_settings.get(ctx.guild).logging
log_channel = self.bot.get_channel(logging["channel"]) log_channel = self.bot.get_channel(logging["channel"])
await roxbot.log(
return await roxbot.log(
ctx.guild, ctx.guild,
log_channel, log_channel,
"image", "image",
file = await self.flag_filter("lgbt", flag, image) file = await self.flag_filter("lgbt", flag, image)
output = await ctx.send(file=file) output = await ctx.send(file=file)
os.remove(file.filename) os.remove(file.filename)
await self.image_logging(ctx, output)




@pride.command(aliases=["trans"]) @pride.command(aliases=["trans"])
Provide a URL, that image Provide a URL, that image
Provide an image via upload, that image. Provide an image via upload, that image.
""" """
logging = roxbot.guild_settings.get(ctx.guild).logging
log_channel = self.bot.get_channel(logging["channel"])
if not image: if not image:
image = self.image_lookup(ctx.message) image = self.image_lookup(ctx.message)
filename = await roxbot.http.download_file(image) filename = await roxbot.http.download_file(image)

Loading…
Cancel
Save