- Author: Pavel Mikula (MIK0486)
- Took approximately 40 hours
This project is a simple Discord bot developed in Rust, designed to play music in Discord voice channels. It uses libraries like serenity for handling the Discord API and songbird for managing audio playback and youtube-api for track download. The bot allows users to add, play, pause, and skip songs in a queue directly within a Discord server.
- Rust: The primary programming language for bot logic
- Serenity: Discord API wrapper for Rust
- Songbird: Voice and audio playback library for Discord
- Youtube-dl: For downloading and streaming audio from YouTube
- Installed rust from rust-lang.org
- Installed youtube-dl from ytdl-org.github.io
ffmpegis required for youtube-dl to work properlyyoutube-dlshould be in the system PATH
- YouTube DL token from YouTube Data API
- Discord bot token from Discord Developer Portal
- Installed CMAKE. Required for an audiopus_sys library
- Clone this repository
git clone https://github.com/Firestone82/RustyTunes.git cd RustyTunes - Create a
.envfile in the root directorycp .env.example .env # Edit the .env file with your discord bot token and youtube dl API key. - Setup database
cargo install sqlx-cli sqlx database create sqlx migrate run
- Install dependencies
# Youtube DL sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp sudo chmod a+rx /usr/local/bin/yt-dlp # CMAKE sudo apt-get install cmake
- Build and run the bot
cargo build --release cargo run
- Play music from YouTube and other audio sources in voice channels
- Queue management: add, remove, or reorder songs
- Basic music controls: play, pause, resume, and skip tracks
- Volume control
- Custom addons
- Wakeup command (Moves client between rooms to make sound!)
- Notify command (Notify user to specific message after some time.)
- Uwu command (Uwuify text provided)