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
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
callbackDataAPICommandAutocompleteInteractionResponseCallbackDataNoThe callback data for the autocomplete response
optionsPick<RequestData, 'signal'>YesThe options for sending the autocomplete response
createModal(interactionId, interactionToken, callbackData, options?):Promise<void>
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
callbackDataAPIModalInteractionResponseCallbackDataNoThe modal callback data to send
optionsPick<RequestData, 'signal'>YesThe options for sending the modal
defer(interactionId, interactionToken, data?, options?):Promise<void>
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
dataAPIInteractionResponseDeferredChannelMessageWithSource['data']YesThe data for deferring the reply
optionsPick<RequestData, 'signal'>YesThe options for deferring
deferMessageUpdate(interactionId, interactionToken, options?):Promise<void>
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
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
callbackDataAPIInteractionResponseCallbackData & { files?: RawFile[]; }NoThe 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
bodyAPIInteractionResponseCallbackData & { files?: RawFile[]; }NoThe 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<void>
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
bodyAPIInteractionResponseCallbackData & { files?: RawFile[]; }NoThe callback data for replying
optionsPick<RequestData, 'signal'>YesThe options for replying
Deprecated
sendPremiumRequired(interactionId, interactionToken, options?):Promise<void>
Sending a premium-style button is the new Discord behaviour.
Deprecated
Sends a premium required response to an interaction
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
optionsPick<RequestData, 'signal'>YesThe options for sending the premium required response
updateMessage(interactionId, interactionToken, callbackData, options?):Promise<void>
Updates the message the component interaction was triggered on
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
callbackDataAPIInteractionResponseCallbackData & { files?: RawFile[]; }NoThe callback data for updating the interaction
optionsPick<RequestData, 'signal'>YesThe options for updating the interaction