Search...

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, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
callbackDataAPICommandAutocompleteInteractionResponseCallbackDataNoThe callback data for the autocomplete response
{ signal }Pick<RequestData, 'signal'>YesNone

createModal(interactionId, interactionToken, callbackData, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
callbackDataAPIModalInteractionResponseCallbackDataNoThe modal callback data to send
{ signal }Pick<RequestData, 'signal'>YesNone

defer(interactionId, interactionToken, data?, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
dataAPIInteractionResponseDeferredChannelMessageWithSource['data']YesThe data to use when deferring the reply
{ signal }Pick<RequestData, 'signal'>YesNone

deferMessageUpdate(interactionId, interactionToken, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
{ signal }Pick<RequestData, 'signal'>YesNone

deleteReply(applicationId, interactionToken, messageId?, { signal }?)

:

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
{ signal }Pick<RequestData, 'signal'>YesNone

editReply(applicationId, interactionToken, callbackData, messageId?, { signal }?)

:

Promise<APIMessage>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the interaction
interactionTokenstringNoThe token of the interaction
callbackDataAPIInteractionResponseCallbackData & { files?: RawFile[]; }NoThe callback data to use when editing the reply
messageIdSnowflake | '@original'YesThe id of the message to edit. If omitted, the original reply will be edited
{ signal }Pick<RequestData, 'signal'>YesNone

followUp(applicationId, interactionToken, body, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the interaction
interactionTokenstringNoThe token of the interaction
bodyAPIInteractionResponseCallbackData & { files?: RawFile[]; }NoThe callback data to use when replying
{ signal }Pick<RequestData, 'signal'>YesNone

getOriginalReply(applicationId, interactionToken, { signal }?)

:

Promise<APIMessage>

NameTypeOptionalDescription
applicationIdSnowflakeNoThe application id of the interaction
interactionTokenstringNoThe token of the interaction
{ signal }Pick<RequestData, 'signal'>YesNone

reply(interactionId, interactionToken, { files, ...data }, { signal }?)

:

Promise<void>

NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
{ files, ...data }APIInteractionResponseCallbackData & { files?: RawFile[]; }NoNone
{ signal }Pick<RequestData, 'signal'>YesNone

updateMessage(interactionId, interactionToken, { files, ...data }, { signal }?)

:

Promise<void>

Updates the the message the component interaction was triggered on
NameTypeOptionalDescription
interactionIdSnowflakeNoThe id of the interaction
interactionTokenstringNoThe token of the interaction
{ files, ...data }APIInteractionResponseCallbackData & { files?: RawFile[]; }NoNone
{ signal }Pick<RequestData, 'signal'>YesNone