From f07b78bd0da494a874fa8feb65a4b893f0258de2 Mon Sep 17 00:00:00 2001 From: Toby Harradine Date: Sun, 30 Sep 2018 14:19:25 +1000 Subject: [PATCH] Fix help command with cogs (#2156) This bug was introduced in #2122 (whoops) Signed-off-by: Toby Harradine --- redbot/core/help_formatter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/redbot/core/help_formatter.py b/redbot/core/help_formatter.py index a0eac3882..0270196d4 100644 --- a/redbot/core/help_formatter.py +++ b/redbot/core/help_formatter.py @@ -313,7 +313,10 @@ async def help(ctx: commands.Context, *, command_name: str = ""): # help by itself just lists our own commands. pages = await formatter.format_help_for(ctx, bot) else: - command: commands.Command = bot.get_command(command_name) + # First check if it's a cog + command = bot.get_cog(command_name) + if command is None: + command = bot.get_command(command_name) if command is None: if hasattr(formatter, "format_command_not_found"): msg = await formatter.format_command_not_found(ctx, command_name)