Remove config param from get_election_name().
This commit is contained in:
+7
-7
@@ -162,7 +162,7 @@ class Election:
|
||||
"""Performs required actions for when the election cycle starts."""
|
||||
# create new channel for election
|
||||
parent: nextcord.TextChannel = self.guild.get_channel(settings.channel_ids.voting_parent)
|
||||
quarter_name: str = get_election_name(settings)
|
||||
quarter_name: str = get_election_name()
|
||||
|
||||
thread_msg: nextcord.Message = await parent.send(content=quarter_name)
|
||||
|
||||
@@ -205,7 +205,7 @@ class Election:
|
||||
)
|
||||
|
||||
with Session(engine) as session:
|
||||
stmt = select(ElectionInformation).where(ElectionInformation.ElectionName == get_election_name(settings))
|
||||
stmt = select(ElectionInformation).where(ElectionInformation.ElectionName == get_election_name())
|
||||
info = session.scalar(stmt)
|
||||
info.CouncilVoteMsgId = vote_msg.id
|
||||
session.commit()
|
||||
@@ -222,7 +222,7 @@ class Election:
|
||||
|
||||
nominate_msg: nextcord.Message = await election_thread.send(message, view=NominateHighCouncilView(self.guild))
|
||||
|
||||
election_name = get_election_name(settings)
|
||||
election_name = get_election_name()
|
||||
|
||||
with Session(engine) as session:
|
||||
# remove vote button from vote message
|
||||
@@ -272,7 +272,7 @@ class Election:
|
||||
)
|
||||
|
||||
with Session(engine) as session:
|
||||
stmt = select(ElectionInformation).where(ElectionInformation.ElectionName == get_election_name(settings))
|
||||
stmt = select(ElectionInformation).where(ElectionInformation.ElectionName == get_election_name())
|
||||
info = session.scalar(stmt)
|
||||
info.HighCouncilVoteMsgId = vote_msg.id
|
||||
session.commit()
|
||||
@@ -288,7 +288,7 @@ class Election:
|
||||
elect_role: nextcord.Role = self.guild.get_role(settings.role_ids.clan_council_elect)
|
||||
council_role: nextcord.Role = self.guild.get_role(settings.role_ids.clan_council)
|
||||
|
||||
election_name = get_election_name(settings)
|
||||
election_name = get_election_name()
|
||||
|
||||
with Session(engine) as session:
|
||||
# role management
|
||||
@@ -353,7 +353,7 @@ class Election:
|
||||
|
||||
# clear view from vote message
|
||||
stmt = select(ElectionInformation.HighCouncilVoteMsgId).where(
|
||||
ElectionInformation.ElectionName == get_election_name(settings)
|
||||
ElectionInformation.ElectionName == get_election_name()
|
||||
)
|
||||
vote_msg_id = session.scalar(stmt)
|
||||
vote_msg: nextcord.Message = await election_thread.fetch_message(vote_msg_id)
|
||||
@@ -376,7 +376,7 @@ class Election:
|
||||
ElectionInformation: The information from the database about the current election.
|
||||
"""
|
||||
with Session(engine) as session:
|
||||
stmt = select(ElectionInformation).where(ElectionInformation.ElectionName == get_election_name(settings))
|
||||
stmt = select(ElectionInformation).where(ElectionInformation.ElectionName == get_election_name())
|
||||
return session.scalar(stmt)
|
||||
|
||||
async def election_reminder(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user