Skip to content

Enum command::object::Component

zaun_community_protocol::command::object::Component · Enum

pub enum Component { … }

One component. The variant is the wire type number.

1: a row of up to five buttons or one select.

4: modal only, inside a label.

7: members and roles.

9: text with a button or thumbnail beside it (V2).

10: markdown text (V2, modal).

11: a small picture, only as a section’s accessory.

12: up to ten pictures (V2).

13: one attached file (V2).

14: space or a line between components (V2).

17: a box around other components (V2).

18: a modal field’s label around one input.

19: files the invoker uploads in a modal.

21: one choice among options, in a modal.

22: several choices, in a modal.

23: one yes/no box, in a modal.

pub const fn kind(&self) -> u8

The wire type number.

pub fn custom_id(&self) -> Option<&str>

The component’s custom_id, for the kinds that send interactions or carry input.

pub fn children(&self) -> Vec<&Self>

The nested components, in order (children, then a section’s accessory, then a label’s input).

Clone, Debug, Deserialize<'de>, Eq, PartialEq, Serialize, StructuralPartialEq

Full rustdoc page