Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Discord music bot, supports YouTube, Spotify, SoundCloud, Deezer streams and web dashboard.

License

NotificationsYou must be signed in to change notification settings

hmes98318/Music-Disc

Repository files navigation

music_disc

Music Disc

GitHub package.json versionGitHub

A discord music bot, supportsYouTube,Spotify,SoundCloud,Deezer streams and web dashboard.
Developed based ondiscord.js v14,LavaShark,Lavalink.

Features

  • Stable
  • Use Lavalink
  • Web dashboard
  • Local node
  • Docker images

If you need the version ofdiscord-player, please refer to thisbranch.

If you encounter any issues or would like to contribute to the community, please join ourDiscord server.

Deploying with node.js

Clone the latest version of the repository

git clone -b v3.1.0 https://github.com/hmes98318/Music-Disc.git

orclick here to download

Install the dependencies

install all the dependencies frompackage.json

npm ci

Add Lavalink node

Edit thenodelist.json file to add aLavalink node.
Only supports Lavalinkv4 nodes,v4.0.8 or higher is recommended.

Please refer to thisdocumentation for detailed information.

[    {"id":"Node 1","hostname":"localhost","port":2333,"password":"youshallnotpass"    }]

Configure environment

Refer to.env.example and edit the.env fileEdit the file.

# Discord Bot TokenBOT_TOKEN="your_token"# Admin of the bot (User ID)# For multiple admins, separate their user IDs with commas.# OAUTH2 mode requires setting BOT_ADMIN, BOT_CLIENT_SECRET valueBOT_ADMIN= ""BOT_CLIENT_SECRET=""# Bot settingsBOT_NAME="Music Disc"BOT_PREFIX="+"BOT_STATUS="online"BOT_PLAYING="+help | music"BOT_EMBEDS_COLOR="#FFFFFF"BOT_SLASH_COMMAND=true# Volume settingsDEFAULT_VOLUME=50MAX_VOLUME=100# Auto leave channel settingsAUTO_LEAVE=trueAUTO_LEAVE_COOLDOWN=5000# Show voice channel updatesDISPLAY_VOICE_STATE=true# Web dashboard settingsENABLE_SITE=trueSITE_PORT=33333SITE_LOGIN_TYPE= "USER"   # "USER" | "OAUTH2"# USER mode settingsSITE_USERNAME="admin"SITE_PASSWORD="000"# OAUTH2 mode settingsSITE_OAUTH2_LINK= ""   # Your OAuth2 authentication linkSITE_OAUTH2_REDIRECT_URI= "http://localhost:33333/login"   # Redirect link after OAuth2 authentication is complete# Local Lavalink nodeENABLE_LOCAL_NODE=falseLOCAL_NODE_AUTO_RESTART=true# LOCAL_NODE_DOWNLOAD_LINK = ""

Running the script

npm run start

Deploying with Docker

image link :https://hub.docker.com/r/hmes98318/music-disc

If you don't have any available nodes, you need to first start the server container usingDocker Compose in the server directory.

Start with Docker Compose

Please put yourtoken into theBOT_TOKEN variable.

services:music-disc:image:hmes98318/music-disc:latestcontainer_name:music-discrestart:alwaysenvironment:TZ:"Asia/Taipei"BOT_TOKEN:"your_token"# OAUTH2 mode requires setting BOT_ADMIN, BOT_CLIENT_SECRET valueBOT_ADMIN:""BOT_CLIENT_SECRET:""BOT_NAME:"Music Disc"BOT_PREFIX:"+"BOT_PLAYING:"+help | music"BOT_EMBEDS_COLOR:"#FFFFFF"BOT_SLASH_COMMAND:trueDEFAULT_VOLUME:50MAX_VOLUME:100AUTO_LEAVE:"true"AUTO_LEAVE_COOLDOWN:5000DISPLAY_VOICE_STATE:"true"# Web dashboard settingsENABLE_SITE:trueSITE_PORT:33333SITE_LOGIN_TYPE:"USER"# "OAUTH2" | "USER"# USER mode settingsSITE_USERNAME:"admin"SITE_PASSWORD:"password"# OAUTH2 mode settingsSITE_OAUTH2_LINK:""# Your OAuth2 authentication linkSITE_OAUTH2_REDIRECT_URI:"http://localhost:33333/login"# Redirect link after OAuth2 authentication is complete# Local Lavalink nodeENABLE_LOCAL_NODE:falseLOCAL_NODE_AUTO_RESTART:truevolumes:      -./server:/bot/server# localnode configuration file      -./nodelist.json:/bot/nodelist.json      -./blacklist.json:/bot/blacklist.jsonports:      -33333:33333

Start the container

docker compose up -d

Start with Docker

Use the following command to start the container:
Please put yourtoken into theBOT_TOKEN variable.

docker run -d \  --name music-disc \  --restart always \  -e TZ="Asia/Taipei" \  -e BOT_TOKEN="your_token" \  -e BOT_ADMIN="" \  -e BOT_CLIENT_SECRET="" \  -e BOT_NAME="Music Disc" \  -e BOT_PREFIX="+" \  -e BOT_PLAYING="+help | music" \  -e BOT_EMBEDS_COLOR="#FFFFFF" \  -e BOT_SLASH_COMMAND="#true" \  -e DEFAULT_VOLUME=50 \  -e MAX_VOLUME=100 \  -e AUTO_LEAVE="true" \  -e AUTO_LEAVE_COOLDOWN=5000 \  -e DISPLAY_VOICE_STATE="true" \  -e ENABLE_SITE=true \  -e SITE_PORT=33333 \  -e SITE_LOGIN_TYPE="USER" \  -e SITE_USERNAME="admin" \  -e SITE_PASSWORD="password" \  -e SITE_OAUTH2_LINK="" \  -e SITE_OAUTH2_REDIRECT_URI="http://localhost:33333/login" \  -e ENABLE_LOCAL_NODE=false \  -e LOCAL_NODE_AUTO_RESTART=true \  -v $(pwd)/server:/bot/server \  -v $(pwd)/nodelist.json:/bot/nodelist.json \  -v $(pwd)/blacklist.json:/bot/blacklist.json \  -p 33333:33333 \  hmes98318/music-disc:latest

[8]ページ先頭

©2009-2025 Movatter.jp