CommandChoice

CommandChoice

Helps to create a choice for a command.

Methods

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

setName(name) → {CommandChoice}

Description:
  • Sets the name of the choice.

Source:
Parameters:
Name Type Description
name String | Object

Sets the name of the choice, or an object of names for localisation.

Returns:
Type
CommandChoice

setValue(value) → {CommandChoice}

Description:
  • Sets the value of the choice.

Source:
Parameters:
Name Type Description
value String

Value of the choice.

Returns:
Type
CommandChoice

toJSON() → {Object}

Description:
  • Returns the correct Discord format for a command choice.

Source:
Returns:
Type
Object