Quick bugfix for finding next election. Wouldn't happen in live, but better than hard coding.

This commit is contained in:
2023-09-14 11:52:33 -04:00
parent bdefa035ff
commit fb909c009a
+3 -1
View File
@@ -56,7 +56,9 @@ class ElectionCycle:
with open("bot_messages/election_announcement.txt", mode="r", encoding="utf8") as file:
message = file.read()
next_election = get_datetime(self.config.election_cycles[(self.cycle + 1) % 4].election_start)
next_election = get_datetime(
self.config.election_cycles[(self.cycle + 1) % len(self.config.election_cycles)].election_start
)
message = message.format(
clan_council_id=self.config.params.clan_council_role_id,