From e3bc11a63292260492f1dbc0a3069576905760aa Mon Sep 17 00:00:00 2001 From: Michelle Date: Thu, 19 Feb 2026 15:44:24 +0100 Subject: [PATCH] Add print when status code isn't 200 --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index d6f662a..99359b8 100644 --- a/main.py +++ b/main.py @@ -39,7 +39,9 @@ async def get_latest_post(subreddit): return post["title"], post["url"] except (KeyError, json.JSONDecodeError): return None, None - return None, None + else: + print(f"Failed to fetch Reddit data (maybe a block?): {response.status_code}") + return None, None @bot.command() async def setChannel(message):