Struct Response
zaun_client::Response · Struct
pub struct Response { … }What a bot answers an interaction with. Build one with the constructors.
Methods
Section titled “Methods”message
Section titled “message”pub fn message(body: MessageBody) -> SelfA message in the channel (type 4).
pub fn text<impl Into<String>>(content: impl Into<String>) -> SelfA text message in the channel.
ephemeral
Section titled “ephemeral”pub fn ephemeral(body: MessageBody) -> SelfA 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).
defer_update
Section titled “defer_update”pub const fn defer_update() -> SelfAcknowledge a component click without a visible change yet (type 6).
update
Section titled “update”pub fn update(body: MessageBody) -> SelfEdit the message holding the clicked component (type 7).
choices
Section titled “choices”pub fn choices(choices: Vec<Choice>) -> SelfAutocomplete suggestions, up to 25 (type 8).
pub fn show(modal: Modal) -> SelfOpen modal (type 9).
pub fn modal<impl Into<String>, impl Into<String>>(custom_id: impl Into<String>, title: impl Into<String>, components: Vec<Component>) -> SelfOpen a modal (type 9): 1–5 labels or text displays.
Trait implementations
Section titled “Trait implementations”Clone, Debug, PartialEq, StructuralPartialEq