Skip to main content
Version: v2.0.x

Installation on Linux / Windows

Prerequisites

Create a Discord Application

  • go to the Discord Developer portal
  • create a new application + bot
  • create a bot invite link using it's client id here
  • save the bot token for later

Install Node.js

  • Node.js version needs to be >= 16.13.0 for this Bot

Installation

Clone repository

You can clone the latest version of the source code using this command:

git clone -b v2.0.2 https://github.com/hmes98318/Music-Disc.git

or click here to download

Install the dependencies

Use this command to install all dependencies:

npm install

Configure node

Edit the node-list.json file to add a Lavalink node.

You can refer to this document for detailed information.

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

This bot requires Lavalink nodes with version 3.7.x to run properly.

Configure environment variables

Edit the .env file.

# Discord Bot Token
BOT_TOKEN = "your_token"

# Admin of the bot (User ID)
BOT_ADMIN = ""

# Bot settings
BOT_PREFIX = "+"
BOT_NAME = "Music Disc"
BOT_PLAYING = "+help | music"
BOT_EMBEDS_COLOR = "#FFFFFF"

# Volume settings
DEFAULT_VOLUME = 50
MAX_VOLUME = 100

# Auto leave channel settings
AUTO_LEAVE = true
AUTO_LEAVE_COOLDOWN = 5000

# Show voice channel updates
DISPLAY_VOICE_STATE = true

PORT = 33333
Detailed description

AUTO_LEAVE : After the music finished, can choose whether let the bot leave voice channel automatically or not.
AUTO_LEAVE_COOLDOWN : Timer for auto disconnect(ms).
DISPLAY_VOICE_STATE : Show voice channel status updates.

Start the Bot

Running the script

npm run start

Running with pm2

If you are using the PM2 process manager to run this bot, please compile the source code using this command first.

npm run build

After compiling, use this command to start the bot.

pm2 start ./dist/src/index.js --name "Music-Disc"