diff --git a/cogs/events.py b/cogs/events.py index 408ba9c..1c26076 100644 --- a/cogs/events.py +++ b/cogs/events.py @@ -21,6 +21,8 @@ class Events(commands.Cog): @tasks.loop(minutes=30) async def lupupa_warning_task(self): + if not self.bot.is_ready(): + await self.bot.wait_until_ready() lupupa_warning_text = "\N{warning sign} Lupupa warning!!!" if lupupa_warning and datetime.now().strftime("%A") == "Thursday": if self.bot.activity.name != lupupa_warning_text: diff --git a/cogs/timetable.py b/cogs/timetable.py index dc0fb5c..afbeb84 100644 --- a/cogs/timetable.py +++ b/cogs/timetable.py @@ -29,7 +29,7 @@ class TimeTableCog(commands.Cog): def current_lesson(self, date: datetime = None) -> Optional[dict]: date = date or datetime.now() - lessons = self.timetable[date.strftime("%A").lower()] + lessons = self.timetable.get(date.strftime("%A").lower(), []) if not lessons: return for lesson in lessons: