mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Add Group.commands property
This commit is contained in:
parent
987e27dfce
commit
5fb1b933cf
@ -702,6 +702,11 @@ class Group:
|
|||||||
def _get_internal_command(self, name: str) -> Optional[Union[Command, Group]]:
|
def _get_internal_command(self, name: str) -> Optional[Union[Command, Group]]:
|
||||||
return self._children.get(name)
|
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:
|
async def on_error(self, interaction: Interaction, command: Command, error: AppCommandError) -> None:
|
||||||
"""|coro|
|
"""|coro|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user