japandotorg / Seina-Cogs

My public cogs for red.
https://seina-cogs.readthedocs.io/en/latest/
Other
16 stars 19 forks source link

[ISSUE] Purge cog is not handling interactions properly, resulting in errors each time the command is ran #60

Open mordertehmod opened 2 months ago

mordertehmod commented 2 months ago

`[06:38:32] ERROR [red] HybridCommandError ╭────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────╮ │ /home/xrdpuser/redenv/lib/python3.11/site-packages/discord/app_commands/commands.py:857 in _do_call │ │ ❱ 857 return await self._callback(self.binding, interaction, params) # │ │ type: ignore │ │ /home/xrdpuser/Desktop/Zaddy/cogs/CogManager/cogs/purge/core.py:531 in _after │ │ ❱ 531 await ctx.send( │ │ /home/xrdpuser/redenv/lib/python3.11/site-packages/redbot/core/commands/context.py:91 in send │ │ ❱ 91 return await super().send(content=content, kwargs) │ │ /home/xrdpuser/redenv/lib/python3.11/site-packages/discord/ext/commands/context.py:1077 in send │ │ ❱ 1077 await self.interaction.response.send_message(**kwargs) │ │ /home/xrdpuser/redenv/lib/python3.11/site-packages/discord/interactions.py:855 in send_message │ │ ❱ 855 await adapter.create_interactionresponse( │ │ /home/xrdpuser/redenv/lib/python3.11/site-packages/discord/webhook/async.py:221 in request │ │ ❱ 221 raise NotFound(response, data) │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ NotFound: 404 Not Found (error code: 10062): Unknown interaction

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

╭────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────╮ │ /home/xrdpuser/redenv/lib/python3.11/site-packages/discord/ext/commands/hybrid.py:444 in │ │ _invoke_with_namespace │ │ ❱ 444 value = await self._do_call(ctx, ctx.kwargs) # type: ignore │ │ /home/xrdpuser/redenv/lib/python3.11/site-packages/discord/app_commands/commands.py:876 in _do_call │ │ ❱ 876 raise CommandInvokeError(self, e) from e │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ CommandInvokeError: Command 'after' raised an exception: NotFound: 404 Not Found (error code: 10062): Unknown interaction

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

╭────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────╮ │ /home/xrdpuser/redenv/lib/python3.11/site-packages/discord/ext/commands/hybrid.py:444 in │ │ _invoke_with_namespace │ │ ❱ 444 value = await self._do_call(ctx, ctx.kwargs) # type: ignore │ │ /home/xrdpuser/redenv/lib/python3.11/site-packages/discord/app_commands/commands.py:876 in _do_call │ │ ❱ 876 raise CommandInvokeError(self, e) from e │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯ HybridCommandError: Hybrid command raised an error: Command 'after' raised an exception: NotFound: 404 Not Found (error code: 10062): Unknown interaction`