Compagnie-Hydromel / CompagnieHydromel

The repository to maintain the discord bot from the hydromel compagnie discord server
MIT License
2 stars 0 forks source link

error on sex_commands with log #8

Closed EthannSchneider closed 1 year ago

EthannSchneider commented 1 year ago

wrong import on sex_commands to log in console

Ignoring exception in command porn:
Traceback (most recent call last):
  File "/home/ethann/Document/BotDiscord/CompagnieHydromel/env/lib/python3.11/site-packages/discord/commands/core.py", line 124, in wrapped
    ret = await coro(arg)
          ^^^^^^^^^^^^^^^
  File "/home/ethann/Document/BotDiscord/CompagnieHydromel/env/lib/python3.11/site-packages/discord/commands/core.py", line 978, in _invoke
    await self.callback(self.cog, ctx, **kwargs)
  File "/home/ethann/Document/BotDiscord/CompagnieHydromel/cogs/barman/sex_commands.py", line 18, in porn
    Log(ctx.author.name + " is launching sex commands with " + choose, LogType.COMMAND)
TypeError: Log.__init__() takes from 1 to 2 positional arguments but 3 were given

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

Traceback (most recent call last):
  File "/home/ethann/Document/BotDiscord/CompagnieHydromel/env/lib/python3.11/site-packages/discord/bot.py", line 1114, in invoke_application_command
    await ctx.command.invoke(ctx)
  File "/home/ethann/Document/BotDiscord/CompagnieHydromel/env/lib/python3.11/site-packages/discord/commands/core.py", line 375, in invoke
    await injected(ctx)
  File "/home/ethann/Document/BotDiscord/CompagnieHydromel/env/lib/python3.11/site-packages/discord/commands/core.py", line 132, in wrapped
    raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: TypeError: Log.__init__() takes from 1 to 2 positional arguments but 3 were given
EthannSchneider commented 1 year ago

fix here https://github.com/EthannSchneider/CompagnieHydromel/pull/9/commits/9b38f2ae00cd94c3b3e3149a322b8f513eb073f1