diff options
author | 2021-03-11 12:24:49 -0500 | |
---|---|---|
committer | 2021-03-11 12:24:49 -0500 | |
commit | 1cd9c7a4f74834d799bfc706f5f28cb4147fa0ff (patch) | |
tree | 4b54cc75f5ae9059cfd546c3eeb3e75d8cd36def /bot/exts/utils/extensions.py | |
parent | Merge pull request #619 from JagTheFriend/master (diff) |
change ctx.send_help to ctx.invoke(help_command)
;
Diffstat (limited to 'bot/exts/utils/extensions.py')
-rw-r--r-- | bot/exts/utils/extensions.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bot/exts/utils/extensions.py b/bot/exts/utils/extensions.py index bb22c353..f7ff2396 100644 --- a/bot/exts/utils/extensions.py +++ b/bot/exts/utils/extensions.py @@ -77,7 +77,8 @@ class Extensions(commands.Cog): @group(name="extensions", aliases=("ext", "exts", "c", "cogs"), invoke_without_command=True) async def extensions_group(self, ctx: Context) -> None: """Load, unload, reload, and list loaded extensions.""" - await ctx.send_help(ctx.command) + help_command = self.bot.get_command("help") + await ctx.invoke(help_command, ctx.command.name) @extensions_group.command(name="load", aliases=("l",)) async def load_command(self, ctx: Context, *extensions: Extension) -> None: @@ -87,7 +88,8 @@ class Extensions(commands.Cog): If '\*' or '\*\*' is given as the name, all unloaded extensions will be loaded. """ # noqa: W605 if not extensions: - await ctx.send_help(ctx.command) + help_command = self.bot.get_command("help") + await ctx.invoke(help_command, "extensions", ctx.command.name) return if "*" in extensions or "**" in extensions: @@ -104,7 +106,8 @@ class Extensions(commands.Cog): If '\*' or '\*\*' is given as the name, all loaded extensions will be unloaded. """ # noqa: W605 if not extensions: - await ctx.send_help(ctx.command) + help_command = self.bot.get_command("help") + await ctx.invoke(help_command, "extensions", ctx.command.name) return blacklisted = "\n".join(UNLOAD_BLACKLIST & set(extensions)) @@ -130,7 +133,8 @@ class Extensions(commands.Cog): If '\*\*' is given as the name, all extensions, including unloaded ones, will be reloaded. """ # noqa: W605 if not extensions: - await ctx.send_help(ctx.command) + help_command = self.bot.get_command("help") + await ctx.invoke(help_command, "extensions", ctx.command.name) return if "**" in extensions: |