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
@ -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)
dt = les.find_target_date()
s = schedule.Schedule(dt, int(config.get("year")), int(config.get("semester")))
return s.create_schedule().to_embed()

View File

@ -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
"""