diff --git a/data/remind.py b/data/remind.py index bfe4768..403fb37 100644 --- a/data/remind.py +++ b/data/remind.py @@ -1,4 +1,5 @@ -from functions import les +from data import schedule +from functions import les, config from functions.database import remind @@ -17,8 +18,6 @@ class Reminders: self.categories = [self.nightly, self.les] def lesEmbed(self): - day, dayDatetime, semester, year = les.parseArgs([])[1:] - - schedule = les.getSchedule(semester, year) - - return les.createEmbed(day, dayDatetime, semester, year, schedule) \ No newline at end of file + dt = les.find_target_date() + s = schedule.Schedule(dt, int(config.get("year")), int(config.get("semester"))) + return s.create_schedule().to_embed() diff --git a/functions/les.py b/functions/les.py index c3a7cfb..628a155 100644 --- a/functions/les.py +++ b/functions/les.py @@ -3,7 +3,7 @@ from functions.timeFormatters import dateTimeNow, weekdayToInt, forward_to_weekd from typing import Optional -def find_target_date(arg: Optional[str]) -> datetime: +def find_target_date(arg: Optional[str] = None) -> datetime: """ Find the requested date out of the user's arguments """