Webhook

Crates License

Use

To use this crate add this to your Cargo.toml

webhook = "1.0.0"

Example

```rust use webhook::Webhook; use std::error::Error;

[tokio::main]

fn main() -> Result<(), Box> { let webhook = Webhook::fromurl("{WEBHOOK URL}"); webhook.send(|message| message. { content("Message") .tts(true) .username("{USERNAME}") .avatarurl("{AVATARURL}") .embed(|embed| embed. // You can have up to 10 embeds title("{TITLE}") .color({COLOR}) // Example: 0x32a852 .field("{FIELD}", "{VALUE}", {INLINE} (bool)) // You can add multiple fields .field("{FIELD}", "{VALUE}", {INLINE} (bool)) .video("{URL}", None, None) .image("{URL}", {HEIGHT}, {WIDTH}) .author("{NAME}", "{URL}", "{ICONURL}", None) .footer("{NAME}", "{ICON_URl}") ) }).await?; Ok(()) } ```