Ignoring exception in on_button_click
Traceback (most recent call last):
File "C:\Users\vs091\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\disnake\interactions\base.py", line 1023, in send_message
await adapter.create_interaction_response(
File "C:\Users\vs091\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\disnake\webhook\async_.py", line 208, in request
raise NotFound(response, data)
disnake.errors.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):
File "C:\Users\vs091\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\disnake\client.py", line 703, in _run_event
await coro(*args, **kwargs)
File "C:\Users\vs091\Desktop\DSB\cogs\ticket.py", line 143, in on_button_click
await interaction.response.send_message(content=f"{channel.mention} - канал обращения создан.", ephemeral=True)
File "C:\Users\vs091\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\disnake\interactions\base.py", line 1033, in send_message
raise InteractionTimedOut(self._parent) from e
disnake.errors.InteractionTimedOut: Interaction took more than 3 seconds to be responded to. Please defer it using "interaction.response.defer" on the start of your command. Later you may send a response by editing the deferred
message using "interaction.edit_original_response"
Note: This might also be caused by a misconfiguration in the components make sure you do not respond twice in case this is a component.
#how to fix this exception? pls help
1 messages · Page 1 of 1 (latest)
if I make a defer, then the buttons stop working, gives an error like interaction has already been processed and the button does not work in the code
if i make await interaction.response.defer()
Ignoring exception in on_button_click
Traceback (most recent call last):
File "C:\Users\vs091\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\disnake\client.py", line 703, in _run_event
await coro(*args, **kwargs)
File "C:\Users\vs091\Desktop\DSB\cogs\ticket.py", line 147, in on_button_click
await interaction.response.send_message(content=f"{channel.mention} - канал обращения создан.", ephemeral=True)
File "C:\Users\vs091\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\disnake\interactions\base.py", line 957, in send_message
raise InteractionResponded(self._parent)
disnake.errors.InteractionResponded: This interaction has already been responded to before
Show the code
You can't use interaction.response.defear()
and what to do now?
interaction.send iirc
I don't know what it is. can you give an example of how to use it?
-d interaction.send
await send(content=None, *, embed=..., embeds=..., file=..., files=..., allowed_mentions=..., view=..., components=..., tts=False, ephemeral=..., suppress_embeds=..., flags=..., delete_after=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Sends a message using either [`response.send_message`](https://docs.disnake.dev/en/latest/api/interactions.html#disnake.InteractionResponse.send_message "disnake.InteractionResponse.send_message") or [`followup.send`](https://docs.disnake.dev/en/latest/api/webhooks.html#disnake.Webhook.send "disnake.Webhook.send").
If the interaction hasn’t been responded to yet, this method will call [`response.send_message`](https://docs.disnake.dev/en/latest/api/interactions.html#disnake.InteractionResponse.send_message "disnake.InteractionResponse.send_message"). Otherwise, it will call [`followup.send`](https://docs.disnake.dev/en/latest/api/webhooks.html#disnake.Webhook.send "disnake.Webhook.send").
Note
This method does not return a [`Message`](https://docs.disnake.dev/en/latest/api/messages.html#disnake.Message "disnake.Message") object. If you need a message object, use [`original_response()`](https://docs.disnake.dev/en/latest/api/interactions.html#disnake.Interaction.original_response "disnake.Interaction.original_response") to fetch it, or use [`followup.send`](https://docs.disnake.dev/en/latest/api/webhooks.html#disnake.Webhook.send "disnake.Webhook.send") directly instead of this method if you’re sending a followup message.
No documentation found for ABC.send.
thx