ApplicationCommand

ApplicationCommand

Represents an application command

Constructor

new ApplicationCommand()

Properties:
Name Type Attributes Description
applicationID String

The ID of the application that this command belongs to

defaultMemberPermissions Permission <nullable>

The permissions required by default for this command to be usable

defaultPermission Boolean <nullable>

[DEPRECATED] Indicates whether the command is enabled by default when the application is added to a guild

description String

The description of the command (empty for user & message commands)

descriptionLocalizations Object <nullable>

A map of locales to descriptions for that locale

dmPermission Boolean <nullable>

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

guild Guild <nullable>

The guild associated with this command (guild commands only)

id String

The ID of the application command

name String

The name of the command

nameLocalizations Object <nullable>

A map of locales to names for that locale

nsfw Boolean <nullable>

Indicates whether the command is age-restricted

options Array.<Object> <nullable>

The options associated with this command

type Number

The command type

version String

The ID of the version of this command

Source:

Methods

delete() → {Promise}

Delete the command

Source:
Returns:
Type:
Promise

edit(command) → {Promise.<ApplicationCommand>}

Edit this application command

Source:
Parameters:
Name Type Attributes Default Description
command Object

A command object

command.defaultPermission Boolean <optional>

[DEPRECATED] Whether the command is enabled by default when the application is added to a guild. Replaced by defaultMemberPermissions

command.description String <optional>

The command description, required for CHAT_INPUT commands

command.descriptionLocalizations Object <optional>
<nullable>

Localization directory with keys in available locales for the command description

command.dmPermission Boolean <optional>
<nullable>
true

Whether the command is available in DMs with the app (Global applications only)

command.name String <optional>

The command name

command.nameLocalizations Object <optional>
<nullable>

Localization directory with keys in available locales for the command name

command.nsfw Boolean <optional>

Whether the command is age-restricted

command.options Array.<Object> <optional>

The application command options

Returns:
Type:
Promise.<ApplicationCommand>

Resolves with the edited application command