Procházet zdrojové kódy

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 před 6 roky
rodič
revize
81eebdd4dd
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. +2
    -3
      roxbot/cogs/image.py

+ 2
- 3
roxbot/cogs/image.py Zobrazit soubor

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)

Načítá se…
Zrušit
Uložit