Remove config param from edit_clan_council_info().

This commit is contained in:
2024-09-03 19:33:13 -04:00
parent 06d81a4604
commit 3a47f58382
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -366,7 +366,7 @@ class Election:
await election_thread.send("This election cycle is now over. Thank you everyone for participating!") await election_thread.send("This election cycle is now over. Thank you everyone for participating!")
await election_thread.edit(archived=True, locked=True) await election_thread.edit(archived=True, locked=True)
await edit_clan_council_info(self.guild, settings) await edit_clan_council_info(self.guild)
def get_election_info(self) -> ElectionInformation: def get_election_info(self) -> ElectionInformation:
""" """
+1 -1
View File
@@ -64,7 +64,7 @@ class ClanMessages(commands.Cog, name="Clan Messages"):
# if the council members template has changed, update the message # if the council members template has changed, update the message
if "council_members.txt" in template_updates: if "council_members.txt" in template_updates:
await edit_clan_council_info(self.bot.get_guild(self.config.params.guild_id), self.config) await edit_clan_council_info(self.bot.get_guild(self.config.params.guild_id))
return {"message": "Successfully updated all discord messages."} return {"message": "Successfully updated all discord messages."}
+1 -1
View File
@@ -61,5 +61,5 @@ class RefreshCog(commands.Cog, name="Refresh Commands"):
Args: Args:
interaction (nextcord.Interaction): Interaction with the command. interaction (nextcord.Interaction): Interaction with the command.
""" """
await edit_clan_council_info(interaction.guild, self.bot.config) await edit_clan_council_info(interaction.guild)
await interaction.response.send_message("Clan Council Info message updated.", ephemeral=True) await interaction.response.send_message("Clan Council Info message updated.", ephemeral=True)
+2 -2
View File
@@ -489,7 +489,7 @@ async def edit_clan_message(
session.commit() session.commit()
async def edit_clan_council_info(guild: nextcord.Guild, config: DakinySettings) -> None: async def edit_clan_council_info(guild: nextcord.Guild) -> None:
""" """
Gets the winners of the elections and updates the permanent message that states the current council. Gets the winners of the elections and updates the permanent message that states the current council.
@@ -497,7 +497,7 @@ async def edit_clan_council_info(guild: nextcord.Guild, config: DakinySettings)
guild (nextcord.Guild): Guild object that to use to get channel. guild (nextcord.Guild): Guild object that to use to get channel.
config (DakinyConfig): Configs config (DakinyConfig): Configs
""" """
clan_info_channel: nextcord.TextChannel = await guild.fetch_channel(config.params.clan_info_channel_id) clan_info_channel: nextcord.TextChannel = await guild.fetch_channel(settings.channel_ids.clan_info)
election_name = get_election_name() election_name = get_election_name()
with Session(engine) as session: with Session(engine) as session: