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
setDisabled(disabled?):this
Sets whether this button is disabled.
NameTypeOptionalDescription
disabledbooleanYesWhether to disable this button
Inherited from BaseButtonBuilder
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