From 4792b53e0d801b880069391745097a9e4eaa5606 Mon Sep 17 00:00:00 2001 From: nex <53234499+EEKIM10@users.noreply.github.com> Date: Sun, 30 Oct 2022 16:18:42 +0000 Subject: [PATCH] ok we actually need to debug --- cogs/timetable.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cogs/timetable.py b/cogs/timetable.py index 03c7c00..308f1d7 100644 --- a/cogs/timetable.py +++ b/cogs/timetable.py @@ -103,6 +103,8 @@ class TimeTableCog(commands.Cog): bool(self.are_on_break(next_available_date))) print("[absolute next lesson] Is timetabled date?", self.timetable.get(date.strftime("%A").lower())) next_available_date += timedelta(days=1) + if next_available_date.year >= 2024: + raise RuntimeError("Failed to fetch absolute next lesson") print("[absolute next lesson] next available date: ", next_available_date) # NOTE: This could be *even* more efficient but honestly as long as it works it's fine print("[absolute next lesson] fetching next lesson on", next_available_date)