CoreClasses
PremiumButton
Extends
BaseButton
Constructors
new PremiumButton()
new PremiumButton(
data
?):PremiumButton
Parameters
Parameter | Type |
---|---|
data ? | object |
data.additionalData ? | ComponentAdditionalData |
Returns
Inherited from
BaseButton.constructor
Properties
Property | Modifier | Type | Default value | Description | Overrides | Inherited from |
---|---|---|---|---|---|---|
additionalData | public | null | ComponentAdditionalData | null | - | - | BaseButton.additionalData |
customId | abstract | string | undefined | The custom ID of the component | - | BaseButton.customId |
defer | public | boolean | false | Whether the component response should be automatically deferred | - | BaseButton.defer |
disabled | public | boolean | false | The disabled state of the button | - | BaseButton.disabled |
emoji? | public | object | undefined | The emoji of the button | - | BaseButton.emoji |
emoji.animated? | public | boolean | undefined | - | - | - |
emoji.id? | public | string | undefined | - | - | - |
emoji.name | public | string | undefined | - | - | - |
ephemeral | public | boolean | false | Whether the component response should be ephemeral | - | BaseButton.ephemeral |
label | abstract | string | undefined | The label of the button | - | BaseButton.label |
sku_id | abstract | string | undefined | The SKU ID of the button | - | - |
style | public | Premium | ButtonStyle.Premium | The style of the button | BaseButton.style | - |
type | public | ComponentType | ComponentType.Button | The type of the component | - | BaseButton.type |
Methods
createId()
createId(
additionalData
):string
Create a custom ID to use for this component that embeds additional data that you want to be handed
Parameters
Parameter | Type | Description |
---|---|---|
additionalData | null | ComponentAdditionalData | The additional data that you want to be passed in this component's custom ID |
Returns
string
The custom ID to use
Inherited from
BaseButton.createId
serialize()
serialize():
APIButtonComponentWithSKUId
Returns
APIButtonComponentWithSKUId
Overrides
BaseButton.serialize