Struct command::object::MessageBody
zaun_community_protocol::command::object::MessageBody · Struct
pub struct MessageBody { … }Content, embeds, components, attachments, mentions and flags of a bot’s message.
Fields
Section titled “Fields”content: Option<String>
Section titled “content: Option<String>”≤ 4 000 scalars.
embeds: Option<Vec<Embed>>
Section titled “embeds: Option<Vec<Embed>>”≤ 10 embeds.
components: Option<Vec<Component>>
Section titled “components: Option<Vec<Component>>”Components.
attachments: Vec<AttachmentId>
Section titled “attachments: Vec<AttachmentId>”Attachments the bot uploaded to the channel, not yet on a message.
mentions: Option<Mentions>
Section titled “mentions: Option<Mentions>”Who to notify.
flags: Option<u32>
Section titled “flags: Option<u32>”flags bits.
Methods
Section titled “Methods”flag_bits
Section titled “flag_bits”pub fn flag_bits(&self) -> u32The flags, 0 when absent.
is_ephemeral
Section titled “is_ephemeral”pub fn is_ephemeral(&self) -> boolWhether EPHEMERAL is set.
pub fn check(&self, whole: bool) -> Result<(), BodyError>State-free rules. whole: a new message (needs something to show), not an edit.
Errors
Section titled “Errors”The first violated rule.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Default, Deserialize<'de>, Eq, PartialEq, Serialize, StructuralPartialEq