commandsBuilder

Class used to build a slash command.

new commandsBuilder(commandName, commandDescription)
Argument
Type
Required
Description

commandName

String

The name of the command

commandDescription

String

The description of the command

Returns: commandsBuilder

Properties

command

Returns the command at the time it is requested, none formated.

Methods

addOption

Add an option to the command

addOption(type, optionName, optionDescription, required)
Argument
Type
Required
Description

type

String

The type of the option | Use the SlashCommandOptionType type

optionName

String

The name of the option

optionDescription

String

The description of the option

required

Boolean

Whether the option is required or not

setPermissions

Set the default member permission of the command.

setPermissions(permissions)
Argument
Type
Required
Description

permissions

undefined | null | string | number | bigint

The permissions to set

setDMPermissions

Set the default DM permission of the command.

Argument
Type
Required
Description

permissions

undefined | null | string | number | bigint

The permissions to set

setLocaleName

Set the name to a certain locale

setLocaleName(locale, name)
Argument
Type
Required
Description

locale

String

The locale to set the name to | Use the SlashCommandLocale type

name

String

The name to set to the locale

setLocaleDescription

Set the description to a certain locale

setLocaleDescription(locale, name)
Argument
Type
Required
Description

locale

String

The locale to set the description to | Use SlashCommandLocale type.

name

String

The description to set to the locale

Last updated