Struct command::object::Embed
zaun_community_protocol::command::object::Embed · Struct
pub struct Embed { … }An embed. Every text is optional, but an embed shows something: a title, a
description, an author, a footer, a picture or a field (color, timestamp and url
alone do not count).
Fields
Section titled “Fields”title: Option<String>
Section titled “title: Option<String>”1–256 scalars.
description: Option<String>
Section titled “description: Option<String>”1–4 096 scalars.
url: Option<String>
Section titled “url: Option<String>”The title’s link: https:// only, ≤ 2 048 bytes, no whitespace or control
characters. Needs a title.
color: Option<u32>
Section titled “color: Option<u32>”0x000000–0xFFFFFF.
timestamp: Option<u64>
Section titled “timestamp: Option<u64>”A time the embed shows, ms since the epoch (< 2^53).
author: Option<EmbedAuthor>
Section titled “author: Option<EmbedAuthor>”The author line.
footer: Option<EmbedFooter>
Section titled “footer: Option<EmbedFooter>”The footer line.
image: Option<AttachmentId>
Section titled “image: Option<AttachmentId>”The large picture: one of the message’s attachments.
thumbnail: Option<AttachmentId>
Section titled “thumbnail: Option<AttachmentId>”The small picture: one of the message’s attachments.
fields: Vec<EmbedField>
Section titled “fields: Vec<EmbedField>”Up to 25 fields, in order.
Methods
Section titled “Methods”attachments
Section titled “attachments”pub fn attachments(&self) -> impl Iterator<Item = (&'static str, AttachmentId)> + '_The attachments this embed shows, with the field that names each: embeds.image,
embeds.thumbnail, embeds.author.icon, embeds.footer.icon.
is_empty
Section titled “is_empty”pub fn is_empty(&self) -> boolWhether the embed shows nothing but a colour, a time or a bare link.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Default, Deserialize<'de>, Eq, PartialEq, Serialize, StructuralPartialEq