Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
class ApplicationCommandInteraction
extends Interaction
import { ApplicationCommandInteraction } from "https://deno.land/x/harmony@v2.8.0/src/structures/applicationCommand.ts";

Constructors

new
ApplicationCommandInteraction(
client: Client,
others: { channel?: TextChannel | GuildTextChannel; guild?: Guild; member?: Member; user: User; resolved: InteractionApplicationCommandResolved; },
)

Properties

Data sent with Interaction. Only applies to Application Command

guildLocale: string
locale: string
readonly
name: string

Name of the Command Used (may change with future additions to Interactions!)

Application Command options. Sub Command (and Group) nesting is stripped off for this

Resolved data for Snowflakes in Slash Command Arguments

readonly
subCommand: string | undefined

Gets sub command name from options

readonly
subCommandGroup: string | undefined

Gets sub command group name from options

readonly
targetID: string | undefined

Target ID. Only valid for Context Menu commands

readonly
targetMessage: Message | undefined

Target Message object. Only valid for Message Context Menu commands

readonly
targetUser: User | undefined

Target User object. Only valid for User Context Menu commands

Methods

option<T extends
| number
| string
| Role
| undefined
>
(name: string): T

Get an option by name