Clear voting buttons for highcouncil on end.
build_develop / build (push) Successful in 46s

This commit is contained in:
2023-12-17 14:29:03 -05:00
parent b8e35b5e90
commit d449dc6d1a
+9 -1
View File
@@ -334,8 +334,8 @@ class ElectionCycle:
self.config.params.clan_council_role_id
)
# role management
with Session(engine) as session:
# role management
stmt = (
select(CouncilMembers.MemberId)
.where(
@@ -371,6 +371,14 @@ class ElectionCycle:
self.get_election_info().ThreadId
)
# clear view from vote message
stmt = select(ElectionInformation.HighCouncilVoteMsgId).where(
ElectionInformation.ElectionCycle == get_election_cycle_name(self.config)
)
vote_msg_id = session.scalar(stmt)
vote_msg: nextcord.Message = await election_thread.fetch_message(vote_msg_id)
await vote_msg.edit(view=None)
highcouncil_msg: str = f"Congratulations for our high council members!\n Clan Leader: <@{cl_winner}>\n"
highcouncil_msg += f"Discord Manager: <@{dm_winner}>"
await election_thread.send(highcouncil_msg)