derekmartinez18 / discord.js-music

Music Plugin for Discord.js
ISC License
1 stars 0 forks source link
discord discord-js discord-music-bot music-bot

Discord.js Music Plugin

This version is not yet stable, although has been mildly tested, it has not been that extensive. It's an update of the original by ruiqimao for Discord.js's version v11.x, and adds a few extra sprinkles. It still requires tweaks and testing but yeah it's something.

It adds:

Things to do:

Things left to test:

Known Issues:

Installation:

  1. Download and extract anywhere
  2. Edit examples/musicBot to match your needed config
  3. In the root folder, run:
    npm install

This is a music plugin for Discord.js. Using it is as easy as:

const Client = require('discord.js').Client;
const music = require('./path/to/this/project');

const client = new Client();
music(client);

client.login('< bot token here >');

The module consists of a single function, which takes two arguments:

/*
 * Initialize the music plugin.
 *
 * @param client The Discord.js client.
 * @param options (Optional) A
 */
music(client, options);

Options:

YouTube Configuration Options:

How to add "Music Managers"

musicManager: {
    '<server id>': '<role name>'
},

How to add auto join channels

autoJoin: [
    '<channel id>' // My Server Name (for reference)
]

How to restrict bot to only be invoked from certain channels

musicChannels: [
    '<channel id>' // My Server Name (for reference)
]

How to get server id?

  1. Goto server settings.
  2. Select 'Widget'.
  3. Copy the number in SERVER ID.

How to get channel ids?

  1. Go to user settings.
  2. Select 'Appearance'.
  3. Check the box "Developer Mode"
  4. Go to any server and right click the channel you want to get the ID of, and select 'Copy ID'

What permissions do the roles need?

The commands available are: