diff --git a/modules/administration/echo.py b/modules/administration/echo.py index 59442a1e..186d0529 100644 --- a/modules/administration/echo.py +++ b/modules/administration/echo.py @@ -77,7 +77,7 @@ async def echo_channel( await auxiliary.send_confirm_embed(message="Message sent", channel=ctx.channel) # Don't allow logging if extension is disabled - if "logger" not in configuration.get_config_entry( + if "moderation.logger" not in configuration.get_config_entry( channel.guild.id, "core_enabled_extensions" ): return diff --git a/modules/moderation/modlog.py b/modules/moderation/modlog.py index 7da6fcc5..0dee6f7a 100644 --- a/modules/moderation/modlog.py +++ b/modules/moderation/modlog.py @@ -275,7 +275,7 @@ async def log_ban( guild (discord.Guild): The guild the member was banned from reason (str): The reason for the ban """ - if "modlog" not in configuration.get_config_entry( + if "moderation.modlog" not in configuration.get_config_entry( guild.id, "core_enabled_extensions" ): return @@ -330,7 +330,7 @@ async def log_unban( guild (discord.Guild): The guild the member was unbanned from reason (str): The reason for the unban """ - if "modlog" not in configuration.get_config_entry( + if "moderation.modlog" not in configuration.get_config_entry( guild.id, "core_enabled_extensions" ): return diff --git a/modules/moderation/whois.py b/modules/moderation/whois.py index 525a59bd..c045192b 100644 --- a/modules/moderation/whois.py +++ b/modules/moderation/whois.py @@ -74,14 +74,14 @@ async def whois_command( interaction.guild.id, "core_enabled_extensions" ) - if "application" in enabled_extensions: + if "operation.application" in enabled_extensions: try: await application.command_permission_check(interaction) embed = await add_application_info_field(interaction, member, embed) except (app_commands.MissingAnyRole, app_commands.AppCommandError): pass - if "xp" in enabled_extensions: + if "operation.xp" in enabled_extensions: current_XP = await xp.get_current_XP(self.bot, member, interaction.guild) embed.add_field(name="XP", value=current_XP) @@ -115,7 +115,7 @@ async def whois_command( embeds = [embed] - if "notes" in enabled_extensions: + if "moderation.notes" in enabled_extensions: try: await notes.is_reader(interaction) all_notes = await moderation.get_all_notes( @@ -131,7 +131,10 @@ async def whois_command( except (app_commands.MissingAnyRole, app_commands.AppCommandError): pass - if "moderator" in enabled_extensions and interaction.permissions.kick_members: + if ( + "moderation.moderator" in enabled_extensions + and interaction.permissions.kick_members + ): all_warnings = await moderation.get_all_warnings( self.bot, member, interaction.guild ) diff --git a/modules/operation/application.py b/modules/operation/application.py index c5939c99..697bf83d 100644 --- a/modules/operation/application.py +++ b/modules/operation/application.py @@ -645,7 +645,7 @@ async def check_if_can_apply(self: Self, applicant: discord.Member) -> bool: ) ) # Don't allow applications if extension is disabled - if "application" not in configuration.get_config_entry( + if "operation.application" not in configuration.get_config_entry( applicant.guild.id, "core_enabled_extensions" ): return False diff --git a/modules/operation/factoids.py b/modules/operation/factoids.py index a469bdc1..c86d9961 100644 --- a/modules/operation/factoids.py +++ b/modules/operation/factoids.py @@ -919,7 +919,7 @@ async def send_to_logger( factoid_message (str): The plaintext message content of the factoid """ # Don't allow logging if extension is disabled - if "logger" not in configuration.get_config_entry( + if "moderation.logger" not in configuration.get_config_entry( factoid_caller.guild.id, "core_enabled_extensions" ): return diff --git a/modules/operation/paste.py b/modules/operation/paste.py index e603c745..2a024c38 100644 --- a/modules/operation/paste.py +++ b/modules/operation/paste.py @@ -81,7 +81,7 @@ async def response( if len(content) > length_limit or content.count("\n") > self.max_newlines( length_limit ): - if "automod" in configuration.get_config_entry( + if "moderation.automod" in configuration.get_config_entry( ctx.guild.id, "core_enabled_extensions" ): automod_actions = await automod.run_all_checks(ctx.message) diff --git a/modules/operation/relay.py b/modules/operation/relay.py index e811ee82..ea21ca24 100644 --- a/modules/operation/relay.py +++ b/modules/operation/relay.py @@ -410,7 +410,7 @@ async def send_message_from_irc(self: Self, split_message: dict[str, str]) -> No message=split_message["content"], channel=discord_channel ) - if "automod" in configuration.get_config_entry( + if "moderation.automod" in configuration.get_config_entry( discord_channel.guild.id, "core_enabled_extensions" ) and str(discord_channel.id) in configuration.get_config_entry( discord_channel.guild.id, "automod_channels" @@ -454,7 +454,7 @@ async def send_message_from_irc(self: Self, split_message: dict[str, str]) -> No sent_message = await discord_channel.send(content=mentions_string, embed=embed) # Don't allow logging if extension is disabled - if "logger" not in configuration.get_config_entry( + if "moderation.logger" not in configuration.get_config_entry( discord_channel.guild.id, "core_enabled_extensions" ): return diff --git a/modules/operation/xp.py b/modules/operation/xp.py index 6d1a4f66..31d10075 100644 --- a/modules/operation/xp.py +++ b/modules/operation/xp.py @@ -136,7 +136,7 @@ async def match(self: Self, ctx: commands.Context, _: str) -> bool: return False # Ignore messages that are factoid calls - if "factoids" in configuration.get_config_entry( + if "operation.factoids" in configuration.get_config_entry( ctx.guild.id, "core_enabled_extensions" ): factoid_prefix = configuration.get_config_entry(