gestion erreur quand message inexistant lors d'une erreur (slash command)

This commit is contained in:
Mylloon 2021-06-07 21:32:14 +02:00
parent aec56fd0fc
commit 4440372dbb

View file

@ -36,7 +36,8 @@ async def on_ready():
async def on_command_error(ctx, error):
if not ctx.invoked_with.startswith(customPrefix):
print(error)
await ctx.message.add_reaction(emoji = '')
if "discord.errors.NotFound" in str(error) == False:
await ctx.message.add_reaction(emoji = '')
@client.event
async def on_message(message):