1
0
Fork 0
mirror of synced 2024-06-18 18:44:33 +12:00

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

This commit is contained in:
phxntxm 2016-08-08 18:57:33 -05:00
parent e07bc8359e
commit 7fcb0738f8

2
bot.py
View file

@ -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: