diff --git a/classes/election_cycle.py b/classes/election_cycle.py index 13b654e..4b5f5ac 100644 --- a/classes/election_cycle.py +++ b/classes/election_cycle.py @@ -2,7 +2,7 @@ Contains the election cycle class """ -from datetime import datetime, timedelta +from datetime import datetime import nextcord from sqlalchemy import select @@ -20,6 +20,7 @@ class ElectionCycle: """ def __init__(self, cycle: int, config: DakinyConfig, guild: nextcord.Guild) -> None: + # TODO update """ Generates all dates relevant to the election cycle from input election start, term start and end dates. @@ -37,9 +38,9 @@ class ElectionCycle: self.term_end: datetime = get_datetime(self.elecion_cycle.term_end) self.voting_start: datetime = get_datetime(self.elecion_cycle.voting_start) self.voting_end: datetime = get_datetime(self.elecion_cycle.voting_end) - self.highcouncil_election_announce: datetime = self.voting_end + timedelta(days=1) - self.highcouncil_election_start: datetime = self.highcouncil_election_announce + timedelta(days=3) - self.highcouncil_election_end: datetime = self.term_start - timedelta(days=1) + self.highcouncil_election_announce: datetime = get_datetime(self.elecion_cycle.highcouncil_election_announce) + self.highcouncil_election_start: datetime = get_datetime(self.elecion_cycle.highcouncil_election_start) + self.highcouncil_election_end: datetime = get_datetime(self.elecion_cycle.highcouncil_election_end) self.guild: nextcord.Guild = guild self.election_over: bool = False diff --git a/config.py b/config.py index 9e00c7d..9f31c11 100644 --- a/config.py +++ b/config.py @@ -31,6 +31,9 @@ class ElectionCycle: """ election_start: str + highcouncil_election_announce: str + highcouncil_election_end: str + highcouncil_election_start: str name: str term_end: str term_start: str