Skip to content

zaun_bot::Modal · Struct

pub struct Modal { … }

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

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

A modal; title ≤ 45 scalars.

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

Adds a text input under label (≤ 45).

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

Adds a select under label.

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

Adds a block of text.

pub fn build(self) -> Modal

The finished modal.

Clone, Debug, From<Modal>

Full rustdoc page