commands
create
Creates a command. Specify guildId to make a command in a guild
field | type | description |
---|---|---|
name | string | Name of command, 1-32 characters |
name_localizations? | LocaleObject | Localization dictionary for the |
description? | string | 1-100 character description |
description_localizations? | LocaleObject | Localization dictionary for the |
options? | CommandOption[] | Parameters for the command |
default_member_permissions? | ?string | Set of permissions represented as a bit set |
default_permissions? | boolean | Replaced by |
type? | CommandType | Type of command, defaults |
nsfw? | boolean | Indicates whether the command is age-restricted |
delete
Deletes a command. You must specify guildId if it is a guild command
edit
Edits a command
fields | type | description |
---|---|---|
name? | string | Name of command, 1-32 characters |
name_localizations? | ?LocaleObject | Localization dictionary for the |
description | string | 1-100 character description |
description_localizations? | ?LocaleObject | Localization dictionary for the |
options? | CommandOption[] | Parameters for the command |
default_member_permissions? | ?string | Set of permissions represented as a bit set |
default_permission? | boolean | Replaced by |
nsfw? | boolean | Indicates whether the command is age-restricted |
list
Get a list of commands. Specify guildId for commands in a specific guild
bulkOverwrite
Overwrite a list of commands.
field | type | description |
---|---|---|
id? | Snowflake | ID of the command, if known |
name | string | Name of command, 1-32 characters |
name_localizations? | ?LocaleObject | Localization dictionary for the |
description | string | 1-100 character description |
description_localizations? | ?LocaleObject | Localization dictionary for the |
options? | CommandOption[] | Parameters for the command |
default_member_permissions? | ?string | Set of permissions represented as a bit set |
dm_permission? | ?boolean | Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. |
default_permission? | ?boolean | Replaced by |
type? | CommandType | Type of command, defaults |
nsfw? | boolean | Indicates whether the command is age-restricted |
get
Get a command. You must specify guildId if it is a guild command
classes
Command
properties
field | type | description |
---|---|---|
id | Snowflake | |
type? | number | |
application_id? | Snowflake | |
guild_id? | Snowflake | |
name | string | |
name_localizations? | ?LocaleObject | |
description | string | |
description_localizations? | ?LocaleObject | |
options? | CommandOption[] | |
default_member_permissions | ?string | |
dm_permission? | ?boolean | |
default_permission? | ?boolean | |
nsfw? | boolean | |
version | string |
methods
edit
Edits this command
editfields
delete
deletes this command
get
Gets the latest version of this command
getPermissions
Get the permissions of the command
Last updated