Skip to main content
Module

x/harmony/mod.ts>ApplicationCommandInteraction

An easy to use Discord API Library for Deno.
Latest
class ApplicationCommandInteraction
extends Interaction
Re-export
import { ApplicationCommandInteraction } from "https://deno.land/x/harmony@v2.9.0/mod.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