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