import { Interaction } from "https://deno.land/x/harmony@v2.6.0/src/structures/interactions.ts";
Represents a base Interaction.
There are different types of interactions which have different actions you can perform ("respond") based on. Because of that, Interaction class is extended by those subclasses to structure the code properly.
You will be (most of the time if not all) provided with an Interaction object that
is actually one of those subclasses, but just TS-type is Interaction - in that case
you use type-guards such as isApplicationCommand
, isMessageComponent
, etc.
Constructors
Properties
Channel in which Interaction was initiated
Data sent with Interaction. Only applies to Application Command
Guild in which Interaction was initiated
Member object of who initiated the Interaction
Type of Interaction
User object of who invoked Interaction
Methods
Defer the Interaction i.e. let the user know bot is processing and will respond later. You only have 15 minutes to edit the response!
Delete a follow-up Message
Delete the original Interaction Response
Edit a Followup message
Edit the original Interaction response
Checks whether the Interaction is Application Command
Checks whether the Interaction is for Application Command Option autocompletions
Checks whether the Interaction is Message Component
Checks whether the Interaction is for the modal/form submitted by the user
Checks whether the Interaction is Ping (HTTP only)
Reply with a Message to the Interaction
Respond to an Interaction
Send a followup message
Respond with a Modal