lightbulb.commands.groups¶
- class lightbulb.commands.groups.Group(name: str, description: str, localize: bool = False, nsfw: bool = False, dm_enabled: bool = True, default_member_permissions: Permissions | UndefinedType = UNDEFINED)[source]¶
Dataclass representing a slash command group.
Note
If
localize
isTrue
, thenname
anddescription
will instead be interpreted as localization keys from which the actual name and description will be retrieved from.- async as_command_builder(default_locale: hikari.Locale, localization_provider: localization.LocalizationProviderT) hikari.api.CommandBuilder [source]¶
Convert the group into a hikari command builder object.
- Returns:
The builder object for this group.
- Return type:
- subgroup(name: str, description: str, *, localize: bool = False) SubGroup [source]¶
Create a new subgroup as a child of this group.
- Parameters:
name (
str
) – The name of the subgroup.description (
str
) – The description of the subgroup.localize (
bool
, optional) – Whether to localize the group’s name and description. Iftrue
, then thename
anddescription
arguments will instead be interpreted as localization keys from which the actual name and description will be retrieved from. Defaults toFalse
.
- Returns:
The created subgroup.
- Return type:
- default_member_permissions: hikari.UndefinedOr[hikari.Permissions]¶
The default permissions required to use the group in a guild.
- class lightbulb.commands.groups.SubGroup(name: str, description: str, localize: bool, parent: Group)[source]¶
Dataclass representing a slash command subgroup.
Warning
This should not be instantiated manually - you should instead create one using
Group.subgroup()
.- async to_command_option(default_locale: hikari.Locale, localization_provider: localization.LocalizationProviderT) hikari.CommandOption [source]¶
Convert the subgroup into a subgroup command option.
- Returns:
The subgroup option for this subgroup.
- Return type: