# CommandBuilder

Defined in: [zaun/js/index.d.ts:456](https://github.com/zaunchat/zaun-client/blob/main/zaun/js/index.d.ts#L456)

## Extends

- `Builder`\<[`ApplicationCommandData`](/docs/reference/js/zaun-client/interfaces/applicationcommanddata/)\>

## Constructors

### Constructor

> **new CommandBuilder**(`data?`): `CommandBuilder`

Defined in: [zaun/js/index.d.ts:457](https://github.com/zaunchat/zaun-client/blob/main/zaun/js/index.d.ts#L457)

#### Parameters

##### data?

`object`

#### Returns

`CommandBuilder`

#### Overrides

`Builder<ApplicationCommandData>.constructor`

## Properties

### data

> **data**: [`ApplicationCommandData`](/docs/reference/js/zaun-client/interfaces/applicationcommanddata/)

Defined in: [zaun/js/index.d.ts:410](https://github.com/zaunchat/zaun-client/blob/main/zaun/js/index.d.ts#L410)

#### Inherited from

`Builder.data`

## Methods

### addOption()

> **addOption**(`option`): `this`

Defined in: [zaun/js/index.d.ts:462](https://github.com/zaunchat/zaun-client/blob/main/zaun/js/index.d.ts#L462)

#### Parameters

##### option

[`CommandOptionData`](/docs/reference/js/zaun-client/interfaces/commandoptiondata/) \| \{ `toJSON`(): [`CommandOptionData`](/docs/reference/js/zaun-client/interfaces/commandoptiondata/); \}

#### Returns

`this`

***

### setDefaultMemberPermissions()

> **setDefaultMemberPermissions**(`bits`): `this`

Defined in: [zaun/js/index.d.ts:461](https://github.com/zaunchat/zaun-client/blob/main/zaun/js/index.d.ts#L461)

#### Parameters

##### bits

`string` \| `bigint`

#### Returns

`this`

***

### setDescription()

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

Defined in: [zaun/js/index.d.ts:459](https://github.com/zaunchat/zaun-client/blob/main/zaun/js/index.d.ts#L459)

#### Parameters

##### text

`string`

#### Returns

`this`

***

### setName()

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

Defined in: [zaun/js/index.d.ts:458](https://github.com/zaunchat/zaun-client/blob/main/zaun/js/index.d.ts#L458)

#### Parameters

##### name

`string`

#### Returns

`this`

***

### setType()

> **setType**(`type`): `this`

Defined in: [zaun/js/index.d.ts:460](https://github.com/zaunchat/zaun-client/blob/main/zaun/js/index.d.ts#L460)

#### Parameters

##### type

`number`

#### Returns

`this`

***

### toJSON()

> **toJSON**(): [`ApplicationCommandData`](/docs/reference/js/zaun-client/interfaces/applicationcommanddata/)

Defined in: [zaun/js/index.d.ts:411](https://github.com/zaunchat/zaun-client/blob/main/zaun/js/index.d.ts#L411)

#### Returns

[`ApplicationCommandData`](/docs/reference/js/zaun-client/interfaces/applicationcommanddata/)

#### Inherited from

`Builder.toJSON`
