Handled error when a the bot does not have permissions to delete a message
This commit is contained in:
parent
20981729bd
commit
48ccf886b5
1 changed files with 4 additions and 1 deletions
|
@ -79,7 +79,10 @@ class Mod:
|
|||
"""Tells the bot to repeat what you say"""
|
||||
fmt = "\u200B{}".format(msg)
|
||||
await self.bot.say(msg)
|
||||
try:
|
||||
await self.bot.delete_message(ctx.message)
|
||||
except:
|
||||
pass
|
||||
|
||||
@commands.group(pass_context=True, invoke_without_command=True, no_pm=True)
|
||||
@checks.custom_perms(send_messages=True)
|
||||
|
|
Loading…
Reference in a new issue