mirror of https://github.com/stijndcl/didier
Fix les embed reminder
parent
02ea90ec6a
commit
6ddaa6e488
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue