From c33c406814b69bad5b7c01322765d09aa84b9eca Mon Sep 17 00:00:00 2001 From: Dylan Dizon Date: Tue, 6 Nov 2018 15:54:14 -0500 Subject: [PATCH] Fix Forbidden exception from being thrown within command --- src/cogs/booru.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cogs/booru.py b/src/cogs/booru.py index cbfa99c..f45ceb9 100644 --- a/src/cogs/booru.py +++ b/src/cogs/booru.py @@ -1515,8 +1515,11 @@ class MsG: except exc.Remove: await message.edit(content=f'**Also add aliases?**```\n{formatter.tostring(aliases)}```\nType the tag(s) to remove or `0` to abort:') - await message.remove_reaction('\N{HEAVY MINUS SIGN}', self.bot.user) - await message.remove_reaction('\N{HEAVY MINUS SIGN}', ctx.author) + + with suppress(err.Forbidden): + await message.remove_reaction('\N{HEAVY MINUS SIGN}', self.bot.user) + await message.remove_reaction('\N{HEAVY MINUS SIGN}', ctx.author) + response = await self.bot.wait_for('message', check=on_message, timeout=7 * 60) for tag in response.content.split(' '):