diff --git a/bot.py b/bot.py index 1fae5c6..32ae02f 100644 --- a/bot.py +++ b/bot.py @@ -63,10 +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): - #print('In {0.command.qualified_name}:'.format(ctx), file=sys.stderr) - #traceback.print_tb(error.original.__traceback__) - #print('{0.__class__.__name__}: {0}'.format(error.original), file=sys.stderr) + 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)) diff --git a/cogs/mod.py b/cogs/mod.py index 6fca4fb..6e5cc70 100644 --- a/cogs/mod.py +++ b/cogs/mod.py @@ -100,7 +100,7 @@ class Mod: @perms.command(name="add", aliases=["setup,create"], pass_context=True) @checks.customPermsOrRole("manage_server") async def add_perms(self, ctx, *msg: str): - """Setups up custom permissions on the provided command + """Sets up custom permissions on the provided command Format must be 'perms add '""" command = " ".join(msg[0:len(msg)-1]) permissions = msg[len(msg)-1]