#webhook #discord #discord-api #send-message #async #edit #builder

diswh

A simple way to send webhook messages, or edit for discord. Fully featured with builders to make things easy!

2 unstable releases

0.2.0 Jan 10, 2024
0.1.1 Jan 9, 2024
0.1.0 Jan 9, 2024

#2062 in Web programming

Download history 13/week @ 2024-01-07 40/week @ 2024-02-18 14/week @ 2024-02-25 1/week @ 2024-03-10 69/week @ 2024-03-31

69 downloads per month

CC0 license

16KB
446 lines

Diswh

A webhook api for Discord, built in rust. Async can be enabled using the async feature. Then you must use one of the many async dispatchers like tokio or async-std!

How to use:

use diswh::{MessageBuilder, WebhookBuilder};

fn main() -> Result<(), std::error::Error> {
    WebhookBuilder::new("url")
        .send_message(
            MessageBuilder::new("Hello webhook!", false).build()
        )?;
}

Or for Async use:

use diswh::{MessageBuilder, WebhookBuilder};

fn main() -> Result<(), std::error::Error> {
    WebhookBuilder::new("url")
        .send_message_async(
            MessageBuilder::new("Hello webhook!", false).build()
        ).await?;
}

Dependencies

~4–18MB
~260K SLoC