Struct serenity::model::Embed
[−]
[src]
pub struct Embed { pub author: Option<EmbedAuthor>, pub colour: Colour, pub description: Option<String>, pub fields: Option<Vec<EmbedField>>, pub image: Option<EmbedImage>, pub kind: String, pub provider: Option<EmbedProvider>, pub thumbnail: Option<EmbedThumbnail>, pub timestamp: Option<String>, pub title: Option<String>, pub url: Option<String>, pub video: Option<EmbedVideo>, }
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
Author information about the embed.
colour: Colour
The colour code of the embed.
description: Option<String>
The description of the embed. This is the long string of text.
fields: Option<Vec<EmbedField>>
The array of fields of the embed.
image: Option<EmbedImage>
The image information of the embed.
kind: String
The type of the embed. For webhook embeds, this is always rich
.
provider: Option<EmbedProvider>
The provider information for the embed.
thumbnail: Option<EmbedThumbnail>
The thumbnail provided for the embed.
timestamp: Option<String>
Timestamp of embed content.
title: Option<String>
The title of the embed.
url: Option<String>
The URL of the embed.
video: Option<EmbedVideo>
The embed's video information.
Methods
impl Embed
[src]
fn fake<F>(f: F) -> Value where F: FnOnce(CreateEmbed) -> CreateEmbed
Creates a fake Embed, giving back a serde_json
map.
This should only be useful in conjunction with Webhook::execute
.
Trait Implementations
impl Clone for Embed
[src]
fn clone(&self) -> Embed
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more