Skip to content

InteractionClient

Defined in: packages/structures/src/interactions.ts:46

Transport required by an interaction structure.

readonly optional resourceContext?: ResourceContext

Defined in: packages/structures/src/interactions.ts:79

Lets structures built from an interaction (such as Interaction.member) act through the client. Optional.

deleteInteractionReply(token, applicationId?): Promise<void>

Defined in: packages/structures/src/interactions.ts:60

Deletes the original interaction response.

string

Interaction token.

string

The interaction’s application_id.

Promise<void>

Promise fulfilled after deletion.

When REST fails.


editInteractionReply(token, data, applicationId?): Promise<unknown>

Defined in: packages/structures/src/interactions.ts:54

Edits the original interaction response.

string

Interaction token.

InteractionReplyOptions

Message payload.

string

The interaction’s application_id, which the webhook route needs.

Promise<unknown>

Discord response.

When REST fails.


followUpInteraction(token, data, applicationId?): Promise<unknown>

Defined in: packages/structures/src/interactions.ts:65

Sends a follow-up interaction webhook message.

string

Interaction token.

InteractionReplyOptions

Message payload.

string

The interaction’s application_id.

Promise<unknown>

Discord response.

When REST fails.


optional interactionWebhookMessage(method, applicationId, token, messageId, data?): Promise<unknown>

Defined in: packages/structures/src/interactions.ts:71

Reads, edits or deletes an interaction webhook message (@original or a follow-up ID). Optional; required for Interaction.fetchReply, Interaction.editFollowUp and Interaction.deleteFollowUp.

"GET" | "PATCH" | "DELETE"

string

string

string

InteractionReplyOptions

Promise<unknown>


postInteractionResponse(id, token, response): Promise<unknown>

Defined in: packages/structures/src/interactions.ts:48

Sends the initial interaction callback.

string

Interaction identifier.

string

Interaction token.

InteractionResponse

Callback payload.

Promise<unknown>

Discord response.

When REST fails.