Added a catch for when the bot's message has already been deleted
This commit is contained in:
parent
5ebab3a077
commit
1318fce81a
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue