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(
|
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:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -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)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user