#discord-webhook #discord

discord-message

A crate containing the utilities needed to build Discord webhook messages from Rust

1 unstable release

0.1.0 Jul 22, 2021

#16 in #discord-webhook

Download history 393/week @ 2025-10-13 807/week @ 2025-10-20 741/week @ 2025-10-27 418/week @ 2025-11-03 658/week @ 2025-11-10 449/week @ 2025-11-17 162/week @ 2025-11-24 670/week @ 2025-12-01 887/week @ 2025-12-08 480/week @ 2025-12-15 242/week @ 2025-12-22 179/week @ 2025-12-29 828/week @ 2026-01-05 713/week @ 2026-01-12 672/week @ 2026-01-19 658/week @ 2026-01-26

2,876 downloads per month
Used in 3 crates

GPL-3.0 license

6KB
52 lines

discord-message

Crates.io Docs.rs

discord-message is a crate containing the utilities needed to build Discord webhook messages from Rust

Example message creation

fn main() {
    let message = DiscordMessage {
        username: Some("BotMan".to_string()),
        content: "Text message. Up to 2000 characters.".to_string(),
        embeds: vec![
            Embed {
                title: "Title".to_string(),
                description: "Text message. You can use Markdown here.".to_string(),
                ..Default::default()
            }
        ],
        ..Default::default()
    };
    let json = message.to_json().unwrap();
}

Dependencies

~2.5–4MB
~71K SLoC