Make the configs and timeline more clear.

This commit is contained in:
2023-09-13 10:16:50 -04:00
parent 328f3fea78
commit 672df41f19
2 changed files with 8 additions and 4 deletions
+5 -4
View File
@@ -2,7 +2,7 @@
Contains the election cycle class Contains the election cycle class
""" """
from datetime import datetime, timedelta from datetime import datetime
import nextcord import nextcord
from sqlalchemy import select from sqlalchemy import select
@@ -20,6 +20,7 @@ class ElectionCycle:
""" """
def __init__(self, cycle: int, config: DakinyConfig, guild: nextcord.Guild) -> None: 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. 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.term_end: datetime = get_datetime(self.elecion_cycle.term_end)
self.voting_start: datetime = get_datetime(self.elecion_cycle.voting_start) self.voting_start: datetime = get_datetime(self.elecion_cycle.voting_start)
self.voting_end: datetime = get_datetime(self.elecion_cycle.voting_end) 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_announce: datetime = get_datetime(self.elecion_cycle.highcouncil_election_announce)
self.highcouncil_election_start: datetime = self.highcouncil_election_announce + timedelta(days=3) self.highcouncil_election_start: datetime = get_datetime(self.elecion_cycle.highcouncil_election_start)
self.highcouncil_election_end: datetime = self.term_start - timedelta(days=1) self.highcouncil_election_end: datetime = get_datetime(self.elecion_cycle.highcouncil_election_end)
self.guild: nextcord.Guild = guild self.guild: nextcord.Guild = guild
self.election_over: bool = False self.election_over: bool = False
+3
View File
@@ -31,6 +31,9 @@ class ElectionCycle:
""" """
election_start: str election_start: str
highcouncil_election_announce: str
highcouncil_election_end: str
highcouncil_election_start: str
name: str name: str
term_end: str term_end: str
term_start: str term_start: str