Error message to error users now shows the command.

doc_update
Joey Hines 2018-09-27 15:06:15 -05:00
parent af3dc446d7
commit 9b632ce1b8
1 changed files with 4 additions and 2 deletions

View File

@ -75,7 +75,7 @@ class GeoffreyBot(commands.Bot):
else:
subcommand = ":" + ctx.invoked_subcommand.__str__()
logger.info("User %s, used command %s%s with context: %s", ctx.message.author, ctx.command, subcommand,
logger.info("User %s, used command %s%s with context: %s", ctx.message.author, ctx.command.name, subcommand,
ctx.args)
if ctx.invoked_with.lower() == 'help' and ctx.message.guild is not None:
@ -117,7 +117,9 @@ class GeoffreyBot(commands.Bot):
if error_str is '':
await self.send_error_message(
'Geoffrey encountered unhandled exception: {}. Context:'.format(error, ctx.args))
'Geoffrey encountered unhandled exception: {} Command: **{}** Context: {}'.format(error,
ctx.command.name,
ctx.args))
error_str = bad_error_message.format(ctx.invoked_with)
logger.error("Geoffrey encountered exception: %s", error)