Merge remote-tracking branch 'origin/master'

This commit is contained in:
Nexus 2023-04-18 16:58:27 +01:00
commit e13363b877
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -112,7 +112,7 @@ class TimeTableCog(commands.Cog):
lesson = self.next_lesson(date) lesson = self.next_lesson(date)
# If there's another lesson, great, return that # If there's another lesson, great, return that
# Otherwise, we need to start looking ahead. # 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. # 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) next_available_date = date.replace(hour=0, minute=0, second=0)
while self.are_on_break(next_available_date) or not self.timetable.get( while self.are_on_break(next_available_date) or not self.timetable.get(