mirror of
https://github.com/Floriansylvain/Risitas_BOT.git
synced 2026-08-19 19:53:19 +02:00
🩹 - Quick fix for on_command_error()
This commit is contained in:
+2
-1
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user