Add print when status code isn't 200

This commit is contained in:
2026-02-19 15:44:24 +01:00
parent 4c337f6d5e
commit e3bc11a632

View File

@@ -39,6 +39,8 @@ async def get_latest_post(subreddit):
return post["title"], post["url"]
except (KeyError, json.JSONDecodeError):
return None, None
else:
print(f"Failed to fetch Reddit data (maybe a block?): {response.status_code}")
return None, None
@bot.command()