@bot.event
async def on_command_error(interaction: disnake.MessageInteraction, error):
if isinstance(error, disnake.ext.commands.errors.CommandNotFound):
print("#ERROR: ",error)
await interaction.message.delete()
await interaction.send("cmd not found", ephemeral=True)
else:
raise error
#ERROR: Command "test" is not found
Ignoring exception in on_command_error
Traceback (most recent call last):
File "G:\bot\venv\lib\site-packages\disnake\client.py", line 612, in _run_event
await coro(*args, **kwargs)
File "G:\bot\bot.py", line 25, in on_command_error
await interaction.send("cmd not found", ephemeral=True)
TypeError: Messageable.send() got an unexpected keyword argument 'ephemeral'