lightbulb.utils

lightbulb.utils.get_command_data(command: commands.CommandBase | type[commands.CommandBase]) commands.CommandData[source]

Utility method to get the command data dataclass for a command instance or command class.

Parameters:

command (Union [ CommandBase, Type [ CommandBase ]]) – The command instance or command class to get the command data for.

Returns:

Command data dataclass for the given command.

Return type:

CommandData

lightbulb.utils.EMPTY_MESSAGE = Message(id=0, channel_id=0, guild_id=None, author=<lightbulb.utils._EmptyUser object>, flags=<MessageFlag.NONE: 0>)

Placeholder for a message. Used when attempting to get value for an option on a class instead of instance.

lightbulb.utils.EMPTY_ROLE = Role(id=0, name='', color=Color(r=0x0, g=0x0, b=0x0), guild_id=0, is_hoisted=False, position=0, bot_id=None, integration_id=None, is_premium_subscriber_role=False, subscription_listing_id=None, is_available_for_purchase=False, is_guild_linked_role=False)

Placeholder for a role. Used when attempting to get value for an option on a class instead of instance.

lightbulb.utils.EMPTY_USER = <lightbulb.utils._EmptyUser object>

Placeholder for a user. Used when attempting to get value for an option on a class instead of instance.