From 930bf0f9203cf38b8b88a59d44e277ccc6201811 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Sat, 16 Apr 2022 17:25:13 +0100 Subject: Only suppress 404s from site when checking for bumped threads --- bot/exts/utils/thread_bumper.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bot/exts/utils/thread_bumper.py b/bot/exts/utils/thread_bumper.py index 8d0ebdf1c..743919d4e 100644 --- a/bot/exts/utils/thread_bumper.py +++ b/bot/exts/utils/thread_bumper.py @@ -91,8 +91,9 @@ class ThreadBumper(commands.Cog): try: await self.bot.api_client.get(f"{THREAD_BUMP_ENDPOINT}/{thread.id}") - except ResponseCodeError: - pass + except ResponseCodeError as e: + if e.status != 404: + raise else: raise commands.BadArgument("This thread is already in the bump list.") @@ -138,8 +139,9 @@ class ThreadBumper(commands.Cog): try: await self.bot.api_client.get(f"{THREAD_BUMP_ENDPOINT}/{after.id}") - except ResponseCodeError: - pass + except ResponseCodeError as e: + if e.status != 404: + raise else: await self.unarchive_threads_not_manually_archived([after]) -- cgit v1.2.3