From 1cd9c7a4f74834d799bfc706f5f28cb4147fa0ff Mon Sep 17 00:00:00 2001 From: ToxicKidz <78174417+ToxicKidz@users.noreply.github.com> Date: Thu, 11 Mar 2021 12:24:49 -0500 Subject: change ctx.send_help to ctx.invoke(help_command) ; --- bot/exts/utils/extensions.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'bot/exts/utils/extensions.py') 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: -- cgit v1.2.3