🩹 - Quick fix for on_command_error()

This commit is contained in:
Florian SYLVAIN
2021-03-12 00:30:02 +01:00
parent 9e1e974daa
commit 0671fa5041
+2 -1
View File
@@ -22,7 +22,8 @@ async def on_ready():
@bot.event @bot.event
async def on_command_error(ctx, error): 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): if isinstance(error, commands.CommandNotFound):
await ctx.send(spellchecker(str(ctx.message.content)[1:])) await ctx.send(spellchecker(str(ctx.message.content)[1:]))
else: else: