# Struct ui::OptionBuilder

> An option of a slash command.

`zaun_client::ui::OptionBuilder` · Struct

```rust
pub struct OptionBuilder(…)
```

An option of a slash command.

## Methods

### `new`

```rust
pub fn new(kind: OptionType, name: &str, description: &str) -> Self
```

An option of `kind`.

### `string`

```rust
pub fn string(name: &str, description: &str) -> Self
```

Text.

### `integer`

```rust
pub fn integer(name: &str, description: &str) -> Self
```

A whole number.

### `user`

```rust
pub fn user(name: &str, description: &str) -> Self
```

A member.

### `required`

```rust
pub const fn required(self) -> Self
```

Must be given.

### `autocomplete`

```rust
pub const fn autocomplete(self) -> Self
```

The bot suggests values as the member types.

### `choice`

```rust
pub fn choice(self, name: &str, value: &str) -> Self
```

A fixed string choice.

## Trait implementations

`Clone`, `Debug`

[Full rustdoc page](/docs/api/rust/zaun-client/zaun_client/ui/command/struct.OptionBuilder.html)
