Preview environment

class LabelBuilder

external
declare class LabelBuilder extends ComponentBuilder<LabelBuilderData>

A builder that creates API-compatible JSON data for labels.

readonlyexternal
data : Partial<LabelBuilderData>

The API data associated with this component.

Inherited from: ComponentBuilder

external
clearDescription() : this

Clears the description for this label.

external
clearId() : this

Clears the id of this component, defaulting to a default incremented id.

Inherited from: ComponentBuilder

external
setChannelSelectMenuComponent() : this

Sets a channel select menu component to this label.

external
setDescription(
description: string
) : this

Sets the description for this label.

external
setId(
id: number
) : this

Sets the id (not the custom id) for this component.

Inherited from: ComponentBuilder

external
setLabel(
label: string
) : this

Sets the label for this label.

external
setMentionableSelectMenuComponent() : this

Sets a mentionable select menu component to this label.

external
setRoleSelectMenuComponent() : this

Sets a role select menu component to this label.

external
setStringSelectMenuComponent() : this

Sets a string select menu component to this label.

external
setTextInputComponent() : this

Sets a text input component to this label.

external
setUserSelectMenuComponent() : this

Sets a user select menu component to this label.

external
toJSON() : APILabelComponent

Serializes this builder to API-compatible JSON data.