From a7ec119011b37a94219e7761ace360d7ec8fdba0 Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Mon, 11 Jul 2016 06:42:27 -0500 Subject: [PATCH] Changing the CommandNotFound error to refer to the commands class --- bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index bcc8f49..19fc472 100644 --- a/bot.py +++ b/bot.py @@ -51,9 +51,9 @@ async def on_member_remove(member): @bot.event async def on_command_error(error, ctx): - #if isinstance(error, discord.CommandNotFound): - # fmt = "That is not a valid command! If you need asistance on what command to use, please type '!help'" - # await bot.send_message(ctx.message.channel, fmt) + if isinstance(error, commands.CommandNotFound): + fmt = "That is not a valid command! If you need asistance on what command to use, please type '!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))