class InteractionsAPI

export declare class InteractionsAPI

Constructors

constructor(
rest: REST
webhooks: WebhooksAPI
)

Constructs a new instance of the InteractionsAPI class

createAutocompleteResponse(
interactionId: Snowflake
interactionToken: string
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Sends an autocomplete response to an interaction

See also: https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response

createModal(
interactionId: Snowflake
interactionToken: string
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Sends a modal response to an interaction

See also: https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response

defer(
interactionId: Snowflake
interactionToken: string
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Defers the reply to an interaction

See also: https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response

deferMessageUpdate(
interactionId: Snowflake
interactionToken: string
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Defers an update from a message component interaction

See also: https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response

followUp(
applicationId: Snowflake
interactionToken: string
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Reply to a deferred interaction

See also: https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message

getOriginalReply(
applicationId: Snowflake
interactionToken: string
options: Pick<RequestData, 'signal'>
) : Promise<APIMessage>

Fetches the initial reply to an interaction

See also: https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response

reply(
interactionId: Snowflake
interactionToken: string
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Replies to an interaction

See also: https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response

updateMessage(
interactionId: Snowflake
interactionToken: string
callbackData: APIInteractionResponseCallbackData & { files?: RawFile[]; }
options?: Pick<RequestData, 'signal'>
) : Promise<void>

Updates the the message the component interaction was triggered on

See also: https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response