Skip to content

Struct Response

zaun_client::Response · Struct

pub struct Response { … }

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

pub fn message(body: MessageBody) -> Self

A message in the channel (type 4).

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

A text message in the channel.

pub fn ephemeral(body: MessageBody) -> Self

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

pub fn defer(ephemeral: bool) -> Self

“Thinking…” now, the message later with edit_original (type 5).

pub const fn defer_update() -> Self

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

pub fn update(body: MessageBody) -> Self

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

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

Autocomplete suggestions, up to 25 (type 8).

pub fn show(modal: Modal) -> Self

Open modal (type 9).

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.

Clone, Debug, PartialEq, StructuralPartialEq

Full rustdoc page