1
0
Fork 0
mirror of synced 2024-06-01 18:29:38 +12:00

Removed printing of invalid commands

This commit is contained in:
Phxntxm 2016-08-01 08:14:16 -05:00
parent 73bbede667
commit e5265bc55d

14
bot.py
View file

@ -72,13 +72,13 @@ async def on_command_error(error, ctx):
elif isinstance(error, commands.CommandOnCooldown):
fmt = "This command is on cooldown! Hold your horses! >:c"
await bot.send_message(ctx.message.channel, fmt)
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))
with open("/home/phxntx5/public_html/Bonfire/error_log", 'a') as f:
print('In {0.command.qualified_name}:'.format(ctx), file=f)
traceback.print_tb(error.original.__traceback__, file=f)
print('{0.__class__.__name__}: {0}'.format(error.original), file=f)
#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))
#with open("/home/phxntx5/public_html/Bonfire/error_log", 'a') as f:
#print('In {0.command.qualified_name}:'.format(ctx), file=f)
#traceback.print_tb(error.original.__traceback__, file=f)
#print('{0.__class__.__name__}: {0}'.format(error.original), file=f)
if __name__ == '__main__':