ajout du prefix custom dans la gestion des erreurs

This commit is contained in:
Mylloon 2021-05-31 20:24:37 +02:00
parent 29bf7c3b4e
commit 8c88ba9efb

View file

@ -34,7 +34,7 @@ async def on_ready():
@client.event @client.event
async def on_command_error(ctx, error): async def on_command_error(ctx, error):
if not ctx.invoked_with.startswith('.'): if not ctx.invoked_with.startswith(customPrefix):
print(error) print(error)
await ctx.message.add_reaction(emoji = '') await ctx.message.add_reaction(emoji = '')
@ -42,7 +42,6 @@ async def on_command_error(ctx, error):
async def on_message(message): async def on_message(message):
await client.process_commands(message) await client.process_commands(message)
if message.author == client.user: if message.author == client.user:
return return