lightbulb.utils¶
- get_command_data(command: CommandBase | type[CommandBase] | Group | SubGroup) CommandData [source]¶
Utility method to get the command data dataclass for a command instance, command class, group, or subgroup.
- Parameters:
command – The command instance, command class, group, or subgroup to get the command data for.
- Returns:
Command data dataclass for the given command.
- Return type:
- EMPTY: Final[Any] = <lightbulb.Marker: 'EMPTY'>¶
Placeholder object returned when attempting to get the value for an option on a class instead of an instance.
Example
class YourCommand(lightbulb.SlashCommand, ...): option = lightbulb.string(...) ... # The following will be True YourCommand.option is lightbulb.utils.EMPTY