diff --git a/classes/election.py b/classes/election.py index 37d95f7..9963650 100644 --- a/classes/election.py +++ b/classes/election.py @@ -366,7 +366,7 @@ class Election: await election_thread.send("This election cycle is now over. Thank you everyone for participating!") 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: """ diff --git a/cogs/clan_messages/__init__.py b/cogs/clan_messages/__init__.py index 9e6bb22..14880e7 100644 --- a/cogs/clan_messages/__init__.py +++ b/cogs/clan_messages/__init__.py @@ -64,7 +64,7 @@ class ClanMessages(commands.Cog, name="Clan Messages"): # if the council members template has changed, update the message 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."} diff --git a/cogs/commands/refresh.py b/cogs/commands/refresh.py index 2831c1d..a42cecc 100644 --- a/cogs/commands/refresh.py +++ b/cogs/commands/refresh.py @@ -61,5 +61,5 @@ class RefreshCog(commands.Cog, name="Refresh Commands"): Args: 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) diff --git a/utils.py b/utils.py index b2d1608..d277fd5 100644 --- a/utils.py +++ b/utils.py @@ -489,7 +489,7 @@ async def edit_clan_message( 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. @@ -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. 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() with Session(engine) as session: