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

Removed error prenting to a file

This commit is contained in:
Phxntxm 2016-07-16 12:28:15 -05:00
parent dd3fd91c8c
commit 686918fb80
2 changed files with 6 additions and 6 deletions

10
bot.py
View file

@ -63,11 +63,11 @@ async def on_command_error(error, ctx):
elif isinstance(error, commands.CheckFailure):
fmt = "You can't tell me what to do!"
await bot.send_message(ctx.message.channel, fmt)
elif isinstance(error, commands.CommandInvokeError):
f = open("/home/phxntx5/public_html/Bonfire/error_log", 'w')
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)
#elif isinstance(error, commands.CommandInvokeError):
#f = open("/home/phxntx5/public_html/Bonfire/error_log", 'w')
#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))

View file

@ -110,7 +110,7 @@ class Mod:
msg = msg[0:len(msg)-1]
count = 0
cmd = self.bot.commands.get(msg[count])
await self.bot.say("2: Trying to add `{}` permissions on `{}`".format(permissions, command))
await self.bot.say("Trying to add `{}` permissions on `{}`".format(permissions, command))
await self.bot.say("Checking nesting for groups of commands")
while isinstance(cmd, commands.Group):
count += 1