Discord Notification Sender
A Rust library for sending rich notifications to Discord channels using webhooks. This library provides a simple yet powerful API for sending both basic and advanced notifications.
Features
- Simple API for sending notifications with minimal setup
- Support for rich embeds with customizable colors and images
- Automatic handling of Discord API authentication
- Built with the latest Rust dependencies (reqwest 0.12, tokio 1.45)
- Environment variable support through dotenv
- Pretty-printed bot details for better debugging
- Testable API with mock support
Installation
Add this to your Cargo.toml:
[]
= "0.3.1"
Usage
Basic Notification
use DiscordBot;
async
Advanced Notification with Embeds
use DiscordBot;
async
Environment Variables
The library requires a Discord bot token to be set in the environment or in a .env file:
DISCORD_TOKEN=your_discord_bot_token_here
