InteractionsAPI

declare class InteractionsAPI
declare class InteractionsAPI

No summary provided.

constructor(rest, webhooks)
Constructs a new instance of the InteractionsAPI class
NameTypeOptionalDescription
restRESTNoNone
webhooksWebhooksAPINoNone
createAutocompleteResponse(interactionId, interactionToken, data):Promise<void>
Sends an autocomplete response to an interaction
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
dataAPICommandAutocompleteInteractionResponseCallbackDataNoData for the autocomplete response
createModal(interactionId, interactionToken, data):Promise<void>
Sends a modal response to an interaction
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
dataAPIModalInteractionResponseCallbackDataNoThe modal to send
defer(interactionId, interactionToken):Promise<void>
Defers the reply to an interaction
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
deferMessageUpdate(interactionId, interactionToken):Promise<void>
Defers an update from a message component interaction
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
deleteReply(applicationId, interactionToken):Promise<void>
Deletes the initial reply to an interaction
NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the interaction
interactionTokenstringNoThe token of the interaction
editReply(applicationId, interactionToken, data, messageId?):Promise<discord_api_types_v10.APIMessage>
Edits the initial reply to an interaction
NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the interaction
interactionTokenstringNoThe token of the interaction
dataAPIInteractionResponseCallbackData & { files?: RawFile[]; }NoThe data to use when editing the reply
messageIdstringYesThe id of the message to edit. If omitted, the original reply will be edited
followUp(applicationId, interactionToken, data):Promise<void>
Reply to a deferred interaction
NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the interaction
interactionTokenstringNoThe token of the interaction
dataAPIInteractionResponseCallbackData & { files?: RawFile[]; }NoThe data to use when replying
getOriginalReply(applicationId, interactionToken):Promise<discord_api_types_v10.APIMessage>
Fetches the initial reply to an interaction
NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the interaction
interactionTokenstringNoThe token of the interaction
reply(interactionId, interactionToken, data):Promise<void>
Replies to an interaction
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
dataAPIInteractionResponseCallbackData & { files?: RawFile[]; }NoThe data to use when replying
updateMessage(interactionId, interactionToken, data):Promise<void>
Updates the the message the component interaction was triggered on
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
dataAPIInteractionResponseCallbackData & { files?: RawFile[]; }NoThe data to use when updating the interaction