[V3 Help Formatter] Fix help command's error handler (#1237)

This commit is contained in:
Michael H 2018-01-06 19:26:21 -05:00 committed by Tobotimus
parent d83f14d1b6
commit de1b135dec

View File

@ -337,6 +337,7 @@ async def help(ctx, *cmds: str):
@help.error @help.error
async def help_error(self, error, ctx): async def help_error(ctx, error):
await self.destination.send('{0.__name__}: {1}'.format(type(error), error)) destination = ctx.author if ctx.bot.pm_help else ctx
await destination.send('{0.__name__}: {1}'.format(type(error), error))
traceback.print_tb(error.original.__traceback__, file=sys.stderr) traceback.print_tb(error.original.__traceback__, file=sys.stderr)