Discord Music Bot
- Create an application https://discord.com/developers/applications
- In settings click Bot
- Get client id of the application
- Link to authorize shura in channels where you can invite
https://discord.com/oauth2/authorize?client_id={YOUR_CLIENT_ID}&permissions=3222528&scope=bot
Use discord token from the step above.
Image tags corresponds to the release. More tags can be found at Docker Hub
docker run -d \
--name shura \
-v $(pwd)/cache:/opt/cache \
--env JAVA_OPTS="-Dshura.discord.token=$DISCORD_TOKEN" \
shurapleer/shura:latest
- Have at least jdk 19
- Execute
mvnw.cmd
on windows ormvnw
on linux at the root of the directory ./mvnw package
- Output will be in shura/target/shura-***.jar
- This is a self contained jar, can be executed
java -jar -Dshura.discord.token=YOUR_DISCORD_TOKEN shura-***.jar
- Have at least jdk 19 and docker 18+
./run.sh YOUR_DISCORD_TOKEN
from shura- will build latest using bundled maven
- remove old Shura container if exists
- start docker container at that point can use invite link above
- Can play anything supported by https://github.com/sedmelluq/lavaplayer
- example
- !play https://www.youtube.com/watch?v=miomuSGoPzI
- calls bot to the same voice channel as the user typing in command
- !summon
- disconnects from voice
- can skip a single song
- !skip
- or multiple
- !skip 3
- or a whole playlist that's queued
- !skip pl
- volume goes from 0 to 1000
- default is
- !volume 20
- Shura saves all of your inputs and starts where it left off incase it's turned off / crashes
- Songs and playlists from YT are cached on disk. Requires
youtube-dl
oryt-dlp
andffmpeg
on the path. - Shura has drunk mode enabled by default in application.yml, this means you don't have to type commands exactly
- skop pley and !summie and volum will all work as if you typed it correctly даже поймет по руский
Defaults
shura:
cache:
enabled: true
updated: true
directory: cache
drunk-mode: true
thresh-hold: 3
discord:
token:
- Windows (x86 and x64)
- Linux (x86 and x64, glibc >= 2.15)
- Build
./mvnw package
- Create container
docker build --tag local/shura:latest .
ordocker buildx build --platform=linux/amd64 -t local/shura:latest .
- Run
docker run --rm --name shura -v $(pwd)/cache:/opt/cache --env JAVA_OPTS="-Dshura.discord.token=YOUR_TOKEN" local/shura
Great libraries that made this fun