Skip to content

Struct ui::OptionBuilder

zaun_client::ui::OptionBuilder · Struct

pub struct OptionBuilder(…)

An option of a slash command.

pub fn new(kind: OptionType, name: &str, description: &str) -> Self

An option of kind.

pub fn string(name: &str, description: &str) -> Self

Text.

pub fn integer(name: &str, description: &str) -> Self

A whole number.

pub fn user(name: &str, description: &str) -> Self

A member.

pub const fn required(self) -> Self

Must be given.

pub const fn autocomplete(self) -> Self

The bot suggests values as the member types.

pub fn choice(self, name: &str, value: &str) -> Self

A fixed string choice.

Clone, Debug

Full rustdoc page