0.1.0 • Published 4 years ago

discord.js-lavalink-musicbot v0.1.0

Weekly downloads
34
License
ISC
Repository
github
Last release
4 years ago

discord.js-lavalink-musicbot

A Lavalink music bot module based on DarkoPendragon's discord.js-musicbot-addon module. npm package

Please join my Discord server here for assistance with the module: XeriApps Support Discord Server

Prerequisites

  • A Lavalink node.
  • Java 13 (if you don't have one)
  • Node.js 12
  • A brain...

Usage

Install Lavalink. An example application.yml is provided in the "Lavalink" folder.

If you install the actual module, Lavalink should be provided.

To install the module, run npm i -s discord.js-lavalink-musicbot

Notice

If you use Glitch, make sure you set the port to 3000 for both the application.yml and the configuration in the "lavalink" area, because Glitch only works on that port. Make sure you use a completely separate Glitch project for Lavalink. Also please remember to limit the memory usage. That's all I'm telling you :)

Setup example

const Discord = require('discord.js');
const bot = new Discord.Client();
bot.music = new (require('discord.js-lavalink-musicbot'))(bot, {
	lavalink: {
		"restnode": {
			"host": "localhost",
			"port": 8643,
			"password":"youshallnotpass"
		},
		"nodes": [
			{ "host": "localhost", "port": 8643, "region": "asia", "password": "youshallnotpass" }
		]
	},
	admins: ["455346525716086795"]
});

bot.login('bot token here');

Options

OptionTypeRequired?DescriptionDefault
prefixStringnoShows what you want your bot to respond to.!
helpCmdStringnoWhat should the help command be.mhelp
playCmdStringnoWhat should the play command be.play
pauseCmdStringnoWhat should the pause command be.pause
stopCmdStringnoWhat should the stop command be.stop
queueCmdStringnoWhat should the queue command be.queue
npCmdStringnoWhat should the Now Playing command be.np
skipCmdStringnoWhat should the skip command be.skip
volumeCmdStringnoWhat should the volume command be.volume
resumeCmdStringnoWhat should the resume command be.resume
loopCmdStringnoWhat should the loop command be.loop
adminsString[]noWho are the admins?[]
customGamePresenceDatanoSet the custom game!{ name: '', type: 'PLAYING' }
lavalinkLavalinkOptionsyes, if you changed the default Lavalink settingsLavalink settings!(Check in the example)

Changelog (only for v0.0.7 and later)

v0.1.0

  • Added typings file.
  • Migrated from discord.js-lavalink to Lavacord
  • Added .gitignore and .npmignore
  • Modified the README
  • Cleared a lot of the commented code because that used a lot of space

v0.0.9

  • Fixed queue being undefined in execQueue (wow I never noticed that, thanks Discord server!)
  • Added loop and seek command.
  • Updated all dependencies.
  • Reconfigure for better connecting if host doesn't give port. (example: localhost:8538 -> 154.76.225.18/lavalink.djsl-host.com) by adding an address config. You're welcome.
  • Updated literally everything to run better. Hopefully.

v0.0.8

  • Switched from snekfetch to axios
  • Reconfigured the module to no longer require a token to use.
  • Added discord.js v12 support (presumably)

v0.0.7

  • Added volume command
  • Fixed skip command (Probably)
  • Reconfigured the module for the latest version of Lavalink
0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago