项目作者: Z-EMB

项目描述 :
Discord Music Bot
高级语言: Java
项目地址: git://github.com/Z-EMB/Shura.git
创建时间: 2019-05-04T02:06:59Z
项目社区:https://github.com/Z-EMB/Shura

开源协议:Apache License 2.0

下载


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

  1. docker run -d \
  2. --name shura \
  3. -v $(pwd)/cache:/opt/cache \
  4. --env JAVA_OPTS="-Dshura.discord.token=$DISCORD_TOKEN" \
  5. 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

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

  1. shura:
  2. cache:
  3. enabled: true
  4. updated: true
  5. directory: cache
  6. drunk-mode: true
  7. thresh-hold: 3
  8. discord:
  9. 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