class ButtonBuilder

declare class ButtonBuilder extends ComponentBuilder<APIButtonComponent>

Represents a button component

Constructors

constructor()

Creates a new button from API data

readonly
data : Partial<DataType>

The API data associated with this component

Inherited from: ComponentBuilder

setCustomId(
customId: string
) : this

Sets the custom id for this button

setDisabled(
disabled?: boolean
) : this

Sets whether this button is disabled

setEmoji() : this

Sets the emoji to display on this button

setLabel(
label: string
) : this

Sets the label for this button

setStyle() : this

Sets the style of this button

setURL(
url: string
) : this

Sets the URL for this button

toJSON() : APIButtonComponent

Serializes this component to an API-compatible JSON object