1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-11-01 13:02:38 +00:00

Add suppressing of permissions exception for cmd_completion reactions

This commit is contained in:
Dylan Dizon 2018-11-06 15:21:31 -05:00
parent 04f4af1f0e
commit a93cd158fa

View file

@ -195,7 +195,8 @@ async def on_command_completion(ctx):
if ctx.guild.id in u.settings['del_ctx'] and ctx.me.permissions_in(ctx.channel).manage_messages and isinstance(ctx.message.channel, d.TextChannel):
await ctx.message.delete()
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
with suppress(err.Forbidden):
await ctx.message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
for command in ('lastcommand', ',restart', ',die'):
if ctx.command.name == command: