From 4081d8b81feeb144a113ac36cf49ac18fb467a4e Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Tue, 9 Jun 2026 14:45:10 -0700 Subject: [PATCH] Remove the thread subgroup from the modmail commands --- modules/moderation/modmail.py | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/modules/moderation/modmail.py b/modules/moderation/modmail.py index 8a9ffdaf..087817e0 100644 --- a/modules/moderation/modmail.py +++ b/modules/moderation/modmail.py @@ -870,19 +870,12 @@ class Modmail(cogs.BaseCog): Attributes: modmail_commands (app_commands.Group): The group for the /modmail commands - modmail_thread_commands (app_commands.Group): The sub-group for /modmail thread """ modmail_commands: app_commands.Group = app_commands.Group( name="modmail", description="The group of modmail commands" ) - modmail_thread_commands: app_commands.Group = app_commands.Group( - name="thread", - description="Modmail commands specific to use in threads", - parent=modmail_commands, - ) - def __init__(self: Self, bot: bot.TechSupportBot) -> None: # Init is used to make variables global so they can be used on the modmail side super().__init__(bot=bot) @@ -1282,7 +1275,7 @@ def pre_thread_checks(self: Self, interaction: discord.Interaction) -> bool: return True @app_commands.check(has_modmail_management_role) - @modmail_thread_commands.command( + @modmail_commands.command( name="alias", description="Sends a specified alias as an anonymous reply in the thread", ) @@ -1350,7 +1343,7 @@ async def alias_calling_autocomplete( ][:10] @app_commands.check(has_modmail_management_role) - @modmail_thread_commands.command( + @modmail_commands.command( name="close", description="Instantly closes a modmail thead", ) @@ -1383,7 +1376,7 @@ async def thread_close(self: Self, interaction: discord.Interaction) -> None: ) @app_commands.check(has_modmail_management_role) - @modmail_thread_commands.command( + @modmail_commands.command( name="sclose", description="Instantly closes a modmail thead silently", ) @@ -1416,7 +1409,7 @@ async def thread_sclose(self: Self, interaction: discord.Interaction) -> None: ) @app_commands.check(has_modmail_management_role) - @modmail_thread_commands.command( + @modmail_commands.command( name="tclose", description="Closes a modmail thread after 5 minutes, and sends a message to the user", ) @@ -1465,7 +1458,7 @@ async def thread_tclose(self: Self, interaction: discord.Interaction) -> None: ) @app_commands.check(has_modmail_management_role) - @modmail_thread_commands.command( + @modmail_commands.command( name="tsclose", description="Silently closes a modmail thread after 5 minutes", ) @@ -1513,7 +1506,7 @@ async def thread_tsclose(self: Self, interaction: discord.Interaction) -> None: ) @app_commands.check(has_modmail_management_role) - @modmail_thread_commands.command( + @modmail_commands.command( name="areply", description="Replies to a modmail thread anonymously", ) @@ -1554,7 +1547,7 @@ async def thread_areply( ) @app_commands.check(has_modmail_management_role) - @modmail_thread_commands.command( + @modmail_commands.command( name="reply", description="Replies to a modmail thread", ) @@ -1595,7 +1588,7 @@ async def thread_reply( ) @app_commands.check(has_modmail_management_role) - @modmail_thread_commands.command( + @modmail_commands.command( name="factoid", description="Replies anonymously to a thread with the text of a given factoid", ) @@ -1679,7 +1672,7 @@ async def thread_factoid( ) @app_commands.check(has_modmail_management_role) - @modmail_thread_commands.command( + @modmail_commands.command( name="rule", description="Replies anonymously to a thread with the text of a given rule", )