mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-20 02:26:32 +01:00
Fix jimmy timetable displaying looped timetable
This commit is contained in:
parent
d8f61cd733
commit
992477ffb5
1 changed files with 1 additions and 2 deletions
|
@ -157,7 +157,7 @@ class TimeTableCog(commands.Cog):
|
||||||
next_lesson = self.next_lesson(date)
|
next_lesson = self.next_lesson(date)
|
||||||
if next_lesson is None:
|
if next_lesson is None:
|
||||||
try:
|
try:
|
||||||
next_lesson = self.absolute_next_lesson()
|
next_lesson = self.absolute_next_lesson(date + timedelta(days=1))
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
print("Failed to fetch absolute next lesson. Is this the end?")
|
print("Failed to fetch absolute next lesson. Is this the end?")
|
||||||
return
|
return
|
||||||
|
@ -199,7 +199,6 @@ class TimeTableCog(commands.Cog):
|
||||||
)
|
)
|
||||||
next_lesson = self.next_lesson(date)
|
next_lesson = self.next_lesson(date)
|
||||||
if next_lesson:
|
if next_lesson:
|
||||||
next_lesson = self.absolute_next_lesson()
|
|
||||||
next_lesson.setdefault("name", "unknown")
|
next_lesson.setdefault("name", "unknown")
|
||||||
next_lesson.setdefault("tutor", "unknown")
|
next_lesson.setdefault("tutor", "unknown")
|
||||||
next_lesson.setdefault("room", "unknown")
|
next_lesson.setdefault("room", "unknown")
|
||||||
|
|
Loading…
Reference in a new issue