fix error handler

This commit is contained in:
Mylloon 2021-08-22 03:55:22 +02:00
parent ccc738f901
commit c4a16bfbd8

View file

@ -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