Crates.io | diswh |
lib.rs | diswh |
version | 0.2.0 |
source | src |
created_at | 2024-01-09 06:24:47.25504 |
updated_at | 2024-01-10 12:19:21.004111 |
description | A simple way to send webhook messages, or edit for discord. Fully featured with builders to make things easy! |
homepage | |
repository | https://github.com/HellFireNeko/diswh |
max_upload_size | |
id | 1093373 |
size | 22,946 |
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
!
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?;
}