RoguedBear / Music-Disc

A Discord music bot that's easy to set up and run yourself

Home Page:https://github.com/hmes98318/Music-Disc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

music_disc

Music Disc

GitHub package.json version GitHub

Discord.js v14 Music Bot

This is a music bot developed based on LavaShark.
If you need the version of discord-player, please refer to this branch.

Supports YouTube, Spotify, SoundCloud streams.

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

Deploying with node.js

Clone the latest version of the repository

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

or click here to download

Install the dependencies

install all the dependencies from package.json

npm install

Add Lavalink node

Please refer to this documentation for detailed information.
Edit the file node-list.json

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

Configure environment

Edit the file .env

TOKEN = "your_token"
NAME = "Music Disc"
PREFIX = "+"
PLAYING = "+help | music"
EMBEDS_COLOR = "#FFFFFF"
DEFAULT_VOLUME = 50
MAX_VOLUME = 100
AUTO_LEAVE = true
AUTO_LEAVE_COOLDOWN = 5000
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.

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 using Docker Compose in the server directory.

Start with Docker

Use the following command to start the container:
Please put your token into the TOKEN variable.

docker run -d \
  --name music-disc \
  -e TOKEN="your_token" \
  -e PREFIX="+" \
  -e PLAYING="+help | music" \
  -e EMBEDS_COLOR="#FFFFFF" \
  -e DEFAULT_VOLUME=50 \
  -e MAX_VOLUME=100 \
  -e AUTO_LEAVE="true" \
  -e AUTO_LEAVE_COOLDOWN=5000 \
  -e DISPLAY_VOICE_STATE="true" \
  -v ./node-list.json:/bot/node-list.json \
  -v ./blacklist.json:/bot/blacklist.json \
  -p 33333:33333 \
  hmes98318/music-disc:2.0.2

Start with Docker-Compose

Please put your token into the TOKEN variable.

version: '3.8'
services:
  music-disc:
    image: hmes98318/music-disc:2.0.2
    container_name: music-disc
    restart: always
    environment:
      TOKEN: "your_token"
      PREFIX: "+"
      PLAYING: "+help | music"
      EMBEDS_COLOR: "#FFFFFF"
      DEFAULT_VOLUME: 50
      MAX_VOLUME: 100
      AUTO_LEAVE: "true"
      AUTO_LEAVE_COOLDOWN: 5000
      DISPLAY_VOICE_STATE: "true"
    volumes:
      - ./node-list.json:/bot/node-list.json
      - ./blacklist.json:/bot/blacklist.json
    ports:
      - 33333:33333

Start the container

docker-compose up -d

About

A Discord music bot that's easy to set up and run yourself

https://github.com/hmes98318/Music-Disc

License:MIT License


Languages

Language:TypeScript 99.9%Language:Dockerfile 0.1%