class BaseButtonBuilder

abstract
export declare abstract class BaseButtonBuilder<ButtonData extends APIButtonComponent> extends ComponentBuilder<ButtonData>

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

Type Parameters

ButtonData extends APIButtonComponent

protectedreadonly
data : Partial<ButtonData>

clearId() : this

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

Inherited from: ComponentBuilder

setDisabled(
disabled?: boolean
) : this

Sets whether this button is disabled.

setId(
id: number
) : this

Sets the id of this component.

Inherited from: ComponentBuilder

toJSON(
validationOverride?: boolean
) : ButtonData

Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.