PremiumButtonBuilder

export declare class PremiumButtonBuilder extends BaseButtonBuilder<APIButtonComponentWithSKUId>
export declare class PremiumButtonBuilder extends BaseButtonBuilder<APIButtonComponentWithSKUId>
A builder that creates API-compatible JSON data for premium buttons.
constructor(data?)
Constructs a new instance of the PremiumButtonBuilder class
NameTypeOptionalDescription
dataPartial<APIButtonComponentWithSKUId>YesNone
ProtectedReadonly
clearId():this
Clears the id of this component, defaulting to a default incremented id.
Inherited from ComponentBuilder
setDisabled(disabled?):this
Sets whether this button is disabled.
NameTypeOptionalDescription
disabledbooleanYesWhether to disable this button
Inherited from BaseButtonBuilder
setId(id):this
Sets the id of this component.
NameTypeOptionalDescription
idnumberNoThe id to use
Inherited from ComponentBuilder
setSKUId(skuId):this
Sets the SKU id that represents a purchasable SKU for this button.
Remarks
Only available when using premium-style buttons.
NameTypeOptionalDescription
skuIdSnowflakeNoThe SKU id to use
toJSON(validationOverride?):APIButtonComponentWithSKUId
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
Inherited from BaseButtonBuilder