Added a catch for when the bot's message has already been deleted
This commit is contained in:
parent
5ebab3a077
commit
1318fce81a
1 changed files with 4 additions and 1 deletions
|
@ -308,7 +308,10 @@ class Mod:
|
||||||
break
|
break
|
||||||
msg = await self.bot.say("{} messages succesfully deleted".format(count))
|
msg = await self.bot.say("{} messages succesfully deleted".format(count))
|
||||||
await asyncio.sleep(60)
|
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)
|
@commands.group(aliases=['rule'], pass_context=True, no_pm=True, invoke_without_command=True)
|
||||||
@checks.custom_perms(send_messages=True)
|
@checks.custom_perms(send_messages=True)
|
||||||
|
|
Loading…
Reference in a new issue