Browse Source

Add Group.commands property

pull/7596/head
Rapptz 3 years ago
parent
commit
5fb1b933cf
  1. 5
      discord/app_commands/commands.py

5
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|

Loading…
Cancel
Save