7 unstable releases (3 breaking)

0.4.2 Nov 28, 2024
0.4.1 Oct 10, 2024
0.4.0 Sep 23, 2024
0.3.1 Aug 3, 2024
0.1.0 Jul 10, 2024

#605 in Network programming

Download history 3/week @ 2024-09-04 14/week @ 2024-09-11 126/week @ 2024-09-18 58/week @ 2024-09-25 16/week @ 2024-10-02 203/week @ 2024-10-09 27/week @ 2024-10-16 11/week @ 2024-10-23 20/week @ 2024-10-30 38/week @ 2024-11-06 43/week @ 2024-11-13 7/week @ 2024-11-20 137/week @ 2024-11-27 46/week @ 2024-12-04

245 downloads per month

Apache-2.0

43KB
1K SLoC

discord-webhook2

Crates.io Version Crates.io Total Downloads Crates.io License

A Rust library to interact with advanced discord webhooks.

Why use this one over the others?

While there are multiple other libraries, most of them are either unmaintained or lack certain features...

Supports:

  • Embeds
  • Handling message ids
  • Uploading files/extra data
  • Sending, getting, editing and deleting messages
  • Polls
  • Emojis

Example

A basic "Hello World" using discord-webhook2:

use discord_webhook2::{DiscordWebhook, Message};

#[tokio::main]
async fn main() {
    let webhook = DiscordWebhook::new("discord webhook url").unwrap();

    webhook.send(&Message::new(|message| message
        .content("Hello World!")
    )).await.unwrap();
}

More examples can be found in the examples directory discord-webhook2/examples.

Contributing

Contributing is always appreciated. Feel free to create issues or open pull requests at any time.

If you like this project dont forget to leave a star on github!

Dependencies

~7–19MB
~252K SLoC