Abstract

BaseButtonBuilder

export declare abstract class BaseButtonBuilder<ButtonData extends APIButtonComponent> extends ComponentBuilder<ButtonData>
export declare abstract class BaseButtonBuilder<ButtonData extends APIButtonComponent> extends ComponentBuilder<ButtonData>
A builder that creates API-compatible JSON data for buttons.

Extends

ComponentBuilder<ButtonData>
NameConstraintsOptionalDefaultDescription
ButtonDataAPIButtonComponentNoNone
ProtectedReadonly
data:Partial<ButtonData>
setDisabled(disabled?):this
Sets whether this button is disabled.
NameTypeOptionalDescription
disabledbooleanYesWhether to disable this button
toJSON(validationOverride?):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.
NameTypeOptionalDescription
validationOverridebooleanYesForce validation to run/not run regardless of your global preference