From 2f97cb650fe342425615ed12c81701c34f9506ee Mon Sep 17 00:00:00 2001 From: Myned Date: Thu, 10 May 2018 18:35:49 -0400 Subject: [PATCH] Fix Forbidden error --- src/cogs/booru.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/cogs/booru.py b/src/cogs/booru.py index 5461a7b..a8ec4de 100644 --- a/src/cogs/booru.py +++ b/src/cogs/booru.py @@ -390,10 +390,12 @@ class MsG: for future in done: selection = future.result() - await match.delete() + with suppress(err.Forbidden): + await match.delete() tempool = [pool for pool in pool_request if pool['name'] == pools[int(selection.content) - 1]][0] - await selection.delete() + with suppress(err.Forbidden): + await selection.delete() elif pool_request: tempool = pool_request[0] else: @@ -638,10 +640,12 @@ class MsG: for future in done: selection = future.result() - await match.delete() + with suppress(err.Forbidden): + await match.delete() tempool = [pool for pool in pool_request if pool['name'] == pools[int(selection.content) - 1]][0] - await selection.delete() + with suppress(err.Forbidden): + await selection.delete() pool = {'name': tempool['name'], 'id': tempool['id']} await destination.trigger_typing()