export declare class InteractionsAPI export declare class InteractionsAPI No summary provided.
constructor(rest, webhooks)
Constructs a new instance of the 
InteractionsAPI class| Name | Type | Optional | Description | 
|---|---|---|---|
| rest | REST | No | None | 
| webhooks | WebhooksAPI | No | None | 
createAutocompleteResponse(interactionId, interactionToken, callbackData, { signal }?)
:
Promise<void>
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 | 
| callbackData | APICommandAutocompleteInteractionResponseCallbackData | No | The callback data for the autocomplete response | 
| { signal } | Pick<RequestData, 'signal'> | Yes | None | 
createModal(interactionId, interactionToken, callbackData, { signal }?)
:
Promise<void>
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 | 
| callbackData | APIModalInteractionResponseCallbackData | No | The modal callback data to send | 
| { signal } | Pick<RequestData, 'signal'> | Yes | None | 
defer(interactionId, interactionToken, data?, { signal }?)
:
Promise<void>
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 | 
| data | APIInteractionResponseDeferredChannelMessageWithSource['data'] | Yes | The data to use when deferring the reply | 
| { signal } | Pick<RequestData, 'signal'> | Yes | None | 
deferMessageUpdate(interactionId, interactionToken, { signal }?)
:
Promise<void>
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 | 
| { signal } | Pick<RequestData, 'signal'> | Yes | None | 
deleteReply(applicationId, interactionToken, messageId?, { signal }?)
:
Promise<void>
Deletes 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 | 
| messageId | Snowflake | '@original' | Yes | The id of the message to delete. If omitted, the original reply will be deleted | 
| { signal } | Pick<RequestData, 'signal'> | Yes | None | 
editReply(applicationId, interactionToken, callbackData, messageId?, { signal }?)
:
Promise<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 | 
| callbackData | APIInteractionResponseCallbackData & { files?: RawFile[]; } | No | The callback 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 | 
| { signal } | Pick<RequestData, 'signal'> | Yes | None | 
followUp(applicationId, interactionToken, body, { signal }?)
:
Promise<void>
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 | 
| body | APIInteractionResponseCallbackData & { files?: RawFile[]; } | No | The callback data to use when replying | 
| { signal } | Pick<RequestData, 'signal'> | Yes | None | 
getOriginalReply(applicationId, interactionToken, { signal }?)
:
Promise<APIMessage>
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 | 
| { signal } | Pick<RequestData, 'signal'> | Yes | None | 
reply(interactionId, interactionToken, { files, ...data }, { signal }?)
:
Promise<void>
Replies to an interaction
| Name | Type | Optional | Description | 
|---|---|---|---|
| interactionId | Snowflake | No | The id of the interaction | 
| interactionToken | string | No | The token of the interaction | 
| { files, ...data } | APIInteractionResponseCallbackData & { files?: RawFile[]; } | No | None | 
| { signal } | Pick<RequestData, 'signal'> | Yes | None | 
updateMessage(interactionId, interactionToken, { files, ...data }, { signal }?)
:
Promise<void>
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 | 
| { files, ...data } | APIInteractionResponseCallbackData & { files?: RawFile[]; } | No | None | 
| { signal } | Pick<RequestData, 'signal'> | Yes | None |