krishsharma0413 / DiscordLevelingCard

A library with leveling cards for your discord bot.
MIT License
43 stars 7 forks source link

doesnt work #14

Closed KraoESPfan1n closed 9 months ago

KraoESPfan1n commented 11 months ago

im getting this error: Ignoring exception in command rank: Traceback (most recent call last): File "/home/container/.venv/lib/python3.11/site-packages/discord/commands/core.py", line 124, in wrapped ret = await coro(arg) ^^^^^^^^^^^^^^^ File "/home/container/.venv/lib/python3.11/site-packages/discord/commands/core.py", line 982, in _invoke await self.callback(ctx, kwargs) File "/home/container/main.py", line 323, in rank await ctx.respond(embed=embed, file=disnake.File(image, filename="rank.png")) File "/home/container/.venv/lib/python3.11/site-packages/discord/ext/bridge/context.py", line 93, in respond return await self._respond(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/container/.venv/lib/python3.11/site-packages/discord/ext/bridge/context.py", line 146, in _respond return await self._get_super("respond")(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/container/.venv/lib/python3.11/site-packages/discord/commands/context.py", line 282, in respond return await self.interaction.response.send_message( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/container/.venv/lib/python3.11/site-packages/discord/interactions.py", line 809, in send_message raise InvalidArgument("file parameter must be File") discord.errors.InvalidArgument: file parameter must be File The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/container/.venv/lib/python3.11/site-packages/discord/bot.py", line 1114, in invoke_application_command await ctx.command.invoke(ctx) File "/home/container/.venv/lib/python3.11/site-packages/discord/commands/core.py", line 375, in invoke await injected(ctx) File "/home/container/.venv/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: InvalidArgument: file parameter must be File i tried io.bytes, tempfile and doesnt work. i think is because im using pycord idk

KraoESPfan1n commented 11 months ago

when i reinstall the library it works the first time but the second time doesnt works and give me that error

krishsharma0413 commented 11 months ago

I will look into this. Can you please provide me with the code that you used in your bot along with the library version.