InteractionsAPI

export declare class InteractionsAPI
export declare class InteractionsAPI

No summary provided.

constructor(rest, webhooks)
Constructs a new instance of the InteractionsAPI class
NameTypeOptionalDescription
restRESTNoNone
webhooksWebhooksAPINoNone
createAutocompleteResponse(interactionId, interactionToken, callbackData, options?):Promise<void>
NameTypeOptionalDescription
interactionIdSnowflakeNo
The id of the interaction
interactionTokenstringNo
The token of the interaction
callbackDataAPICommandAutocompleteInteractionResponseCallbackDataNo
The callback data for the autocomplete response
optionsPick<RequestData, 'signal'>Yes
The options to use when sending the autocomplete response
createModal(interactionId, interactionToken, callbackData, options?):Promise<void>
NameTypeOptionalDescription
interactionIdSnowflakeNo
The id of the interaction
interactionTokenstringNo
The token of the interaction
callbackDataAPIModalInteractionResponseCallbackDataNo
The modal callback data to send
optionsPick<RequestData, 'signal'>Yes
The options to use when sending the modal
defer(interactionId, interactionToken, data?, options?):Promise<void>
NameTypeOptionalDescription
interactionIdSnowflakeNo
The id of the interaction
interactionTokenstringNo
The token of the interaction
dataAPIInteractionResponseDeferredChannelMessageWithSource['data']Yes
The data to use when deferring the reply
optionsPick<RequestData, 'signal'>Yes
The options to use when deferring
deferMessageUpdate(interactionId, interactionToken, options?):Promise<void>
NameTypeOptionalDescription
interactionIdSnowflakeNo
The id of the interaction
interactionTokenstringNo
The token of the interaction
optionsPick<RequestData, 'signal'>Yes
The options to use when deferring
deleteReply(applicationId, interactionToken, messageId?, options?):Promise<void>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id of the interaction
interactionTokenstringNo
The token of the interaction
messageIdSnowflake | '@original'Yes
The id of the message to delete. If omitted, the original reply will be deleted
optionsPick<RequestData, 'signal'>Yes
The options to use when deleting the reply
editReply(applicationId, interactionToken, callbackData, messageId?, options?):Promise<APIMessage>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id of the interaction
interactionTokenstringNo
The token of the interaction
callbackDataAPIInteractionResponseCallbackData & { files?: RawFile[]; }No
The callback data to use when editing the reply
messageIdSnowflake | '@original'Yes
The id of the message to edit. If omitted, the original reply will be edited
optionsPick<RequestData, 'signal'>Yes
The options to use when editing the reply
followUp(applicationId, interactionToken, body, options?):Promise<void>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id of the interaction
interactionTokenstringNo
The token of the interaction
bodyAPIInteractionResponseCallbackData & { files?: RawFile[]; }No
The callback data to use when replying
optionsPick<RequestData, 'signal'>Yes
The options to use when replying
getOriginalReply(applicationId, interactionToken, options?):Promise<APIMessage>
NameTypeOptionalDescription
applicationIdSnowflakeNo
The application id of the interaction
interactionTokenstringNo
The token of the interaction
optionsPick<RequestData, 'signal'>Yes
The options to use when fetching the reply
reply(interactionId, interactionToken, body, options?):Promise<void>
NameTypeOptionalDescription
interactionIdSnowflakeNo
The id of the interaction
interactionTokenstringNo
The token of the interaction
bodyAPIInteractionResponseCallbackData & { files?: RawFile[]; }No
The callback data to use when replying
optionsPick<RequestData, 'signal'>Yes
The options to use when replying
updateMessage(interactionId, interactionToken, callbackData, options?):Promise<void>
Updates the the message the component interaction was triggered on
NameTypeOptionalDescription
interactionIdSnowflakeNo
The id of the interaction
interactionTokenstringNo
The token of the interaction
callbackDataAPIInteractionResponseCallbackData & { files?: RawFile[]; }No
The callback data to use when updating the interaction
optionsPick<RequestData, 'signal'>Yes
The options to use when updating the interaction