From 0fb92097d49cc992f5c599f049fcc5b9b29478a9 Mon Sep 17 00:00:00 2001 From: Slipstream Date: Sun, 8 Jun 2025 20:31:51 -0600 Subject: [PATCH] update aimod --- cogs/aimod_cog.py | 52 ----------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/cogs/aimod_cog.py b/cogs/aimod_cog.py index 08a1ffd..e85aede 100644 --- a/cogs/aimod_cog.py +++ b/cogs/aimod_cog.py @@ -841,58 +841,6 @@ class AIModerationCog(commands.Cog): "Moderation instructions have been reset to the default.", ephemeral=False ) - @config_subgroup.command( - name="update_instructions", - description="Update moderation instructions from the specified channel.", - ) - @app_commands.describe( - channel="The channel containing the moderation instructions." - ) - @app_commands.checks.has_permissions(administrator=True) - async def update_instructions( - self, interaction: discord.Interaction, channel: discord.TextChannel - ) -> None: - """Pull moderation instructions from a channel and update the global config.""" - messages = [] - async for msg in channel.history( - limit=MAX_RULE_MESSAGES + 1, oldest_first=True - ): - if msg.content: - messages.append(msg.content) - if len(messages) > MAX_RULE_MESSAGES: - await interaction.response.send_message( - f"Channel has more than {MAX_RULE_MESSAGES} messages." - " Please consolidate your instructions into fewer messages.", - ephemeral=True, - ) - return - - if not messages: - await interaction.response.send_message( - "No messages found in that channel.", ephemeral=True - ) - return - - instructions_text = "\n\n".join(messages).strip() - aimod_config_module.MODERATION_INSTRUCTIONS = instructions_text - await interaction.response.send_message( - f"Moderation instructions updated from {channel.mention}.", ephemeral=False - ) - - @config_subgroup.command( - name="reset_instructions", - description="Reset moderation instructions to the default version.", - ) - @app_commands.checks.has_permissions(administrator=True) - async def reset_instructions(self, interaction: discord.Interaction) -> None: - """Reset moderation instructions to the default string.""" - aimod_config_module.MODERATION_INSTRUCTIONS = ( - aimod_config_module.DEFAULT_MODERATION_INSTRUCTIONS - ) - await interaction.response.send_message( - "Moderation instructions have been reset to the default.", ephemeral=False - ) - @infractions_subgroup.command( name="view", description="View a user's AI moderation infraction history (mod/admin only).",