Lavende
Lavende is a high-performance native audio processing library designed specifically for Discord bots. It completely replaces traditional external JVM-based nodes by running a native Rust core directly inside your bot's process.
Summary
Features
- Native Performance: Engineered entirely in Rust for a minimal memory footprint and blistering execution speed.
- Zero-IPC Latency: Executes directly inside your application without REST or WebSocket overhead.
- Embedded DSP Engine: Apply Nightcore, Vaporwave, Bassboost, Equalizers, and 3D Rotation effortlessly on the native audio stream.
- DAVE (E2EE): Full support for Discord's End-to-End Encryption protocol out of the box.
- Multi-Language Support: Fully functional and strictly typed wrappers for Node.js, Python, Golang, and Rust.
- Audio Sources: Built-in resolution for YouTube, SoundCloud, Spotify, Apple Music, and Deezer via internal C-bindings.
Getting Started
Installing
Depending on your language, install Lavende via your package manager:
Node.js:
Python:
Golang:
Rust:
Initializing Lavende
Lavende sits side-by-side with your Discord API wrapper (e.g., discord.js, discord.py, discordgo). You simply pipe raw voice socket events into the Lavende Manager so that the Rust core can establish the UDP connection.
Here is a quick Node.js initialization strategy:
const = require;
const = require;
const client = ;
let manager = null;
client.;
// Pass raw socket events to Lavende to establish the Voice connection
client.;
client.;
Quick Start
- Clone the repository:
-
Choose your preferred language from the
_examplesdirectory:- Rust
- JavaScript / TypeScript
- Go
- Python
-
Create a
.envfile and add your Discord bot token:
TOKEN=YOUR_BOT_TOKEN
- Install dependencies and run the example for your chosen language.
Node.js
Python
Go
Rust
For detailed guides, API documentation, and architecture information, see the docs/ directory.
Documentation
Extensive documentation detailing the Rust architecture, the LavendeManager, Player, and Filters can be found in our official documentation directory:
Examples
The best way to understand how to build a bot with Lavende is to analyze the official boilerplate examples: