Represents an application command.
Extends
Base| Name | Constraints | Optional | Default | Description |
|---|---|---|---|---|
| PermissionsFetchType | Yes | {} | None |
Whether the command can be used in DMs This property is always
null on guild commandsThe guild's id this command is part of, this may be non-null when
guild is null if the command was fetched from the ApplicationCommandManagerpermissions:ApplicationCommandPermissionsManager<
PermissionsFetchType,
PermissionsFetchType,
Guild | null,
Snowflake
>
The manager for permissions of this command on its guild or arbitrary guilds when the command is global
The type of this application command
Deletes this command.
Edits this application command.
| Name | Type | Optional | Description |
|---|---|---|---|
| data | Partial<ApplicationCommandData> | No | The data to update the command with |
Whether this command equals another command. It compares all properties, so for most operations it is advisable to just compare
command.id === command2.id as it is much faster and is often what most users need.| Name | Type | Optional | Description |
|---|---|---|---|
| command | ApplicationCommand | ApplicationCommandData | RawApplicationCommandData | No | The command to compare with |
| enforceOptionOrder | boolean | Yes | Whether to strictly check that options and choices are in the same order in the array The client may not always respect this ordering! |
Recursively checks that all options for an ApplicationCommand are equal to the provided options. In most cases it is better to compare using equals
| Name | Type | Optional | Description |
|---|---|---|---|
| existing | ApplicationCommandOption[] | No | The options on the existing command, should be options |
| options | ApplicationCommandOption[] | ApplicationCommandOptionData[] | APIApplicationCommandOption[] | No | The options to compare against |
| enforceOptionOrder | boolean | Yes | Whether to strictly check that options and choices are in the same order in the array The client may not always respect this ordering! |
setDefaultMemberPermissions(defaultMemberPermissions):Promise<ApplicationCommand<PermissionsFetchType>>
Edits the default member permissions of this ApplicationCommand
| Name | Type | Optional | Description |
|---|---|---|---|
| defaultMemberPermissions | PermissionResolvable | null | No | The default member permissions required to run this command |
Edits the description of this ApplicationCommand
| Name | Type | Optional | Description |
|---|---|---|---|
| description | string | No | The new description of the command |
setDescriptionLocalizations(descriptionLocalizations):Promise<ApplicationCommand<PermissionsFetchType>>
Edits the localized descriptions of this ApplicationCommand
| Name | Type | Optional | Description |
|---|---|---|---|
| descriptionLocalizations | LocalizationMap | No | The new localized descriptions for the command |
Edits the DM permission of this ApplicationCommand
| Name | Type | Optional | Description |
|---|---|---|---|
| dmPermission | boolean | Yes | Whether the command can be used in DMs |
Edits the name of this ApplicationCommand
| Name | Type | Optional | Description |
|---|---|---|---|
| name | string | No | The new name of the command |
Edits the localized names of this ApplicationCommand
| Name | Type | Optional | Description |
|---|---|---|---|
| nameLocalizations | LocalizationMap | No | The new localized names for the command |
Edits the options of this ApplicationCommand
| Name | Type | Optional | Description |
|---|---|---|---|
| options | ApplicationCommandOptionData[] | No | The options to set for this command |
| Name | Type | Optional | Description |
|---|---|---|---|
| ...props | Record<string, boolean | string>[] | No | None |