From 0671fa5041215411657546f4c4ed96e4fe0a4e7f Mon Sep 17 00:00:00 2001 From: Florian SYLVAIN Date: Fri, 12 Mar 2021 00:30:02 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20-=20Quick=20fix=20for=20on=5Fcom?= =?UTF-8?q?mand=5Ferror()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/main.py b/python/main.py index e631d3c..7986b7a 100644 --- a/python/main.py +++ b/python/main.py @@ -22,7 +22,8 @@ async def on_ready(): @bot.event async def on_command_error(ctx, error): - print(datetime.now().strftime("[%H:%M:%S]") + ' \'' + str(error) + '\' from ' + str(ctx.author) + ' on ' + ctx.message.guild.name + '.') + print(datetime.now().strftime("[%H:%M:%S]") + ' \'' + str(error) + '\' from ' +str(ctx.author) + + ' on ' + (ctx.message.guild.name if ctx.message.guild is not None else 'DMs') + '.') if isinstance(error, commands.CommandNotFound): await ctx.send(spellchecker(str(ctx.message.content)[1:])) else: