import { Interaction } from "https://deno.land/x/harmony@v2.9.0/deploy.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
Data sent with Interaction. Only applies to Application Command
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!
Edit a Followup message
Edit the original Interaction response
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