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-responseundefined

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-responseundefined

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-responseundefined

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-messageundefined

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-responseundefined

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-responseundefined

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-responseundefined