# Struct Modal

> Builds a types::Modal: 1–5 labelled inputs and text blocks.

`zaun_bot::Modal` · Struct

```rust
pub struct Modal { … }
```

Builds a [`types::Modal`]: 1–5 labelled inputs and text blocks.

## Methods

### `new`

```rust
pub fn new<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, title: impl Into<String>) -> Self
```

A modal; `title` ≤ 45 scalars.

### `input`

```rust
pub fn input<impl Into<String>>(self, label: impl Into<String>, input: TextInput) -> Self
```

Adds a text input under `label` (≤ 45).

### `select`

```rust
pub fn select<impl Into<String>>(self, label: impl Into<String>, select: Select) -> Self
```

Adds a select under `label`.

### `text`

```rust
pub fn text<impl Into<String>>(self, content: impl Into<String>) -> Self
```

Adds a block of text.

### `build`

```rust
pub fn build(self) -> Modal
```

The finished modal.

## Trait implementations

`Clone`, `Debug`, `From<Modal>`

[Full rustdoc page](/docs/api/rust/zaun-bot/zaun_bot/modal/struct.Modal.html)
