Struct discord::builders::EmbedBuilder
[−]
[src]
pub struct EmbedBuilder(_);
Patch content for the send_embed call.
Methods
impl EmbedBuilder[src]
fn merge(self, other: EmbedBuilder) -> EmbedBuilder
Merge this builder's contents with another of the same type.
Keys in other will override those in self.
This method is intended to be used with deserialized instances. Note that deserialization does not check that the keys are valid for the relevant API call.
discord.edit_server(|b| b .merge(serde_json::from_str(r#"{"name":"My Server"}"#)?))
impl EmbedBuilder[src]
fn title(self, title: &str) -> Self
Add the "title of embed".
fn description(self, description: &str) -> Self
Add the "description of embed".
fn url(self, url: &str) -> Self
Add the "url of embed".
fn timestamp(self, timestamp: DateTime<FixedOffset>) -> Self
Add the "timestamp of embed content".
fn color(self, color: u64) -> Self
Add the "color code of the embed".
Add "footer information". See the EmbedFooterBuilder struct for the editable fields.
fn image(self, url: &str) -> Self
Add "source url of image". Only supports http(s).
fn thumbnail(self, url: &str) -> Self
Add "source url of thumbnail". Only supports http(s).
Add "author information". See the EmbedAuthorBuilder struct for the editable fields.
fn fields<F: FnOnce(EmbedFieldsBuilder) -> EmbedFieldsBuilder>(
self,
f: F
) -> Self
self,
f: F
) -> Self
Add "fields information". See the EmbedFieldsBuilder struct for the editable fields.