#[non_exhaustive]pub struct Embed {Show 13 fields
pub title: Option<String>,
pub kind: Option<String>,
pub description: Option<String>,
pub url: Option<String>,
pub timestamp: Option<Timestamp>,
pub colour: Option<Colour>,
pub footer: Option<EmbedFooter>,
pub image: Option<EmbedImage>,
pub thumbnail: Option<EmbedThumbnail>,
pub video: Option<EmbedVideo>,
pub provider: Option<EmbedProvider>,
pub author: Option<EmbedAuthor>,
pub fields: Vec<EmbedField>,
}Expand description
Represents a rich embed which allows using richer markdown, multiple fields and more. This was heavily inspired by slack’s attachments.
You can include an attachment in your own message by a user or a bot, or in a webhook.
Note: Maximum amount of characters you can put is 256 in a field name, 1024 in a field value, and 2048 in a description.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.title: Option<String>The title of the embed.
kind: Option<String>The type of the embed. For embeds not generated by Discord’s backend, this will always be “rich”.
description: Option<String>The description of the embed.
The maximum value for this field is 2048 unicode codepoints.
url: Option<String>The URL of the embed.
timestamp: Option<Timestamp>Timestamp information.
colour: Option<Colour>The colour code of the embed.
Footer information for the embed.
image: Option<EmbedImage>Image information of the embed.
thumbnail: Option<EmbedThumbnail>Thumbnail information of the embed.
video: Option<EmbedVideo>The embed’s video information.
This is present if the Self::kind is "video".
provider: Option<EmbedProvider>Provider information for the embed.
For example, if the embed Self::kind is "video", the provider might contain
information about YouTube.
Information about the author of the embed.
fields: Vec<EmbedField>The array of fields.
The maximum number of fields is 25.