Optional
data: Partial<ButtonComponentData> | Partial<APIButtonComponent>Readonly
dataSets the custom id for this button.
The custom id to use
This method is only applicable to buttons that are not using the Link
button style.
Sets whether this button is disabled.
Optional
disabled: booleanWhether to disable this button
Sets the label for this button.
The label to use
Sets the SKU id that represents a purchasable SKU for this button.
The SKU id to use
Only available when using premium-style buttons.
Sets the style of this button.
The style to use
Sets the URL for this button.
The URL to use
This method is only available to buttons using the Link
button style.
Only three types of URL schemes are currently supported: https://
, http://
, and discord://
.
Serializes this builder to API-compatible JSON data.
This method runs validations on the data before serializing it. As such, it may throw an error if the data is invalid.
Static
fromGenerated using TypeDoc
The API data associated with this component.