mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Fix jimmy
This commit is contained in:
parent
4792b53e0d
commit
1d63dd42aa
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.
|
# 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)
|
||||||
print("[absolute next lesson] next available date: ", next_available_date)
|
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? ",
|
print("[absolute next lesson] Next available date is on break? ",
|
||||||
bool(self.are_on_break(next_available_date)))
|
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)
|
next_available_date += timedelta(days=1)
|
||||||
if next_available_date.year >= 2024:
|
if next_available_date.year >= 2024:
|
||||||
raise RuntimeError("Failed to fetch absolute next lesson")
|
raise RuntimeError("Failed to fetch absolute next lesson")
|
||||||
|
|
Loading…
Reference in a new issue