This commit is contained in:
@@ -84,9 +84,7 @@ class NominateDMModal(nextcord.ui.Modal):
|
||||
session.commit()
|
||||
else:
|
||||
msg: nextcord.Message = await interaction.channel.fetch_message(council_elect.discord_manager_speech_id)
|
||||
await msg.edit(
|
||||
content=decorate_dm_nomination(interaction.user.id, self.speech.value if self.speech.value else "")
|
||||
)
|
||||
await msg.edit(content=speech)
|
||||
|
||||
|
||||
class NominateCLModal(nextcord.ui.Modal):
|
||||
@@ -155,9 +153,7 @@ class NominateCLModal(nextcord.ui.Modal):
|
||||
session.commit()
|
||||
else:
|
||||
msg: nextcord.Message = await interaction.channel.fetch_message(council_elect.clan_leader_speech_id)
|
||||
await msg.edit(
|
||||
content=decorate_cl_nomination(interaction.user.id, self.speech.value if self.speech.value else "")
|
||||
)
|
||||
await msg.edit(content=speech)
|
||||
|
||||
|
||||
class NominateHighCouncilView(nextcord.ui.View):
|
||||
@@ -210,12 +206,7 @@ class NominateHighCouncilView(nextcord.ui.View):
|
||||
)
|
||||
council_elect = session.scalar(stmt)
|
||||
|
||||
if council_elect is None:
|
||||
dakiny_logger.error("Did not find member (id: %s) in election %s.", interaction.user.id, election_name)
|
||||
return
|
||||
|
||||
# user needs to exist to get here anyways...
|
||||
if council_elect.discord_manager_speech_id is not None:
|
||||
if council_elect is not None and council_elect.discord_manager_speech_id is not None:
|
||||
usr_nominated = True
|
||||
msg = await interaction.channel.fetch_message(council_elect.discord_manager_speech_id)
|
||||
speech_content = msg.content.split(NOMINEE_SPLITTER)[1]
|
||||
@@ -265,12 +256,7 @@ class NominateHighCouncilView(nextcord.ui.View):
|
||||
)
|
||||
council_elect = session.scalar(stmt)
|
||||
|
||||
if council_elect is None:
|
||||
dakiny_logger.error("Did not find member (id: %s) in election %s.", interaction.user.id, election_name)
|
||||
return
|
||||
|
||||
# user needs to exist to get here anyways...
|
||||
if council_elect.clan_leader_speech_id is not None:
|
||||
if council_elect is not None and council_elect.clan_leader_speech_id is not None:
|
||||
usr_nominated = True
|
||||
msg = await interaction.channel.fetch_message(council_elect.clan_leader_speech_id)
|
||||
speech_content = msg.content.split(NOMINEE_SPLITTER)[1]
|
||||
|
||||
Reference in New Issue
Block a user