Removed printing of invalid commands
This commit is contained in:
parent
73bbede667
commit
e5265bc55d
14
bot.py
14
bot.py
|
@ -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__':
|
||||
|
|
Loading…
Reference in a new issue