From 4440372dbb2a1ad3e3baea8e8db4d4eb6c956199 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 7 Jun 2021 21:32:14 +0200 Subject: [PATCH] gestion erreur quand message inexistant lors d'une erreur (slash command) --- src/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index a4d246f..cd2539e 100644 --- a/src/main.py +++ b/src/main.py @@ -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):