#Message in variable deleted after delay
1 messages · Page 1 of 1 (latest)
This gives the following error:
disnake.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'delete'
inter.response.send_message() (interaction.send) doesn't return anything
-d disnake.ApplicationCommandInteraction
class disnake.ApplicationCommandInteraction```
Represents an interaction with an application command.
Current examples are slash commands, user commands and message commands.
New in version 2.1.
msg = await interaction.original_response() is what you need
But you can also just do..
await interaction.response.send_message(embed=embed, delete_after=5)
or even
await interaction.response.send_message(embed=embed, ephemeral=True)
then it doesn't even appear in chat and only the command user can see it