Need a message to track highcouncil votes.
This commit is contained in:
@@ -297,7 +297,16 @@ class ElectionCycle:
|
||||
election_thread: nextcord.Thread = self.guild.get_thread(
|
||||
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:
|
||||
"""
|
||||
|
||||
@@ -2,6 +2,7 @@ CREATE TABLE ElectionInformation(
|
||||
ElectionCycle varchar(30) not null unique,
|
||||
ThreadId bigint unsigned not null,
|
||||
CouncilVoteMsgId bigint unsigned,
|
||||
HighCouncilVoteMsgId bigint unsigned,
|
||||
PRIMARY KEY (ElectionCycle)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user