From c4a16bfbd8b4c1e152042b0011deb56592a2b188 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 22 Aug 2021 03:55:22 +0200 Subject: [PATCH] fix error handler --- src/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index a9e1d01..2823ef5 100644 --- a/src/main.py +++ b/src/main.py @@ -53,9 +53,10 @@ async def on_ready(): @client.event async def on_command_error(ctx, error): """Triggered when a command enconter an error""" - if not ctx.invoked_with.startswith(customPrefix): # si commande inconnu + if isinstance(error, commands.errors.CommandNotFound): # si commande inconnu if ctx.message: # si pas une commande slash await addReaction(ctx.message, 1) # ajout réaction + return else: raise error