mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Fix help command with cogs (#2156)
This bug was introduced in #2122 (whoops) Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
parent
b2497386bb
commit
f07b78bd0d
@ -313,7 +313,10 @@ async def help(ctx: commands.Context, *, command_name: str = ""):
|
|||||||
# help by itself just lists our own commands.
|
# help by itself just lists our own commands.
|
||||||
pages = await formatter.format_help_for(ctx, bot)
|
pages = await formatter.format_help_for(ctx, bot)
|
||||||
else:
|
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 command is None:
|
||||||
if hasattr(formatter, "format_command_not_found"):
|
if hasattr(formatter, "format_command_not_found"):
|
||||||
msg = await formatter.format_command_not_found(ctx, command_name)
|
msg = await formatter.format_command_not_found(ctx, command_name)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user