Discord music bot written in rust. Uses serenity-rs and Lavalink with lavalink-rs.
You need to install following dependencies:
- Opus
apt
apt install libopus-devpacman
pacman -S opusdnf
dnf install opus-develAdd youtube-plugin-{version}.jar to plugins/ folder. You can get it from here: https://github.com/lavalink-devs/youtube-source/releases. Make sure that the version you downloaded and the version in application.yml match.
Copy application-example.yml and rename it to application.yml. This file is used to configure lavalink.
DJ Ferris requires a few environment variables which can be set either with export command or .env file. Required variables are:
- DISCORD_TOKEN
- APPLICATION_ID
- LAVALINK_SERVER_PASSWORD
# You can also use .env file for these
export DISCORD_TOKEN={bot token} # Set bot token env variable
export APPLICATION_ID={application id} # Set application id
export LAVALINK_SERVER_PASSWORD={lavalink password} # From application.yml
docker-compose -f docker-compose-lavalink.yml up # Run Lavalink with docker
cargo run# Build docker image
docker build . -t dj-ferris
# Run docker image
docker run -it --name "dj-ferris" -e DISCORD_TOKEN=<DISCORD BOT TOKEN> -e APPLICATION_ID=<DISCORD APPLICATION ID> dj-ferris
OR
# Run with docker compose
docker-compose up