easy-discord-music

A V11 Discord.JS music bot in 200 lines or less

Usage no npm install needed!

<script type="module">
  import easyDiscordMusic from 'https://cdn.skypack.dev/easy-discord-music';
</script>

README

dependencies Status Build Status Discord server NPM downloads NPM version

easy-discord-music


This module is a simple Node.js based music package for Discord.js projects.

The commands available are:

  • help: Displays help text for all commands by this addon.
  • add <url>|<search string>: Search for a song from YouTube or get a YouTube song from a URL.
  • play: Start the queue, will connect to a voice channel if not connected.
  • skip: Skip the current song.
  • queue: Display the current queue.
  • pause: Pause music playback.
  • resume: Resume music playback.
  • volume lower: Lower the playback volume by 2%.
  • volume add: Add to the playback volume by 2%.
  • disconnect: Clears the song queue and leaves the channel.
  • time: Show the current playing song.

Installation (If not hosting on Glitch)


Pre-installation:

  1. npm install discord.js --save
    It is recommended to have the stable branch.

  2. ffmpeg installed correctly for your OS/env.
    Allows the bot to join voice as well as speak.

Installation:

  • npm install easy-discord-music --save
    If you have troubles installing, plesase submit an issue, or for faster help [join the discord server] (https://discord,gg/hvJPUwR). Then, fill in the varibles.

Installation (If hosting on Glitch)

  1. Click this link: https://glitch.com/edit/#!/remix/music-js-remix

  2. Paste in the example & fill in the varibles.

Example


// These var's are required.
var adminrole = "Your admin ROLENAME"
var prefix = "Your Prefix"
var YTapikey = "Your API key"
const music = require("easy-discord-music")
// The varibles below are NOT required, if you would not like to use them, set them to false
var discordlogin = "Your Token Here"
var helpshow = true
// Below is the startup
music.init(adminrole,prefix,YTapikey,1,helpshow,discordlogin)