# OptionBuilder

Defined in: [sdk/js/src/builders/options.ts:27](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L27)

One value option (used through `addStringOption(o => …)` and friends).

## Constructors

### Constructor

> **new OptionBuilder**(`type`): `OptionBuilder`

Defined in: [sdk/js/src/builders/options.ts:41](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L41)

#### Parameters

##### type

[`ApplicationCommandOptionType`](/docs/reference/js/zaun-bot/type-aliases/applicationcommandoptiontype/)

#### Returns

`OptionBuilder`

## Properties

### description

> **description**: `string` = `''`

Defined in: [sdk/js/src/builders/options.ts:29](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L29)

***

### name

> **name**: `string` = `''`

Defined in: [sdk/js/src/builders/options.ts:28](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L28)

***

### required

> **required**: `boolean` = `false`

Defined in: [sdk/js/src/builders/options.ts:30](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L30)

***

### type

> `readonly` **type**: [`ApplicationCommandOptionType`](/docs/reference/js/zaun-bot/type-aliases/applicationcommandoptiontype/)

Defined in: [sdk/js/src/builders/options.ts:41](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L41)

## Methods

### addChannelTypes()

> **addChannelTypes**(...`kinds`): `this`

Defined in: [sdk/js/src/builders/options.ts:71](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L71)

Channel kinds offered (channel options).

#### Parameters

##### kinds

...`string`[]

#### Returns

`this`

***

### addChoices()

> **addChoices**(...`choices`): `this`

Defined in: [sdk/js/src/builders/options.ts:64](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L64)

Fixed choices (string, integer and number options).

#### Parameters

##### choices

...`object`[]

#### Returns

`this`

***

### setAutocomplete()

> **setAutocomplete**(`autocomplete?`): `this`

Defined in: [sdk/js/src/builders/options.ts:92](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L92)

Suggest values as the invoker types (`bot.on('autocomplete')`); not with choices.

#### Parameters

##### autocomplete?

`boolean` = `true`

#### Returns

`this`

***

### setDescription()

> **setDescription**(`description`): `this`

Defined in: [sdk/js/src/builders/options.ts:47](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L47)

#### Parameters

##### description

`string`

#### Returns

`this`

***

### setDescriptionLocalizations()

> **setDescriptionLocalizations**(`map`): `this`

Defined in: [sdk/js/src/builders/options.ts:59](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L59)

#### Parameters

##### map

`Record`\<`string`, `string`\>

#### Returns

`this`

***

### setMaxLength()

> **setMaxLength**(`n`): `this`

Defined in: [sdk/js/src/builders/options.ts:87](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L87)

#### Parameters

##### n

`number`

#### Returns

`this`

***

### setMaxValue()

> **setMaxValue**(`n`): `this`

Defined in: [sdk/js/src/builders/options.ts:79](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L79)

#### Parameters

##### n

`number`

#### Returns

`this`

***

### setMinLength()

> **setMinLength**(`n`): `this`

Defined in: [sdk/js/src/builders/options.ts:83](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L83)

#### Parameters

##### n

`number`

#### Returns

`this`

***

### setMinValue()

> **setMinValue**(`n`): `this`

Defined in: [sdk/js/src/builders/options.ts:75](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L75)

#### Parameters

##### n

`number`

#### Returns

`this`

***

### setName()

> **setName**(`name`): `this`

Defined in: [sdk/js/src/builders/options.ts:43](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L43)

#### Parameters

##### name

`string`

#### Returns

`this`

***

### setNameLocalizations()

> **setNameLocalizations**(`map`): `this`

Defined in: [sdk/js/src/builders/options.ts:55](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L55)

#### Parameters

##### map

`Record`\<`string`, `string`\>

#### Returns

`this`

***

### setRequired()

> **setRequired**(`required?`): `this`

Defined in: [sdk/js/src/builders/options.ts:51](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L51)

#### Parameters

##### required?

`boolean` = `true`

#### Returns

`this`

***

### toWit()

> **toWit**(): `CommandOption`

Defined in: [sdk/js/src/builders/options.ts:110](https://github.com/zaunchat/zaun-bot/blob/main/sdk/js/src/builders/options.ts#L110)

#### Returns

`CommandOption`
