ApplicationCommand

Represent ApplicationCommand objects returned from/sent to the API

Source: lib/src/structures/ApplicationCommand.ts

interface ApplicationCommand

Property

Optional

Type

Description

id

Nope

Snowflake

The ID of the command

application_id

Nope

Snowflake

The ID of the application which created this command

name

Nope

String

The name of the command

description

Nope

String

The description of the command

options

Yup

Array

An array of ApplicationCommandOption objects specifying the options for the command

interface ApplicationCommandOption

Property

Optional

Type

Description

type

Nope

ApplicationCommandOptionType

The type of the option

name

Nope

String

The name of the option

description

Nope

String

The description of the option

required

Yup

Boolean

Whether the option is required or not

choices

Yup

Array

An array of ApplicationCommandOptionChoice objects specifying choices for the option

options

Yup

Array

An array of more options if this option is a sub command or sub command group

interface ApplicationCommandOptionChoice

Property

Optional

Type

Description

name

Nope

String

Name for the choice

value

Nope

String | Number

A string or number value for this choice

type ApplicationCommandOptionType

The type of the option

Types: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | "SUB_COMMAND" | "SUB_COMMAND_GROUP" | "STRING" | "INTEGER" | "BOOLEAN" | "USER" | "CHANNEL" | "ROLE"

Last updated

Was this helpful?