From b978148e0f74a85b53751663a9cf0cea90e40209 Mon Sep 17 00:00:00 2001 From: Dylan Dizon Date: Thu, 8 Nov 2018 22:32:04 -0500 Subject: [PATCH] Add suppressing of NotFound errors while deleting messages --- src/cogs/booru.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cogs/booru.py b/src/cogs/booru.py index ecc04b3..0542299 100644 --- a/src/cogs/booru.py +++ b/src/cogs/booru.py @@ -1524,9 +1524,10 @@ class MsG: finally: if messages: - for msg in messages: - await msg.delete() - await message.delete() + with suppress(err.NotFound): + for msg in messages: + await msg.delete() + await message.delete() @_add_tags.command(name='global', aliases=['gl', 'g']) @cmds.is_owner()