# Struct Response

> What a bot answers an interaction with. Build one with the constructors.

`zaun_client::Response` · Struct

```rust
pub struct Response { … }
```

What a bot answers an interaction with. Build one with the constructors.

## Methods

### `message`

```rust
pub fn message(body: MessageBody) -> Self
```

A message in the channel (type 4).

### `text`

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

A text message in the channel.

### `ephemeral`

```rust
pub fn ephemeral(body: MessageBody) -> Self
```

A message only the invoker sees (type 4 with `EPHEMERAL`).

### `defer`

```rust
pub fn defer(ephemeral: bool) -> Self
```

"Thinking…" now, the message later with `edit_original` (type 5).

### `defer_update`

```rust
pub const fn defer_update() -> Self
```

Acknowledge a component click without a visible change yet (type 6).

### `update`

```rust
pub fn update(body: MessageBody) -> Self
```

Edit the message holding the clicked component (type 7).

### `choices`

```rust
pub fn choices(choices: Vec<Choice>) -> Self
```

Autocomplete suggestions, up to 25 (type 8).

### `show`

```rust
pub fn show(modal: Modal) -> Self
```

Open `modal` (type 9).

### `modal`

```rust
pub fn modal<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, title: impl Into<String>, components: Vec<Component>) -> Self
```

Open a modal (type 9): 1–5 labels or text displays.

## Trait implementations

`Clone`, `Debug`, `PartialEq`, `StructuralPartialEq`

[Full rustdoc page](/docs/api/rust/zaun-client/zaun_client/bots/respond/struct.Response.html)
