CoreClasses
BaseComponent
Extended by
Constructors
new BaseComponent()
new BaseComponent(
data
?):BaseComponent
Parameters
Parameter | Type |
---|---|
data ? | object |
data.additionalData ? | ComponentAdditionalData |
Returns
Properties
Property | Modifier | Type | Default value | Description |
---|---|---|---|---|
additionalData | public | null | ComponentAdditionalData | null | - |
customId | abstract | string | undefined | The custom ID of the component |
defer | public | boolean | false | Whether the component response should be automatically deferred |
ephemeral | public | boolean | false | Whether the component response should be ephemeral |
serialize | abstract | () => APIBaseComponent <ComponentType > | undefined | - |
type | abstract | ComponentType | undefined | The type of the component |
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