Struct EmbedBuilder
zaun_bot::EmbedBuilder · Struct
pub struct EmbedBuilder(…)Builds an Embed. Pictures are attachment ids of the same message.
Methods
Section titled “Methods”pub fn new() -> SelfAn empty embed; give it at least a title, description, field, author or footer.
pub fn title<impl Into<String>>(self, t: impl Into<String>) -> SelfTitle (≤ 256).
description
Section titled “description”pub fn description<impl Into<String>>(self, d: impl Into<String>) -> SelfDescription (≤ 4 096).
pub fn url<impl Into<String>>(self, url: impl Into<String>) -> SelfThe title’s https:// link.
pub fn color(self, rgb: u32) -> SelfSide colour, 0xRRGGBB.
timestamp
Section titled “timestamp”pub fn timestamp(self, ms: u64) -> SelfTimestamp, ms since the epoch.
author
Section titled “author”pub fn author<impl Into<String>>(self, name: impl Into<String>) -> SelfAuthor line.
footer
Section titled “footer”pub fn footer<impl Into<String>>(self, text: impl Into<String>) -> SelfFooter text.
pub fn image<impl Into<Id>>(self, attachment: impl Into<Id>) -> SelfLarge picture: an image attachment of the same message.
thumbnail
Section titled “thumbnail”pub fn thumbnail<impl Into<Id>>(self, attachment: impl Into<Id>) -> SelfSmall picture: an image attachment of the same message.
pub fn field<impl Into<String>, impl Into<String>>(self, name: impl Into<String>, value: impl Into<String>, inline: bool) -> SelfA field (≤ 25).
pub fn build(self) -> EmbedThe finished embed.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Default, From<EmbedBuilder>