1
0
Fork 0
mirror of synced 2024-06-15 09:04:33 +12:00

Added an error exception for NoPrivateMessage

This commit is contained in:
Phxntxm 2016-08-07 06:53:41 -05:00
parent 21806d4a00
commit 44ff02c4ba

2
bot.py
View file

@ -89,7 +89,7 @@ async def on_command_error(error, ctx):
fmt = "This command is on cooldown! Hold your horses! >:c\nTry again in {} minutes and {} seconds" \
.format(round(m), round(s))
await bot.send_message(ctx.message.channel, fmt)
elif isinstance(error, commands.NoPrivateMessage, fmt):
elif isinstance(error, commands.NoPrivateMessage):
fmt = "This command cannot be used in a private message"
await bot.send_message(ctx.message.channel, fmt)
elif not isinstance(error, commands.CommandNotFound):