Add speech msg id to database, add the id when submitting a nomination.
This commit is contained in:
@@ -46,11 +46,11 @@ class NominateModal(nextcord.ui.Modal):
|
||||
nomination_message += "========================================================\n\n"
|
||||
nomination_message += self.speech.value
|
||||
|
||||
await interaction.channel.send(nomination_message)
|
||||
msg = await interaction.channel.send(nomination_message)
|
||||
|
||||
with Session(engine) as session:
|
||||
council_member = CouncilMembers(
|
||||
ElectionCycle=get_election_cycle_name(self.config), MemberId=interaction.user.id
|
||||
ElectionCycle=get_election_cycle_name(self.config), MemberId=interaction.user.id, SpeechMsgId=msg.id
|
||||
)
|
||||
session.add(council_member)
|
||||
session.commit()
|
||||
|
||||
@@ -7,6 +7,7 @@ CREATE TABLE ElectionInformation(
|
||||
CREATE TABLE CouncilMembers(
|
||||
ElectionCycle varchar(30) not null unique,
|
||||
MemberId bigint unsigned not null,
|
||||
SpeechMsgId bigint unsigned not null,
|
||||
Elected boolean DEFAULT false,
|
||||
HighCouncilElect boolean DEFAULT false,
|
||||
DiscordManager boolean DEFAULT false,
|
||||
|
||||
Reference in New Issue
Block a user