Enum command::object::Component
zaun_community_protocol::command::object::Component · Enum
pub enum Component { … }One component. The variant is the wire type number.
Variants
Section titled “Variants”ActionRow(ActionRow)
Section titled “ActionRow(ActionRow)”1: a row of up to five buttons or one select.
Button(Button)
Section titled “Button(Button)”StringSelect(StringSelect)
Section titled “StringSelect(StringSelect)”TextInput(TextInput)
Section titled “TextInput(TextInput)”4: modal only, inside a label.
UserSelect(EntitySelect)
Section titled “UserSelect(EntitySelect)”RoleSelect(EntitySelect)
Section titled “RoleSelect(EntitySelect)”MentionableSelect(EntitySelect)
Section titled “MentionableSelect(EntitySelect)”7: members and roles.
ChannelSelect(EntitySelect)
Section titled “ChannelSelect(EntitySelect)”Section(Section)
Section titled “Section(Section)”9: text with a button or thumbnail beside it (V2).
TextDisplay(TextDisplay)
Section titled “TextDisplay(TextDisplay)”10: markdown text (V2, modal).
Thumbnail(Thumbnail)
Section titled “Thumbnail(Thumbnail)”11: a small picture, only as a section’s accessory.
MediaGallery(MediaGallery)
Section titled “MediaGallery(MediaGallery)”12: up to ten pictures (V2).
File(FileComponent)
Section titled “File(FileComponent)”13: one attached file (V2).
Separator(Separator)
Section titled “Separator(Separator)”14: space or a line between components (V2).
Container(Container)
Section titled “Container(Container)”17: a box around other components (V2).
Label(Label)
Section titled “Label(Label)”18: a modal field’s label around one input.
FileUpload(FileUpload)
Section titled “FileUpload(FileUpload)”19: files the invoker uploads in a modal.
RadioGroup(RadioGroup)
Section titled “RadioGroup(RadioGroup)”21: one choice among options, in a modal.
CheckboxGroup(CheckboxGroup)
Section titled “CheckboxGroup(CheckboxGroup)”22: several choices, in a modal.
Checkbox(Checkbox)
Section titled “Checkbox(Checkbox)”23: one yes/no box, in a modal.
Methods
Section titled “Methods”pub const fn kind(&self) -> u8The wire type number.
custom_id
Section titled “custom_id”pub fn custom_id(&self) -> Option<&str>The component’s custom_id, for the kinds that send interactions or carry input.
children
Section titled “children”pub fn children(&self) -> Vec<&Self>The nested components, in order (children, then a section’s accessory, then a label’s input).
Trait implementations
Section titled “Trait implementations”Clone, Debug, Deserialize<'de>, Eq, PartialEq, Serialize, StructuralPartialEq