1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

Added a catch for when the bot's message has already been deleted

This commit is contained in:
Phxntxm 2016-09-18 16:13:41 -05:00
parent 5ebab3a077
commit 1318fce81a

View file

@ -308,7 +308,10 @@ class Mod:
break
msg = await self.bot.say("{} messages succesfully deleted".format(count))
await asyncio.sleep(60)
await self.bot.delete_message(msg)
try:
await self.bot.delete_message(msg)
except discord.NotFound:
pass
@commands.group(aliases=['rule'], pass_context=True, no_pm=True, invoke_without_command=True)
@checks.custom_perms(send_messages=True)