Skip to content

Commit dd37fff

Browse files
authored
Merge pull request #360 from TheGamerX20/help_fix
Make ext.commands.help filter only prefixed commands.
2 parents a7792e9 + 57271e7 commit dd37fff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

discord/ext/commands/help.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,9 @@ async def filter_commands(self, commands, *, sort=False, key=None):
559559
if sort and key is None:
560560
key = lambda c: c.name
561561

562-
iterator = commands if self.show_hidden else filter(lambda c: not c.hidden, commands)
562+
# Ignore Application Commands cause they dont have hidden/docs
563+
prefix_commands = [command for command in commands if not isinstance(command, discord.commands.ApplicationCommand)]
564+
iterator = prefix_commands if self.show_hidden else filter(lambda c: not c.hidden, prefix_commands)
563565

564566
if self.verify_checks is False:
565567
# if we do not need to verify the checks then we can just

0 commit comments

Comments
 (0)