Skip to content

CreateRoleOption

Defined in: packages/builders/src/commands.ts:310

Builds a role command option.

new CreateRoleOption(): CreateRoleOption

Defined in: packages/builders/src/commands.ts:312

Creates a role option.

CreateRoleOption

CreateCommandOption.constructor

setAutocomplete(enabled?): this

Defined in: packages/builders/src/commands.ts:179

Sets autocomplete; options with choices cannot use it.

boolean = true

this

CreateCommandOption.setAutocomplete


setDescription(description): this

Defined in: packages/builders/src/commands.ts:168

Sets the option description.

string

this

CreateCommandOption.setDescription


setName(name): this

Defined in: packages/builders/src/commands.ts:162

Sets the option name.

string

this

CreateCommandOption.setName


setRequired(required?): this

Defined in: packages/builders/src/commands.ts:174

Makes the option required or optional.

boolean = true

this

CreateCommandOption.setRequired


toJSON(): Record<string, unknown>

Defined in: packages/builders/src/commands.ts:190

Serializes the option payload.

Record<string, unknown>

CreateCommandOption.toJSON