Skip to content

awesomekosm/Shura

Repository files navigation

Shura - ШУРА

Discord Music Bot

Docker Pulls GitHub release (latest SemVer)

Create Discord Token

  • 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

Running

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

Building

Maven Build

  • Have at least jdk 19
  • Execute mvnw.cmd on windows or mvnw 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

Maven + Docker Build

  • 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

Commands

PLAY

SUMMON

  • calls bot to the same voice channel as the user typing in command
  • !summon

LEAVE

  • disconnects from voice

PAUSE

RESUME

SKIP

  • can skip a single song
  • !skip
  • or multiple
  • !skip 3
  • or a whole playlist that's queued
  • !skip pl

VOLUME

  • volume goes from 0 to 1000
  • default is
  • !volume 20

Features

  • 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 or yt-dlp and ffmpeg 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 даже поймет по руский

Properties

Defaults

shura:
  cache:
    enabled: true
    updated: true
    directory: cache
  drunk-mode: true
  thresh-hold: 3
  discord:
    token: 

Platforms

  • Windows (x86 and x64)
  • Linux (x86 and x64, glibc >= 2.15)

Local Docker Build

  • Build ./mvnw package
  • Create container docker build --tag local/shura:latest . or docker 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

Thanks

Great libraries that made this fun