Expand description
Webhooks without a bot: WebhookClient (D-238), and the errors of the webhook methods.
use djs_rs::WebhookClient;
let webhook = WebhookClient::from_url(&std::env::var("WEBHOOK_URL")?)?;
let message = webhook.send("Deployed!").await?;
println!("sent {}", message.id);Structs§
- Invalid
Webhook Url - The URL given to
WebhookClient::from_urlis not a Discord webhook URL (D-241). - Webhook
Client - A webhook used through its ID and token, without a bot token or a gateway connection: sending messages to a channel from a script, a CI job or a server.
Enums§
- Webhook
Error - An error of a webhook method that needs the webhook’s token (D-240).