From 32dafac46910a2858918d0b95647c998cbf4d22b Mon Sep 17 00:00:00 2001 From: Myned Date: Fri, 11 May 2018 12:35:15 -0400 Subject: [PATCH] Fix error logs not showing channel --- src/run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/run.py b/src/run.py index 959efd7..e6964ff 100644 --- a/src/run.py +++ b/src/run.py @@ -172,8 +172,8 @@ async def on_command_error(ctx, error): print('\n! ! ! ! ! ! ! ! ! ! ! !\nC O M M A N D E R R O R : {}\n! ! ! ! ! ! ! ! ! ! ! !\n'.format( error), file=sys.stderr) tb.print_exception(type(error), error, error.__traceback__, file=sys.stderr) - await bot.get_user(u.config['owner_id']).send('**COMMAND ERROR** \N{WARNING SIGN} `{}` from {} in {}\n```\n{}```'.format(ctx.message.content, ctx.author.mention, ctx.channel.mention if ctx.channel is d.TextChannel else 'DMs', error)) - await bot.get_channel(u.config['info_channel']).send('**COMMAND ERROR** \N{WARNING SIGN} `{}` from {} in {}\n```\n{}```'.format(ctx.message.content, ctx.author.mention, ctx.channel.mention if ctx.channel is d.TextChannel else 'DMs', error)) + await bot.get_user(u.config['owner_id']).send('**COMMAND ERROR** \N{WARNING SIGN} `{}` from {} in {}\n```\n{}```'.format(ctx.message.content, ctx.author.mention, ctx.channel.mention if ctx.channel is d.channel.TextChannel else 'DMs', error)) + await bot.get_channel(u.config['info_channel']).send('**COMMAND ERROR** \N{WARNING SIGN} `{}` from {} in {}\n```\n{}```'.format(ctx.message.content, ctx.author.mention, ctx.channel.mention if ctx.channel is d.channel.TextChannel else 'DMs', error)) await exc.send_error(ctx, error) await ctx.message.add_reaction('\N{WARNING SIGN}') # u.notify('C O M M A N D E R R O R')