Carbon
Core/Classes

AnySelectMenu

Extends

Extended by

Constructors

Constructor

new AnySelectMenu(data?): AnySelectMenu

Parameters

ParameterType
data?{ additionalData: ComponentAdditionalData; }
data.additionalData?ComponentAdditionalData

Returns

AnySelectMenu

Inherited from

BaseMessageInteractiveComponent.constructor

Properties

PropertyModifierTypeDefault valueDescriptionOverridesInherited from
additionalDatapublicnull | ComponentAdditionalDatanull--BaseMessageInteractiveComponent.additionalData
customIdabstractstringundefinedThe custom ID of the component-BaseMessageInteractiveComponent.customId
deferpublicbooleanfalseWhether the component response should be automatically deferred-BaseMessageInteractiveComponent.defer
disabled?publicbooleanundefined---
ephemeralpublicbooleanfalseWhether the component response should be ephemeral-BaseMessageInteractiveComponent.ephemeral
id?publicnumberundefined32 bit integer used as an optional identifier for component The id field is optional and is used to identify components in the response from an interaction that aren't interactive components. The id must be unique within the message and is generated sequentially by Discord if left empty. Generation of ids won't use another id that exists in the message if you have one defined for another component.-BaseMessageInteractiveComponent.id
isV2readonlyfalsefalseWhether the component is a v2 component and requires the IS_COMPONENTS_V2 flag-BaseMessageInteractiveComponent.isV2
maxValues?publicnumberundefined---
minValues?publicnumberundefined---
placeholder?publicstringundefined---
typeabstractAnySelectMenuComponentTypeundefinedThe type of the componentBaseMessageInteractiveComponent.type-

Methods

createId()

createId(additionalData): string

Create a custom ID to use for this component that embeds additional data that you want to be handed

Parameters

ParameterTypeDescription
additionalDatanull | ComponentAdditionalDataThe additional data that you want to be passed in this component's custom ID

Returns

string

The custom ID to use

Inherited from

BaseMessageInteractiveComponent.createId


run()

abstract run(interaction): Promise<void>

Parameters

ParameterType
interactionAnySelectMenuInteraction

Returns

Promise<void>


serialize()

serialize(): APISelectMenuComponent

Returns

APISelectMenuComponent

Overrides

BaseMessageInteractiveComponent.serialize


serializeOptions()

abstract serializeOptions(): { channel_types: undefined | ChannelType[]; default_values: undefined | APISelectMenuDefaultValue<Channel>[]; type: ChannelSelect; } | { options: APISelectMenuOption[]; type: StringSelect; } | { default_values: undefined | APISelectMenuDefaultValue<Role>[]; type: RoleSelect; } | { default_values: undefined | APISelectMenuDefaultValue<User>[]; type: UserSelect; } | { default_values: undefined | APISelectMenuDefaultValue<Role | User>[]; type: MentionableSelect; }

Returns

{ channel_types: undefined | ChannelType[]; default_values: undefined | APISelectMenuDefaultValue<Channel>[]; type: ChannelSelect; } | { options: APISelectMenuOption[]; type: StringSelect; } | { default_values: undefined | APISelectMenuDefaultValue<Role>[]; type: RoleSelect; } | { default_values: undefined | APISelectMenuDefaultValue<User>[]; type: UserSelect; } | { default_values: undefined | APISelectMenuDefaultValue<Role | User>[]; type: MentionableSelect; }

On this page