Skip to content

Struct TextInput

zaun_bot::TextInput · Struct

pub struct TextInput(…)

Builds a types::TextInput for a modal.

pub fn short<impl Into<String>>(custom_id: impl Into<String>) -> Self

A one-line input.

pub fn paragraph<impl Into<String>>(custom_id: impl Into<String>) -> Self

A multi-line input.

pub fn length(self, min: u16, max: u16) -> Self

Length bounds (0–4 000).

pub fn required(self, required: bool) -> Self

Whether it must be filled (default true).

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

Placeholder (≤ 100).

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

Pre-filled value.

Clone, Debug

Full rustdoc page