ignore what is not a command

This commit is contained in:
Mylloon 2021-08-23 12:38:13 +02:00
parent 7a7c3dc93e
commit 51f270dafb

View file

@ -54,7 +54,8 @@ async def on_command_error(ctx, error):
"""Triggered when a command enconter an error"""
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
if not ctx.invoked_with.startswith(f"{customPrefix}"):
await addReaction(ctx.message, 1) # ajout réaction
return
else:
raise error