aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-04-16 17:25:13 +0100
committerGravatar Chris Lovering <[email protected]>2022-04-20 22:14:52 +0100
commit930bf0f9203cf38b8b88a59d44e277ccc6201811 (patch)
treef3cdb59c245afedd1292a7cf1bde0dcd1d0dcd7a
parentOnly call unarchive threads if there are threads to send (diff)
Only suppress 404s from site when checking for bumped threads
-rw-r--r--bot/exts/utils/thread_bumper.py10
1 files 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])