Fix les embed reminder

pull/85/head
Stijn De Clercq 2021-08-09 00:40:15 +02:00
parent 02ea90ec6a
commit 6ddaa6e488
2 changed files with 6 additions and 7 deletions

View File

@ -1,4 +1,5 @@
from functions import les from data import schedule
from functions import les, config
from functions.database import remind from functions.database import remind
@ -17,8 +18,6 @@ class Reminders:
self.categories = [self.nightly, self.les] self.categories = [self.nightly, self.les]
def lesEmbed(self): def lesEmbed(self):
day, dayDatetime, semester, year = les.parseArgs([])[1:] dt = les.find_target_date()
s = schedule.Schedule(dt, int(config.get("year")), int(config.get("semester")))
schedule = les.getSchedule(semester, year) return s.create_schedule().to_embed()
return les.createEmbed(day, dayDatetime, semester, year, schedule)

View File

@ -3,7 +3,7 @@ from functions.timeFormatters import dateTimeNow, weekdayToInt, forward_to_weekd
from typing import Optional 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 Find the requested date out of the user's arguments
""" """