mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
#savejimmy
This commit is contained in:
parent
1d63dd42aa
commit
13d9486882
1 changed files with 2 additions and 2 deletions
|
@ -98,10 +98,10 @@ class TimeTableCog(commands.Cog):
|
|||
# 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)
|
||||
print("[absolute next lesson] next available date: ", next_available_date)
|
||||
while self.are_on_break(next_available_date) or not self.timetable.get(date.strftime("%a").lower()):
|
||||
while self.are_on_break(next_available_date) or not self.timetable.get(date.strftime("%A").lower()):
|
||||
print("[absolute next lesson] Next available date is on break? ",
|
||||
bool(self.are_on_break(next_available_date)))
|
||||
print("[absolute next lesson] Is timetabled date?", self.timetable.get(date.strftime("%a").lower()))
|
||||
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")
|
||||
|
|
Loading…
Reference in a new issue