From cb0154c077f86fc85a777ad76ca354642b6b970b Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Mon, 11 Jul 2016 06:43:34 -0500 Subject: [PATCH] Stopped both on_command_error catches from running --- bot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 19fc472..5f26e41 100644 --- a/bot.py +++ b/bot.py @@ -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: