From 074f3861a595d52fbe8de590f15bd5ca444746e9 Mon Sep 17 00:00:00 2001 From: nex <53234499+EEKIM10@users.noreply.github.com> Date: Sun, 30 Oct 2022 15:53:36 +0000 Subject: [PATCH] Ignore blocking loop --- cogs/timetable.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cogs/timetable.py b/cogs/timetable.py index 2f46cee..00f48b7 100644 --- a/cogs/timetable.py +++ b/cogs/timetable.py @@ -140,10 +140,16 @@ class TimeTableCog(commands.Cog): if not lesson: next_lesson = self.next_lesson(date) if not next_lesson: - next_lesson = await asyncio.to_thread( - self.absolute_next_lesson, - new_method=True - ) + # next_lesson = await asyncio.to_thread( + # self.absolute_next_lesson, + # new_method=True + # ) + next_lesson = { + "name": "unknown", + "tutor": "unknown", + "room": "unknown", + "start_datetime": datetime.max + } text = "[tt] No more lessons today!\n" \ f"[tt] Next Lesson: {next_lesson['name']!r} with {next_lesson['tutor']} in " \ f"{next_lesson['room']} - " \