@@ -17,7 +17,29 @@ class MessageBuilder:
|
||||
self.config = config
|
||||
self.cycle = cycle
|
||||
|
||||
def get_vote_start(self) -> str:
|
||||
def build_election_announcement(self) -> list[str]:
|
||||
"""
|
||||
Builds the messages to announce the election is starting.
|
||||
|
||||
Returns:
|
||||
list[str]: A list of message contents in the correct order.
|
||||
"""
|
||||
|
||||
with open("bot_messages/election_announcement.txt", mode="r", encoding="utf8") as file:
|
||||
message = file.read()
|
||||
election_start: datetime = get_datetime(self.config.election_cycles[self.cycle].election_start)
|
||||
term_start: datetime = get_datetime(self.config.election_cycles[self.cycle].term_start)
|
||||
|
||||
message = message.format(
|
||||
clan_council_id=self.config.params.clan_council_role_id,
|
||||
high_council_id=self.config.params.high_council_role_id,
|
||||
election_start_date=election_start.strftime("%B %d"),
|
||||
term_start_date=term_start.strftime("%B %d"),
|
||||
)
|
||||
|
||||
# TODO make sure to split the message on message break.
|
||||
|
||||
def build_vote_start(self) -> str:
|
||||
"""
|
||||
Builds the voting start message out of template and configurations.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user