From 7fcb0738f8874c9254f5f9c08806f97c7cc9ecc0 Mon Sep 17 00:00:00 2001 From: phxntxm Date: Mon, 8 Aug 2016 18:57:33 -0500 Subject: [PATCH] Printing error when a command's requirements are missing, as based on my error log, people don't know how to use the help command --- bot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot.py b/bot.py index 2e8219d..0a8f45c 100644 --- a/bot.py +++ b/bot.py @@ -93,6 +93,8 @@ async def on_command_error(error, ctx): elif isinstance(error, commands.NoPrivateMessage): fmt = "This command cannot be used in a private message" await bot.send_message(ctx.message.channel, fmt) + elif isinstance(error, commands.MissingRequiredArgument): + await bot.send_message(ctx.message.channel, error) elif not isinstance(error, commands.CommandNotFound): now = datetime.datetime.now() with open("/home/phxntx5/public_html/Bonfire/error_log", 'a') as f: