Skip to content

Struct Container

zaun_bot::Container · Struct

pub struct Container { … }

Builds a Components V2 types::Container.

pub fn new() -> Self

An empty container.

pub fn accent(self, rgb: u32) -> Self

Accent colour, 0xRRGGBB.

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

Adds a text block.

pub fn section(self, section: Section) -> Self

Adds a section.

pub fn row(self, row: ActionRow) -> Self

Adds a row of buttons or a select.

pub fn separator(self) -> Self

Adds a divider line.

pub fn build(self) -> Container

The finished container.

Clone, Debug, Default

Full rustdoc page