hookburn-discord
An async Rust crate for sending rich messages to Discord via webhooks.
Features
- Typed message builder — construct
WebhookMessageandEmbedpayloads with a fluent builder API; validation happens at.build()time, not at runtime. discord_message!/embed!macros — shorthand for common one-liner messages.- Rate-limit awareness — Discord's HTTP 429 surfaces as
WebhookError::RateLimitedwith aretry_after_msfield so you can back off correctly. - Thread support — post into existing threads or create new ones in forum channels.
AllowedMentionscontrol — always safe to pass user-generated content; silence@everyonepings with a single call.- JSON code blocks — format any
Serializevalue as a Discord code block in message content or embed descriptions/fields. - Pluggable TLS —
rustlsby default (pure Rust, no OpenSSL); opt intonative-tlsvia a feature flag. WebhookSendertrait — write code that is generic over notification backends (Discord, Slack, etc.) viahooksmith-core.