From 51c5e28edf64a10cecde5512eaf390f08f5cec6e Mon Sep 17 00:00:00 2001 From: nex Date: Mon, 17 Apr 2023 23:37:47 +0100 Subject: [PATCH] i hate time --- cogs/timetable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/timetable.py b/cogs/timetable.py index 9c99850..a3b5acc 100644 --- a/cogs/timetable.py +++ b/cogs/timetable.py @@ -112,7 +112,7 @@ class TimeTableCog(commands.Cog): lesson = self.next_lesson(date) # If there's another lesson, great, return that # Otherwise, we need to start looking ahead. - if lesson is None: + if lesson is None or lesson["start_datetime"] < datetime.now(): # Loop until we find the next day when it isn't the weekend, and we aren't on break. next_available_date = date.replace(hour=0, minute=0, second=0) while self.are_on_break(next_available_date) or not self.timetable.get(