InteractionClient
Defined in: packages/structures/src/interactions.ts:46
Transport required by an interaction structure.
Properties
Section titled âPropertiesâresourceContext?
Section titled âresourceContext?â
readonlyoptionalresourceContext?:ResourceContext
Defined in: packages/structures/src/interactions.ts:79
Lets structures built from an interaction (such as Interaction.member) act through the client. Optional.
Methods
Section titled âMethodsâdeleteInteractionReply()
Section titled âdeleteInteractionReply()âdeleteInteractionReply(
token,applicationId?):Promise<void>
Defined in: packages/structures/src/interactions.ts:60
Deletes the original interaction response.
Parameters
Section titled âParametersâstring
Interaction token.
applicationId?
Section titled âapplicationId?âstring
The interactionâs application_id.
Returns
Section titled âReturnsâPromise<void>
Promise fulfilled after deletion.
When REST fails.
editInteractionReply()
Section titled âeditInteractionReply()âeditInteractionReply(
token,data,applicationId?):Promise<unknown>
Defined in: packages/structures/src/interactions.ts:54
Edits the original interaction response.
Parameters
Section titled âParametersâstring
Interaction token.
Message payload.
applicationId?
Section titled âapplicationId?âstring
The interactionâs application_id, which the webhook route needs.
Returns
Section titled âReturnsâPromise<unknown>
Discord response.
When REST fails.
followUpInteraction()
Section titled âfollowUpInteraction()âfollowUpInteraction(
token,data,applicationId?):Promise<unknown>
Defined in: packages/structures/src/interactions.ts:65
Sends a follow-up interaction webhook message.
Parameters
Section titled âParametersâstring
Interaction token.
Message payload.
applicationId?
Section titled âapplicationId?âstring
The interactionâs application_id.
Returns
Section titled âReturnsâPromise<unknown>
Discord response.
When REST fails.
interactionWebhookMessage()?
Section titled âinteractionWebhookMessage()?â
optionalinteractionWebhookMessage(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.
Parameters
Section titled âParametersâ"GET" | "PATCH" | "DELETE"
applicationId
Section titled âapplicationIdâstring
string
messageId
Section titled âmessageIdâstring
Returns
Section titled âReturnsâPromise<unknown>
postInteractionResponse()
Section titled âpostInteractionResponse()âpostInteractionResponse(
id,token,response):Promise<unknown>
Defined in: packages/structures/src/interactions.ts:48
Sends the initial interaction callback.
Parameters
Section titled âParametersâstring
Interaction identifier.
string
Interaction token.
response
Section titled âresponseâCallback payload.
Returns
Section titled âReturnsâPromise<unknown>
Discord response.
When REST fails.