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<RESTPostAPIInteractionCallbackWithResponseResult>
Sends an autocomplete response to an interaction and returns an interaction callback object
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
callbackDataCreateAutocompleteResponseOptions & { with_response: true; }NoThe callback data for the autocomplete response
optionsPick<RequestData, 'signal'>YesThe options for sending the autocomplete response
createModal(interactionId, interactionToken, callbackData, options?):Promise<RESTPostAPIInteractionCallbackWithResponseResult>
Sends a modal response to an interaction and returns an interaction callback object
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
callbackDataCreateModalResponseOptions & { with_response: true; }NoThe modal callback data to send
optionsPick<RequestData, 'signal'>YesThe options for sending the modal
defer(interactionId, interactionToken, body, options?):Promise<RESTPostAPIInteractionCallbackWithResponseResult>
Defers the reply to an interaction and returns an interaction callback object
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
bodyCreateInteractionDeferResponseOptions & { with_response: true; }NoThe callback data for deferring the reply
optionsPick<RequestData, 'signal'>YesThe options for deferring
deferMessageUpdate(interactionId, interactionToken, body, options?):Promise<RESTPostAPIInteractionCallbackWithResponseResult>
Defers an update from a message component interaction and returns an interaction callback object
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
bodyRESTPostAPIInteractionCallbackQuery & { with_response: true; }NoThe callback data for deferring the update
optionsPick<RequestData, 'signal'>YesThe options for deferring
deleteReply(applicationId, interactionToken, messageId?, options?):Promise<void>
NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the interaction
interactionTokenstringNoThe token of the interaction
messageIdSnowflake | '@original'YesThe id of the message to delete. If omitted, the original reply will be deleted
optionsPick<RequestData, 'signal'>YesThe options for deleting the reply
editReply(applicationId, interactionToken, callbackData, messageId?, options?):Promise<APIMessage>
NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the interaction
interactionTokenstringNoThe token of the interaction
callbackDataEditInteractionResponseOptionsNoThe callback data for editing the reply
messageIdSnowflake | '@original'YesThe id of the message to edit. If omitted, the original reply will be edited
optionsPick<RequestData, 'signal'>YesThe options for editing the reply
followUp(applicationId, interactionToken, body, options?):Promise<APIMessage>
NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the interaction
interactionTokenstringNoThe token of the interaction
bodyCreateInteractionFollowUpResponseOptionsNoThe callback data for replying
optionsPick<RequestData, 'signal'>YesThe options for replying
getOriginalReply(applicationId, interactionToken, options?):Promise<APIMessage>
NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the interaction
interactionTokenstringNoThe token of the interaction
optionsPick<RequestData, 'signal'>YesThe options for fetching the reply
reply(interactionId, interactionToken, body, options?):Promise<RESTPostAPIInteractionCallbackWithResponseResult>
Replies to an interaction and returns an interaction callback object
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
bodyCreateInteractionResponseOptions & { with_response: true; }NoThe callback data for replying
optionsPick<RequestData, 'signal'>YesThe options for replying
updateMessage(interactionId, interactionToken, callbackData, options):Promise<RESTPostAPIInteractionCallbackWithResponseResult>
Updates the message the component interaction was triggered on and returns an interaction callback object
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
callbackDataCreateInteractionUpdateMessageResponseOptions & { with_response: true; }NoThe callback data for updating the interaction
optionsPick<RequestData, 'signal'>NoThe options for updating the interaction