1
0
Fork 0
mirror of synced 2024-05-19 20:12:30 +12:00

Stopped both on_command_error catches from running

This commit is contained in:
Phxntxm 2016-07-11 06:43:34 -05:00
parent a7ec119011
commit cb0154c077

7
bot.py
View file

@ -52,10 +52,11 @@ async def on_member_remove(member):
@bot.event
async def on_command_error(error, ctx):
if isinstance(error, commands.CommandNotFound):
fmt = "That is not a valid command! If you need asistance on what command to use, please type '!help'"
fmt = "That is not a valid command! If you need asistance on what command to use, please enter '!help'"
await bot.send_message(ctx.message.channel, fmt)
fmt = 'An error occurred while processing this request: ```py\n{}: {}\n```'
await bot.send_message(ctx.message.channel, fmt.format(type(error).__name__, error))
else:
fmt = 'An error occurred while processing this request: ```py\n{}: {}\n```'
await bot.send_message(ctx.message.channel, fmt.format(type(error).__name__, error))
if __name__ == '__main__':
for e in extensions: