Need a message to track highcouncil votes.

This commit is contained in:
2023-12-16 22:32:34 -05:00
parent be507f3970
commit 8e27e03709
2 changed files with 11 additions and 1 deletions
+10 -1
View File
@@ -297,7 +297,16 @@ class ElectionCycle:
election_thread: nextcord.Thread = self.guild.get_thread( election_thread: nextcord.Thread = self.guild.get_thread(
self.get_election_info().ThreadId self.get_election_info().ThreadId
) )
await election_thread.send(message) vote_msg = await election_thread.send(message)
with Session(engine) as session:
stmt = select(ElectionInformation).where(
ElectionInformation.ElectionCycle
== get_election_cycle_name(self.config)
)
info = session.scalar(stmt)
info.HighCouncilVoteMsgId = vote_msg.id
session.commit()
async def term_start_action(self) -> None: async def term_start_action(self) -> None:
""" """
+1
View File
@@ -2,6 +2,7 @@ CREATE TABLE ElectionInformation(
ElectionCycle varchar(30) not null unique, ElectionCycle varchar(30) not null unique,
ThreadId bigint unsigned not null, ThreadId bigint unsigned not null,
CouncilVoteMsgId bigint unsigned, CouncilVoteMsgId bigint unsigned,
HighCouncilVoteMsgId bigint unsigned,
PRIMARY KEY (ElectionCycle) PRIMARY KEY (ElectionCycle)
); );