From 21d392306c3d5a12a5395c594e9b2c7e6b660594 Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Mon, 5 Jan 2026 09:20:33 -0500 Subject: [PATCH 1/2] Remove the old help menu --- documentation/Extension-howto.md | 6 +-- techsupport_bot/commands/chatgpt.py | 4 +- techsupport_bot/commands/commandcontrol.py | 4 +- techsupport_bot/commands/config.py | 4 +- techsupport_bot/commands/duck.py | 4 +- techsupport_bot/commands/echo.py | 4 +- techsupport_bot/commands/emoji.py | 2 +- techsupport_bot/commands/extension.py | 4 +- techsupport_bot/commands/factoids.py | 4 +- techsupport_bot/commands/gate.py | 4 +- techsupport_bot/commands/google.py | 4 +- techsupport_bot/commands/grab.py | 3 +- techsupport_bot/commands/hangman.py | 4 +- techsupport_bot/commands/listen.py | 4 +- techsupport_bot/commands/modmail.py | 4 +- techsupport_bot/commands/poll.py | 8 +--- techsupport_bot/commands/relay.py | 2 +- techsupport_bot/commands/rules.py | 4 +- techsupport_bot/commands/set.py | 4 +- techsupport_bot/commands/xkcd.py | 5 +- techsupport_bot/core/auxiliary.py | 56 ---------------------- 21 files changed, 21 insertions(+), 117 deletions(-) diff --git a/documentation/Extension-howto.md b/documentation/Extension-howto.md index 586620ec3..1b7d95039 100644 --- a/documentation/Extension-howto.md +++ b/documentation/Extension-howto.md @@ -159,15 +159,11 @@ Even though it executes no code, we add an automatic help trigger that is called description="Long-description", ) async def command-group-name(): - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... ``` This defines a command group that is called using `.command-group-name `. The help is included and called if it is called by itself, should be included unless the command group itself serves a purpose. -Note: The help call uses `self.module[11:]` since that is the most reliable way to get the actual extension name, since it always contains `extensions:` - ## Command definition diff --git a/techsupport_bot/commands/chatgpt.py b/techsupport_bot/commands/chatgpt.py index 8628af51b..c0e6b1353 100644 --- a/techsupport_bot/commands/chatgpt.py +++ b/techsupport_bot/commands/chatgpt.py @@ -187,9 +187,7 @@ async def gptutil(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): Context of the invokation """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @gptutil.command( diff --git a/techsupport_bot/commands/commandcontrol.py b/techsupport_bot/commands/commandcontrol.py index cb42bf0a5..99f40f9b2 100644 --- a/techsupport_bot/commands/commandcontrol.py +++ b/techsupport_bot/commands/commandcontrol.py @@ -45,9 +45,7 @@ async def command_group(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @command_group.command( diff --git a/techsupport_bot/commands/config.py b/techsupport_bot/commands/config.py index 0da600ffd..abf864f6d 100644 --- a/techsupport_bot/commands/config.py +++ b/techsupport_bot/commands/config.py @@ -41,9 +41,7 @@ async def config_command(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): the context object for the message """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @commands.has_permissions(administrator=True) @commands.guild_only() diff --git a/techsupport_bot/commands/duck.py b/techsupport_bot/commands/duck.py index 2552b1a67..176c1e5fc 100644 --- a/techsupport_bot/commands/duck.py +++ b/techsupport_bot/commands/duck.py @@ -478,9 +478,7 @@ async def duck(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @commands.guild_only() diff --git a/techsupport_bot/commands/echo.py b/techsupport_bot/commands/echo.py index b83ad8a62..09cbca9ea 100644 --- a/techsupport_bot/commands/echo.py +++ b/techsupport_bot/commands/echo.py @@ -44,9 +44,7 @@ async def echo(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @echo.command( diff --git a/techsupport_bot/commands/emoji.py b/techsupport_bot/commands/emoji.py index 56d496d79..eb6d482c3 100644 --- a/techsupport_bot/commands/emoji.py +++ b/techsupport_bot/commands/emoji.py @@ -174,7 +174,7 @@ async def emoji(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @emoji.command( diff --git a/techsupport_bot/commands/extension.py b/techsupport_bot/commands/extension.py index 80fdf9daa..446b78b92 100644 --- a/techsupport_bot/commands/extension.py +++ b/techsupport_bot/commands/extension.py @@ -127,9 +127,7 @@ async def extension_group(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @extension_group.command( diff --git a/techsupport_bot/commands/factoids.py b/techsupport_bot/commands/factoids.py index 0cb415e9c..408c4d27c 100644 --- a/techsupport_bot/commands/factoids.py +++ b/techsupport_bot/commands/factoids.py @@ -1291,9 +1291,7 @@ async def factoid(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @commands.check(has_manage_factoids_role) diff --git a/techsupport_bot/commands/gate.py b/techsupport_bot/commands/gate.py index d36d8151a..a23a00dbc 100644 --- a/techsupport_bot/commands/gate.py +++ b/techsupport_bot/commands/gate.py @@ -184,9 +184,7 @@ async def gate_command(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @commands.has_permissions(manage_messages=True) @commands.guild_only() diff --git a/techsupport_bot/commands/google.py b/techsupport_bot/commands/google.py index 79ffb2e00..8683be8a8 100644 --- a/techsupport_bot/commands/google.py +++ b/techsupport_bot/commands/google.py @@ -90,9 +90,7 @@ async def google(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @commands.guild_only() diff --git a/techsupport_bot/commands/grab.py b/techsupport_bot/commands/grab.py index 1d278a858..ae5fac5d5 100644 --- a/techsupport_bot/commands/grab.py +++ b/techsupport_bot/commands/grab.py @@ -160,8 +160,7 @@ async def grabs(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @commands.guild_only() diff --git a/techsupport_bot/commands/hangman.py b/techsupport_bot/commands/hangman.py index 555acba30..2af9d4344 100644 --- a/techsupport_bot/commands/hangman.py +++ b/techsupport_bot/commands/hangman.py @@ -332,9 +332,7 @@ async def hangman(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... hangman_app_group: app_commands.Group = app_commands.Group( name="hangman", description="Command Group for the Hangman Extension" diff --git a/techsupport_bot/commands/listen.py b/techsupport_bot/commands/listen.py index 30b218ac0..6554023f5 100644 --- a/techsupport_bot/commands/listen.py +++ b/techsupport_bot/commands/listen.py @@ -265,9 +265,7 @@ async def listen(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): the context object for the message """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @listen.command( description="Starts a listening job", usage="[src-channel] [dst-channel]" diff --git a/techsupport_bot/commands/modmail.py b/techsupport_bot/commands/modmail.py index 86f6301ae..5163fb35a 100644 --- a/techsupport_bot/commands/modmail.py +++ b/techsupport_bot/commands/modmail.py @@ -1283,9 +1283,7 @@ async def modmail(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... def modmail_commands_list(self: Self) -> list[tuple[str, str, str, str]]: """ diff --git a/techsupport_bot/commands/poll.py b/techsupport_bot/commands/poll.py index 27b1c381b..de42a90ac 100644 --- a/techsupport_bot/commands/poll.py +++ b/techsupport_bot/commands/poll.py @@ -135,9 +135,7 @@ async def poll(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @poll.command( @@ -335,9 +333,7 @@ async def strawpoll(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @strawpoll.command( diff --git a/techsupport_bot/commands/relay.py b/techsupport_bot/commands/relay.py index 7680e03c7..21555ffc7 100644 --- a/techsupport_bot/commands/relay.py +++ b/techsupport_bot/commands/relay.py @@ -155,7 +155,7 @@ async def irc_base(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run """ - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @irc_base.command(name="maps", description="List all the maps for IRC") async def irc_maps(self: Self, ctx: commands.Context) -> None: diff --git a/techsupport_bot/commands/rules.py b/techsupport_bot/commands/rules.py index 246644faa..177dc6332 100644 --- a/techsupport_bot/commands/rules.py +++ b/techsupport_bot/commands/rules.py @@ -44,9 +44,7 @@ async def rule_group(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... async def get_guild_rules(self: Self, guild: discord.Guild) -> munch.Munch: """Gets the munchified rules for a given guild. diff --git a/techsupport_bot/commands/set.py b/techsupport_bot/commands/set.py index dee397730..717e6dd7f 100644 --- a/techsupport_bot/commands/set.py +++ b/techsupport_bot/commands/set.py @@ -46,9 +46,7 @@ async def set_group(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... @auxiliary.with_typing @set_group.command( diff --git a/techsupport_bot/commands/xkcd.py b/techsupport_bot/commands/xkcd.py index 987d3ffa5..9f42d3bda 100644 --- a/techsupport_bot/commands/xkcd.py +++ b/techsupport_bot/commands/xkcd.py @@ -53,9 +53,6 @@ async def xkcd( """ if number: await self.numbered_comic(ctx, number) - else: - # Executed if there are no/invalid args supplied - await auxiliary.extension_help(self, ctx, self.__module__[9:]) @xkcd.command( name="random", @@ -116,7 +113,7 @@ async def shadow_number(self: Self, ctx: commands.Context, *, _: int) -> None: Args: ctx (commands.Context): The context generate by this command """ - await auxiliary.extension_help(self, ctx, self.__module__[9:]) + ... async def numbered_comic(self: Self, ctx: commands.Context, number: int) -> None: """Gets the comic from XKCD by number diff --git a/techsupport_bot/core/auxiliary.py b/techsupport_bot/core/auxiliary.py index c724cbfbd..3c5e3251b 100644 --- a/techsupport_bot/core/auxiliary.py +++ b/techsupport_bot/core/auxiliary.py @@ -492,62 +492,6 @@ def get_help_embed_for_extension( return embed -async def extension_help( - cog: cogs.BaseCog, ctx: commands.Context, extension_name: str -) -> None: - """Automatically prompts for help if improper syntax for an extension is called. - - The format for extension_name that's used is `self.__module__[11:]`, because - all extensions have the value set to extension., it's the most reliable - way to get the extension name regardless of aliases - - Args: - cog (cogs.BaseCog): The cog that needs the commands put into a help menu - ctx (commands.Context): context of the message - extension_name (str): the name of the extension to show the help for - """ - - # Checks whether the first given argument is valid if an argument is supplied - if len(ctx.message.content.split()) > 1: - arg = ctx.message.content.split().pop(1) - valid_commands = [] - valid_args = [] - # Loops through each command for said extension - for command in cog.bot.get_cog(cog.qualified_name).walk_commands(): - valid_commands.append(command.name) - valid_args.append(command.aliases) - - # Flatmaps nested lists, because aliases are returned as lists. - valid_args = [item for sublist in valid_args for item in sublist] - - # If argument isn't a valid command or alias, wait for confirmation to show help page - if arg not in valid_args and arg not in valid_commands: - view = ui.Confirm() - await view.send( - message="Invalid argument! Show help command?", - channel=ctx.channel, - author=ctx.author, - timeout=10, - ) - await view.wait() - if view.value != ui.ConfirmResponse.CONFIRMED: - return - - await ctx.send( - embed=get_help_embed_for_extension( - cog, extension_name, await cog.bot.get_prefix(ctx.message) - ) - ) - - # Executed if no arguments were supplied - elif len(ctx.message.content.split()) == 1: - await ctx.send( - embed=get_help_embed_for_extension( - cog, extension_name, await cog.bot.get_prefix(ctx.message) - ) - ) - - async def bot_admin_check_context(ctx: commands.Context) -> bool: """A simple check to put on a prefix command function to ensure that the caller is an admin From 134894f42e718bdd22a569b6a11916df4ed1680c Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Mon, 5 Jan 2026 09:30:16 -0500 Subject: [PATCH 2/2] Formatting --- documentation/Extension-howto.md | 2 +- techsupport_bot/commands/chatgpt.py | 2 +- techsupport_bot/commands/commandcontrol.py | 2 +- techsupport_bot/commands/config.py | 2 +- techsupport_bot/commands/duck.py | 2 +- techsupport_bot/commands/echo.py | 2 +- techsupport_bot/commands/emoji.py | 2 +- techsupport_bot/commands/extension.py | 2 +- techsupport_bot/commands/factoids.py | 2 +- techsupport_bot/commands/gate.py | 2 +- techsupport_bot/commands/google.py | 2 +- techsupport_bot/commands/grab.py | 2 +- techsupport_bot/commands/hangman.py | 2 +- techsupport_bot/commands/listen.py | 2 +- techsupport_bot/commands/modmail.py | 2 +- techsupport_bot/commands/poll.py | 4 ++-- techsupport_bot/commands/relay.py | 2 +- techsupport_bot/commands/rules.py | 2 +- techsupport_bot/commands/set.py | 2 +- techsupport_bot/commands/xkcd.py | 2 +- techsupport_bot/core/auxiliary.py | 1 - 21 files changed, 21 insertions(+), 22 deletions(-) diff --git a/documentation/Extension-howto.md b/documentation/Extension-howto.md index 1b7d95039..74641cbbc 100644 --- a/documentation/Extension-howto.md +++ b/documentation/Extension-howto.md @@ -159,7 +159,7 @@ Even though it executes no code, we add an automatic help trigger that is called description="Long-description", ) async def command-group-name(): - ... + return ``` This defines a command group that is called using `.command-group-name `. The help is included and called if it is called by itself, should be included unless the command group itself serves a purpose. diff --git a/techsupport_bot/commands/chatgpt.py b/techsupport_bot/commands/chatgpt.py index c0e6b1353..1784956f3 100644 --- a/techsupport_bot/commands/chatgpt.py +++ b/techsupport_bot/commands/chatgpt.py @@ -187,7 +187,7 @@ async def gptutil(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): Context of the invokation """ - ... + return @auxiliary.with_typing @gptutil.command( diff --git a/techsupport_bot/commands/commandcontrol.py b/techsupport_bot/commands/commandcontrol.py index 99f40f9b2..c3cf9b074 100644 --- a/techsupport_bot/commands/commandcontrol.py +++ b/techsupport_bot/commands/commandcontrol.py @@ -45,7 +45,7 @@ async def command_group(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @auxiliary.with_typing @command_group.command( diff --git a/techsupport_bot/commands/config.py b/techsupport_bot/commands/config.py index abf864f6d..a7571297c 100644 --- a/techsupport_bot/commands/config.py +++ b/techsupport_bot/commands/config.py @@ -41,7 +41,7 @@ async def config_command(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): the context object for the message """ - ... + return @commands.has_permissions(administrator=True) @commands.guild_only() diff --git a/techsupport_bot/commands/duck.py b/techsupport_bot/commands/duck.py index 176c1e5fc..f7433e5e3 100644 --- a/techsupport_bot/commands/duck.py +++ b/techsupport_bot/commands/duck.py @@ -478,7 +478,7 @@ async def duck(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @auxiliary.with_typing @commands.guild_only() diff --git a/techsupport_bot/commands/echo.py b/techsupport_bot/commands/echo.py index 09cbca9ea..92f585774 100644 --- a/techsupport_bot/commands/echo.py +++ b/techsupport_bot/commands/echo.py @@ -44,7 +44,7 @@ async def echo(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @auxiliary.with_typing @echo.command( diff --git a/techsupport_bot/commands/emoji.py b/techsupport_bot/commands/emoji.py index eb6d482c3..536c79e0a 100644 --- a/techsupport_bot/commands/emoji.py +++ b/techsupport_bot/commands/emoji.py @@ -174,7 +174,7 @@ async def emoji(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @auxiliary.with_typing @emoji.command( diff --git a/techsupport_bot/commands/extension.py b/techsupport_bot/commands/extension.py index 446b78b92..7cd53ef11 100644 --- a/techsupport_bot/commands/extension.py +++ b/techsupport_bot/commands/extension.py @@ -127,7 +127,7 @@ async def extension_group(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @auxiliary.with_typing @extension_group.command( diff --git a/techsupport_bot/commands/factoids.py b/techsupport_bot/commands/factoids.py index 408c4d27c..5490f7f6d 100644 --- a/techsupport_bot/commands/factoids.py +++ b/techsupport_bot/commands/factoids.py @@ -1291,7 +1291,7 @@ async def factoid(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @auxiliary.with_typing @commands.check(has_manage_factoids_role) diff --git a/techsupport_bot/commands/gate.py b/techsupport_bot/commands/gate.py index a23a00dbc..48c921b2c 100644 --- a/techsupport_bot/commands/gate.py +++ b/techsupport_bot/commands/gate.py @@ -184,7 +184,7 @@ async def gate_command(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @commands.has_permissions(manage_messages=True) @commands.guild_only() diff --git a/techsupport_bot/commands/google.py b/techsupport_bot/commands/google.py index 8683be8a8..259e222b3 100644 --- a/techsupport_bot/commands/google.py +++ b/techsupport_bot/commands/google.py @@ -90,7 +90,7 @@ async def google(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @auxiliary.with_typing @commands.guild_only() diff --git a/techsupport_bot/commands/grab.py b/techsupport_bot/commands/grab.py index ae5fac5d5..fcdb9c60d 100644 --- a/techsupport_bot/commands/grab.py +++ b/techsupport_bot/commands/grab.py @@ -160,7 +160,7 @@ async def grabs(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @auxiliary.with_typing @commands.guild_only() diff --git a/techsupport_bot/commands/hangman.py b/techsupport_bot/commands/hangman.py index 2af9d4344..aafef1522 100644 --- a/techsupport_bot/commands/hangman.py +++ b/techsupport_bot/commands/hangman.py @@ -332,7 +332,7 @@ async def hangman(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return hangman_app_group: app_commands.Group = app_commands.Group( name="hangman", description="Command Group for the Hangman Extension" diff --git a/techsupport_bot/commands/listen.py b/techsupport_bot/commands/listen.py index 6554023f5..ac962defa 100644 --- a/techsupport_bot/commands/listen.py +++ b/techsupport_bot/commands/listen.py @@ -265,7 +265,7 @@ async def listen(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): the context object for the message """ - ... + return @listen.command( description="Starts a listening job", usage="[src-channel] [dst-channel]" diff --git a/techsupport_bot/commands/modmail.py b/techsupport_bot/commands/modmail.py index 5163fb35a..027a9e9dd 100644 --- a/techsupport_bot/commands/modmail.py +++ b/techsupport_bot/commands/modmail.py @@ -1283,7 +1283,7 @@ async def modmail(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return def modmail_commands_list(self: Self) -> list[tuple[str, str, str, str]]: """ diff --git a/techsupport_bot/commands/poll.py b/techsupport_bot/commands/poll.py index de42a90ac..84a87b0eb 100644 --- a/techsupport_bot/commands/poll.py +++ b/techsupport_bot/commands/poll.py @@ -135,7 +135,7 @@ async def poll(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @auxiliary.with_typing @poll.command( @@ -333,7 +333,7 @@ async def strawpoll(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @auxiliary.with_typing @strawpoll.command( diff --git a/techsupport_bot/commands/relay.py b/techsupport_bot/commands/relay.py index 21555ffc7..4aee8d976 100644 --- a/techsupport_bot/commands/relay.py +++ b/techsupport_bot/commands/relay.py @@ -155,7 +155,7 @@ async def irc_base(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run """ - ... + return @irc_base.command(name="maps", description="List all the maps for IRC") async def irc_maps(self: Self, ctx: commands.Context) -> None: diff --git a/techsupport_bot/commands/rules.py b/techsupport_bot/commands/rules.py index 177dc6332..620295627 100644 --- a/techsupport_bot/commands/rules.py +++ b/techsupport_bot/commands/rules.py @@ -44,7 +44,7 @@ async def rule_group(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return async def get_guild_rules(self: Self, guild: discord.Guild) -> munch.Munch: """Gets the munchified rules for a given guild. diff --git a/techsupport_bot/commands/set.py b/techsupport_bot/commands/set.py index 717e6dd7f..eb25d5130 100644 --- a/techsupport_bot/commands/set.py +++ b/techsupport_bot/commands/set.py @@ -46,7 +46,7 @@ async def set_group(self: Self, ctx: commands.Context) -> None: Args: ctx (commands.Context): The context in which the command was run in """ - ... + return @auxiliary.with_typing @set_group.command( diff --git a/techsupport_bot/commands/xkcd.py b/techsupport_bot/commands/xkcd.py index 9f42d3bda..e68018f7b 100644 --- a/techsupport_bot/commands/xkcd.py +++ b/techsupport_bot/commands/xkcd.py @@ -113,7 +113,7 @@ async def shadow_number(self: Self, ctx: commands.Context, *, _: int) -> None: Args: ctx (commands.Context): The context generate by this command """ - ... + return async def numbered_comic(self: Self, ctx: commands.Context, number: int) -> None: """Gets the comic from XKCD by number diff --git a/techsupport_bot/core/auxiliary.py b/techsupport_bot/core/auxiliary.py index 3c5e3251b..5c187c7d5 100644 --- a/techsupport_bot/core/auxiliary.py +++ b/techsupport_bot/core/auxiliary.py @@ -11,7 +11,6 @@ import discord import munch -import ui from discord import app_commands from discord.ext import commands