hollowstrawberry / crab-cogs

Red Discord bot cogs for the Crab friend group
GNU General Public License v3.0
16 stars 3 forks source link

[ImageLog] #22

Closed cool-aid-man closed 1 year ago

cool-aid-man commented 1 year ago

Getting this on running imagelog

Traceback (most recent call last):
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 229, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.local/share/Red-DiscordBot/data/dusky/cogs/CogManager/cogs/imagelog/imagelog.py", line 80, in imagelog
    channel_id = await self.logchannels.get(ctx.guild.id, 0)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object int can't be used in 'await' expression

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
    await ctx.command.invoke(ctx)
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/redbot/core/commands/commands.py", line 783, in invoke
    await super().invoke(ctx)
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1647, in invoke
    await super().invoke(ctx)
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 1023, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/redenv/lib/python3.11/site-packages/discord/ext/commands/core.py", line 238, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: object int can't be used in 'await' expression
hollowstrawberry commented 1 year ago

Hey, seems like a simple mistake on my part, I pushed a fix so try again after updating

cool-aid-man commented 1 year ago

Hi updated and yes that fixes the issue Thanks and have a good day ahead

cool-aid-man commented 1 year ago

One thing, forgot to mention is: The imagelog setchannel should accept a channel argument where you can set a channel just by passing their ID or just mentioning it.