From 5fb1b933cf1c8d271361cb7a5c2e4e67d74edb02 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 8 Mar 2022 00:07:39 -0500 Subject: [PATCH] Add Group.commands property --- discord/app_commands/commands.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/discord/app_commands/commands.py b/discord/app_commands/commands.py index 98307c8c5..5b8de52de 100644 --- a/discord/app_commands/commands.py +++ b/discord/app_commands/commands.py @@ -702,6 +702,11 @@ class Group: def _get_internal_command(self, name: str) -> Optional[Union[Command, Group]]: return self._children.get(name) + @property + def commands(self) -> List[Union[Command, Group]]: + """List[Union[:class:`Command`, :class:`Group`]]: The commands that this group contains.""" + return list(self._children.values()) + async def on_error(self, interaction: Interaction, command: Command, error: AppCommandError) -> None: """|coro|