/// Add common data to a Discord embed. This includes the author, footer, and timestamp.
Add common data to a Discord embed. This includes the author, footer, and timestamp.
Add common data to a Discord embed . This includes the author footer and timestamp .
fn embed_common(create_embed: &mut CreateEmbed) -> &mut CreateEmbed {
    create_embed
        // Timestamp is always now
        .timestamp(&chrono::Utc::now())
        // Footer is telescope version
        .footer(|create_footer| {
            create_footer.text(format!("Telescope {}", env!("CARGO_PKG_VERSION")))
        })
        // Author links to telescope's github.
        .author(|create_author| {
            create_author
                // Don't include the telescope icon - we only link to the github
                .name("Telescope")
                .url("https://github.com/rcos/Telescope")
        })
}
fn embed_common ( create_embed : & mut CreateEmbed ) -> & mut CreateEmbed { create_embed // Timestamp is always now . timestamp ( & chrono :: Utc :: now ( ) ) // Footer is telescope version . footer ( | create_footer | { create_footer . text ( format ! ( " " env ( " " ) ) ) } ) // Author links to telescope's github. . author ( | create_author | { create_author // Don't include the telescope icon - we only link to the github . name ( " " ) . url ( " " ) } ) }
Add common data to a Discord embed.
Add common data to a Discord embed .
create_embed
&mut CreateEmbed