Code Monkey home page Code Monkey logo

lavalink's Introduction

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

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

Option Type Required? Description Default
prefix String no Shows what you want your bot to respond to. !
helpCmd String no What should the help command be. mhelp
playCmd String no What should the play command be. play
pauseCmd String no What should the pause command be. pause
stopCmd String no What should the stop command be. stop
queueCmd String no What should the queue command be. queue
npCmd String no What should the Now Playing command be. np
skipCmd String no What should the skip command be. skip
volumeCmd String no What should the volume command be. volume
resumeCmd String no What should the resume command be. resume
loopCmd String no What should the loop command be. loop
admins Array no Who are the admins? []
customGame Object no Set the custom game! { name: '', type: 'PLAYING' }
lavalink Object yes, if you changed the default Lavalink settings Lavalink settings! (Check in the example)

Changelog (only for v0.0.7 and later)

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

lavalink's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.