# SlashCommandBuilder

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

A slash command (`CHAT_INPUT`).

## Extends

- `WithOptions`

## Implements

- [`CommandLike`](/docs/reference/js/zaun-bot/interfaces/commandlike/)

## Constructors

### Constructor

> **new SlashCommandBuilder**(): `SlashCommandBuilder`

#### Returns

`SlashCommandBuilder`

#### Inherited from

`WithOptions.constructor`

## Properties

### description

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

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

#### Inherited from

[`SlashCommandSubcommandBuilder`](/docs/reference/js/zaun-bot/classes/slashcommandsubcommandbuilder/).[`description`](/docs/reference/js/zaun-bot/classes/slashcommandsubcommandbuilder/#description)

***

### descriptionLocalizations?

> `optional` **descriptionLocalizations?**: `Record`\<`string`, `string`\>

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

#### Inherited from

`WithOptions.descriptionLocalizations`

***

### name

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

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

#### Implementation of

[`CommandLike`](/docs/reference/js/zaun-bot/interfaces/commandlike/).[`name`](/docs/reference/js/zaun-bot/interfaces/commandlike/#name)

#### Inherited from

[`SlashCommandSubcommandBuilder`](/docs/reference/js/zaun-bot/classes/slashcommandsubcommandbuilder/).[`name`](/docs/reference/js/zaun-bot/classes/slashcommandsubcommandbuilder/#name)

***

### nameLocalizations?

> `optional` **nameLocalizations?**: `Record`\<`string`, `string`\>

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

#### Inherited from

`WithOptions.nameLocalizations`

***

### options

> `readonly` **options**: [`OptionBuilder`](/docs/reference/js/zaun-bot/classes/optionbuilder/)[] = `[]`

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

#### Inherited from

`WithOptions.options`

## Methods

### addAttachmentOption()

> **addAttachmentOption**(`f`): `this`

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

#### Parameters

##### f

`OptionFn`

#### Returns

`this`

#### Inherited from

`WithOptions.addAttachmentOption`

***

### addBooleanOption()

> **addBooleanOption**(`f`): `this`

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

#### Parameters

##### f

`OptionFn`

#### Returns

`this`

#### Inherited from

`WithOptions.addBooleanOption`

***

### addChannelOption()

> **addChannelOption**(`f`): `this`

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

#### Parameters

##### f

`OptionFn`

#### Returns

`this`

#### Inherited from

`WithOptions.addChannelOption`

***

### addIntegerOption()

> **addIntegerOption**(`f`): `this`

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

#### Parameters

##### f

`OptionFn`

#### Returns

`this`

#### Inherited from

`WithOptions.addIntegerOption`

***

### addMentionableOption()

> **addMentionableOption**(`f`): `this`

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

#### Parameters

##### f

`OptionFn`

#### Returns

`this`

#### Inherited from

`WithOptions.addMentionableOption`

***

### addNumberOption()

> **addNumberOption**(`f`): `this`

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

#### Parameters

##### f

`OptionFn`

#### Returns

`this`

#### Inherited from

`WithOptions.addNumberOption`

***

### addRoleOption()

> **addRoleOption**(`f`): `this`

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

#### Parameters

##### f

`OptionFn`

#### Returns

`this`

#### Inherited from

`WithOptions.addRoleOption`

***

### addStringOption()

> **addStringOption**(`f`): `this`

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

#### Parameters

##### f

`OptionFn`

#### Returns

`this`

#### Inherited from

`WithOptions.addStringOption`

***

### addSubcommand()

> **addSubcommand**(`f`): `this`

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

#### Parameters

##### f

(`s`) => [`SlashCommandSubcommandBuilder`](/docs/reference/js/zaun-bot/classes/slashcommandsubcommandbuilder/)

#### Returns

`this`

***

### addSubcommandGroup()

> **addSubcommandGroup**(`f`): `this`

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

#### Parameters

##### f

(`g`) => [`SlashCommandSubcommandGroupBuilder`](/docs/reference/js/zaun-bot/classes/slashcommandsubcommandgroupbuilder/)

#### Returns

`this`

***

### addUserOption()

> **addUserOption**(`f`): `this`

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

#### Parameters

##### f

`OptionFn`

#### Returns

`this`

#### Inherited from

`WithOptions.addUserOption`

***

### setDefaultMemberPermissions()

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

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

Bits the invoker needs (`0n` = owner only; `null` = everyone, the default).

#### Parameters

##### bits

`number` \| `bigint`

#### Returns

`this`

***

### setDescription()

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

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

#### Parameters

##### description

`string`

#### Returns

`this`

#### Inherited from

`WithOptions.setDescription`

***

### setDescriptionLocalizations()

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

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

#### Parameters

##### map

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

#### Returns

`this`

#### Inherited from

`WithOptions.setDescriptionLocalizations`

***

### setName()

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

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

#### Parameters

##### name

`string`

#### Returns

`this`

#### Inherited from

`WithOptions.setName`

***

### setNameLocalizations()

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

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

#### Parameters

##### map

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

#### Returns

`this`

#### Inherited from

`WithOptions.setNameLocalizations`

***

### toJSON()

> **toJSON**(): `ApplicationCommand`

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

the WIT form.

#### Returns

`ApplicationCommand`

***

### toWit()

> **toWit**(): `ApplicationCommand`

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

#### Returns

`ApplicationCommand`

#### Implementation of

[`CommandLike`](/docs/reference/js/zaun-bot/interfaces/commandlike/).[`toWit`](/docs/reference/js/zaun-bot/interfaces/commandlike/#towit)
