Remove config param from edit_clan_council_info().
This commit is contained in:
+1
-1
@@ -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:
|
||||
"""
|
||||
|
||||
@@ -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."}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user