InteractionsAPI
No summary provided.
constructor(rest, webhooks)
Constructs a new instance of the
InteractionsAPI
className | Type | Optional | Description |
---|---|---|---|
rest | REST | No | None |
webhooks | WebhooksAPI | No | None |
Sends an autocomplete response to an interaction
Name | Type | Optional | Description |
---|---|---|---|
interactionId | Snowflake | No | The id of the interaction |
interactionToken | string | No | The token of the interaction |
data | APICommandAutocompleteInteractionResponseCallbackData | No | Data for the autocomplete response |
Sends a modal response to an interaction
Name | Type | Optional | Description |
---|---|---|---|
interactionId | Snowflake | No | The id of the interaction |
interactionToken | string | No | The token of the interaction |
data | APIModalInteractionResponseCallbackData | No | The modal to send |
Defers the reply to an interaction
Name | Type | Optional | Description |
---|---|---|---|
interactionId | Snowflake | No | The id of the interaction |
interactionToken | string | No | The token of the interaction |
Defers an update from a message component interaction
Name | Type | Optional | Description |
---|---|---|---|
interactionId | Snowflake | No | The id of the interaction |
interactionToken | string | No | The token of the interaction |
Deletes the initial reply to an interaction
editReply(applicationId, interactionToken, data, messageId?):Promise<discord_api_types_v10.APIMessage>
Edits the initial reply to an interaction
Name | Type | Optional | Description |
---|---|---|---|
applicationId | Snowflake | No | The application id of the interaction |
interactionToken | string | No | The token of the interaction |
data | APIInteractionResponseCallbackData & { files?: RawFile[]; } | No | The data to use when editing the reply |
messageId | Snowflake | '@original' | Yes | The id of the message to edit. If omitted, the original reply will be edited |
Reply to a deferred interaction
Name | Type | Optional | Description |
---|---|---|---|
applicationId | Snowflake | No | The application id of the interaction |
interactionToken | string | No | The token of the interaction |
data | APIInteractionResponseCallbackData & { files?: RawFile[]; } | No | The data to use when replying |
Fetches the initial reply to an interaction
Name | Type | Optional | Description |
---|---|---|---|
applicationId | Snowflake | No | The application id of the interaction |
interactionToken | string | No | The token of the interaction |
Replies to an interaction
Name | Type | Optional | Description |
---|---|---|---|
interactionId | Snowflake | No | The id of the interaction |
interactionToken | string | No | The token of the interaction |
data | APIInteractionResponseCallbackData & { files?: RawFile[]; } | No | The data to use when replying |
Updates the the message the component interaction was triggered on
Name | Type | Optional | Description |
---|---|---|---|
interactionId | Snowflake | No | The id of the interaction |
interactionToken | string | No | The token of the interaction |
data | APIInteractionResponseCallbackData & { files?: RawFile[]; } | No | The data to use when updating the interaction |