Constructor
new Command()
- Description:
Creates the structure for a command.
- Source:
- See:
Methods
addOption(option) → {Command}
- Description:
Adds an option to the command.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
option |
CommandOption | Adds an option to the command. |
Returns:
- Type
- Command
setDefaultLocale(localenullable) → {Command}
- Description:
Sets the default locale for localisation.
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
locale |
String |
<nullable> |
Sets the default locale for localisation. |
Returns:
- Type
- Command
setDefaultMemberPermissions(permissions) → {Command}
- Description:
Sets the permission needed to use the command.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
permissions |
String | The permissions required to be able to use this command. |
Returns:
- Type
- Command
setDescription(description) → {Command}
- Description:
Sets the description of the command.
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
description |
String | Object | The description of the command, or an object of descriptions for localisation. |
Returns:
- Type
- Command
setName(name) → {Command}
- Description:
Sets the name of the command.
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
name |
String | Object | The name of the command or an object of names for localisation. |
Returns:
- Type
- Command
setNsfw(nsfw) → {Command}
- Description:
Sets whether this command is NSFW.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
nsfw |
Boolean | Whether this command is NSFW. |
Returns:
- Type
- Command
setType(type) → {Command}
- Description:
Sets the command type.
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
type |
Number | The command type. |
Returns:
- Type
- Command
toJSON() → {Object}
- Description:
Returns the correct Discord format for a command.
- Source:
Returns:
- Type
- Object