- Notifications
You must be signed in to change notification settings - Fork106
A Discord music bot, supports YouTube, Spotify, SoundCloud, Deezer streams and web dashboard.
License
hmes98318/Music-Disc
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A discord music bot, supportsYouTube,Spotify,SoundCloud,Deezer streams and web dashboard.
Developed based ondiscord.js v14,LavaShark,Lavalink.
- 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.
git clone -b v3.1.0 https://github.com/hmes98318/Music-Disc.git
orclick here to download
install all the dependencies frompackage.json
npm ci
Edit thenodelist.json
file to add aLavalink node.
Only supports Lavalinkv4 nodes,v4.0.8 or higher is recommended.
- Usepublic node
- orhost your own
- or enablelocal node setup
Please refer to thisdocumentation for detailed information.
[ {"id":"Node 1","hostname":"localhost","port":2333,"password":"youshallnotpass" }]
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 = ""
npm run start
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.
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
docker compose up -d
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
About
A Discord music bot, supports YouTube, Spotify, SoundCloud, Deezer streams and web dashboard.