Skip to content

Commit c994e5d

Browse files
krishnans2006BobDotCom
authored andcommitted
fix: SlashCommandGroup.walk_commands() error (#1838)
1 parent 402feeb commit c994e5d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

discord/commands/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,13 +1317,13 @@ async def invoke_autocomplete_callback(self, ctx: AutocompleteContext) -> None:
13171317
ctx.interaction.data = option
13181318
await command.invoke_autocomplete_callback(ctx)
13191319

1320-
def walk_commands(self) -> Generator[SlashCommand, None, None]:
1321-
"""An iterator that recursively walks through all slash commands in this group.
1320+
def walk_commands(self) -> Generator[SlashCommand | SlashCommandGroup, None, None]:
1321+
"""An iterator that recursively walks through all slash commands and groups in this group.
13221322
13231323
Yields
13241324
------
1325-
:class:`.SlashCommand`
1326-
A slash command from the group.
1325+
:class:`.SlashCommand` | :class:`.SlashCommandGroup`
1326+
A nested slash command or slash command group from the group.
13271327
"""
13281328
for command in self.subcommands:
13291329
if isinstance(command, SlashCommandGroup):

0 commit comments

Comments
 (0)