Class ApplicationCommand<T>

Represents an application command.

Type Parameters

Hierarchy

  • Base
    • ApplicationCommand

Accessors

Constructors

Methods

  • Get a mention for this command.

    Parameters

    • Optional sub: [subcommand: string] | [subcommandGroup: string, subcommand: string]

      The subcommand group and/or subcommand to include (["subcommand"] or ["subcommand-group", "subcommand"]).

    Returns string

Properties

application?: ClientApplication

The application this command is for.

applicationID: string

The ID of application this command is for.

defaultMemberPermissions: null | Permission

The default permissions for this command.

description: T extends CHAT_INPUT
    ? string
    : ""

The description of this command. Empty string for non CHAT_INPUT commands.

descriptionLocalizations?: null | Partial<Record<Locale, string>>

A dictionary of locales to localized descriptions.

descriptionLocalized?: string

The description of this application command in the requested locale.

dmPermission?: boolean

If this command can be used in direct messages (global commands only).

guildID: null | string

The id of the guild this command is in (guild commands only).

id: string
name: string

The name of this command.

nameLocalizations?: null | Partial<Record<Locale, string>>

A dictionary of locales to localized names.

nameLocalized?: string

The description of this application command in the requested locale.

nsfw?: boolean

Whether the command is age restricted.

The options on this command. Only valid for CHAT_INPUT.

type: T

The type of this command.

version: string

Autoincrementing version identifier updated during substantial record changes.