mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Add next lesson preview to timetable system
This commit is contained in:
parent
6b5da04ff4
commit
323670495a
1 changed files with 6 additions and 0 deletions
|
@ -108,6 +108,12 @@ class TimeTableCog(commands.Cog):
|
||||||
else:
|
else:
|
||||||
text = f"[tt] Current Lesson: {lesson['name']!r} with {lesson['tutor']} in {lesson['room']} - " \
|
text = f"[tt] Current Lesson: {lesson['name']!r} with {lesson['tutor']} in {lesson['room']} - " \
|
||||||
f"ends {discord.utils.format_dt(lesson['end_datetime'], 'R')}"
|
f"ends {discord.utils.format_dt(lesson['end_datetime'], 'R')}"
|
||||||
|
next_lesson = self.next_lesson(date)
|
||||||
|
if next_lesson:
|
||||||
|
text += "\n[tt]Next lesson: {0[name]!r] with {0[tutor]} in {0[room]} - starts {1}".format(
|
||||||
|
next_lesson,
|
||||||
|
next_lesson["start_datetime"]
|
||||||
|
)
|
||||||
|
|
||||||
if no_prefix:
|
if no_prefix:
|
||||||
text = text.replace("[tt] ", "")
|
text = text.replace("[tt] ", "")
|
||||||
|
|
Loading…
Reference in a new issue