A modern Discord music bot built with Rust, featuring high-quality audio playback powered by Lavalink and Spotify integration.
Note
This is a private bot project. The code is open-source for transparency and bug reporting purposes only. Please do not host your own instance of this bot. Contributions to fix bugs and improve code quality are welcome.
- 🎵 High-Quality Audio Playback - Crystal clear audio powered by Lavalink
- 🎧 Spotify Integration - Search and play tracks directly from Spotify
- 🔍 Smart Autocomplete - Intelligent search suggestions as you type
- 🎼 Queue Management - Add songs and playlists to your queue
- ⚡ Fast & Efficient - Built with Rust for optimal performance
- 🎨 Beautiful Embeds - Rich, colorful Discord embeds for all responses
Want to use OnBeat Bot? Add the official instance to your server:
This section is for developers who want to contribute bug fixes and improvements.
- Rust (latest stable version)
- Lavalink Server (for audio processing)
- Java 17+ (for Lavalink)
-
Fork and clone the repository
git clone https://github.com/yourusername/onbeat-bot.git cd onbeat-bot -
Set up Lavalink for testing
Download Lavalink from GitHub Releases
Create an
application.ymlfile:server: port: 2333 address: 0.0.0.0 lavalink: server: password: "youshallnotpass" sources: youtube: true bandcamp: true soundcloud: true twitch: true vimeo: true http: true local: false bufferDurationMs: 400 frameBufferDurationMs: 5000 youtubePlaylistLoadLimit: 6 playerUpdateInterval: 5 youtubeSearchEnabled: true soundcloudSearchEnabled: true gc-warnings: true metrics: prometheus: enabled: false endpoint: /metrics sentry: dsn: "" environment: "" logging: file: path: ./logs/ level: root: INFO lavalink: INFO plugins: - dependency: "dev.lavalink.youtube:youtube-plugin:1.7.2" snapshot: false
-
Configure environment variables
Copy
.env.exampleto.env:cp .env.example .env
Edit
.envwith your test bot credentials:LAVA_HOST=localhost:2333 LAVA_PASSWORD=youshallnotpass BOT_TOKEN=your_test_bot_token_here
-
Build and test
cargo build cargo run
Start your Lavalink server:
java -jar Lavalink.jarThen run the bot and test your changes thoroughly before submitting a pull request.
- Rust - Systems programming language
- Poise - Discord bot framework
- Serenity - Discord API library
- Songbird - Voice client
- Lavalink-rs - Lavalink client
- Lavalink - Audio player server
- Tokio - Async runtime
/play never gonna give you up
/play https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT
/play https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M
- Ensure you're in a voice channel before using
/joinor/play - Check bot permissions (Connect, Speak)
- Verify Lavalink is running
- Check Lavalink logs for errors
- Ensure Lavalink plugins are properly loaded
- Verify your internet connection
- Wait a few minutes for Discord to register slash commands
- Try kicking and re-inviting the bot
- Check bot has
applications.commandsscope
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
- Lavalink for the amazing audio server
- Serenity community for Discord API support
- All contributors who help improve this project
If you need help or have questions:
- Open an issue
- Join our Discord server
- Check existing issues and discussions
- Stage support
- Queue viewing command
- Volume control
- Song seeking
- Lyrics display
- DJ role permissions
- More music sources (SoundCloud, Apple Music)
Made with ❤️ and Rust