# discord.js-lavalink-lib

> The fixed version of BluSpring's discord.js-lavalink-lib

Latest version **0.1.8** (published 2021-01-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install discord.js-lavalink-lib
pnpm add discord.js-lavalink-lib
yarn add discord.js-lavalink-lib
bun add discord.js-lavalink-lib
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2021-01-06 |
| First published | 2020-10-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 27 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | keanuplayz |
| Maintainers | keanucode |
| Keywords | lib, discord.js, discord, music, lavalink |

## Links

- npm: https://www.npmjs.com/package/discord.js-lavalink-lib
- Repository: https://github.com/keanuplayz/discord.js-lavalink-lib
- Homepage: https://github.com/keanuplayz/discord.js-lavalink-lib#readme
- Issues: https://github.com/keanuplayz/discord.js-lavalink-lib/issues
- npm.io page: https://npm.io/package/discord.js-lavalink-lib

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) >=0.21.1
- [lavacord](https://npm.io/package/lavacord.md) ^1.1.7
- [discord.js](https://npm.io/package/discord.js.md) ^12.2.0
- [@lavacord/discord.js](https://npm.io/package/@lavacord/discord.js.md) 0.0.5

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 0.1.8 (latest) — 2021-01-06
- 0.1.7 — 2020-10-21
- 0.1.6 — 2020-10-20
- 0.1.5 — 2020-10-20

## README

# discord.js-lavalink-musicbot
A Lavalink music bot module based on [DarkoPendragon](https://github.com/DarkoPendragon)'s [discord.js-musicbot-addon](https://github.com/DarkoPendragon/discord.js-musicbot-addon) module.
[![npm package](https://nodei.co/npm/discord.js-lavalink-musicbot.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/discord.js-lavalink-musicbot/)  

<br><br>
Please join my Discord server here for assistance with the module: [XeriApps Support](https://discord.gg/dNN4azK)
[![Discord Server](https://discordapp.com/api/guilds/483203473643405312/embed.png)](https://discord.gg/dNN4azK)

# Prerequisites
- A Lavalink node.
- Java 13 (if you don't have one)
- Node.js 12
- A brain...

# Usage
Install [Lavalink](https://ci.fredboat.com/viewLog.html?buildId=lastSuccessful&buildTypeId=Lavalink_Build&tab=artifacts&guest=1). 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.<br>
Make sure you use a completely separate Glitch project for Lavalink.<br>
Also please remember to limit the memory usage. That's all I'm telling you :)

# Setup example
```javascript
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 | String[] | no | Who are the admins? | [] |
| customGame | PresenceData | no | Set the custom game! | { name: '', type: 'PLAYING' } |
| lavalink | LavalinkOptions | yes, if you changed the default Lavalink settings | Lavalink settings! | (Check in the example) | 

# Changelog (only for v0.0.7 and later)
v0.1.0
---
- Added typings file.
- Migrated from [discord.js-lavalink](https://npmjs.com/package/discord.js-lavalink) to [Lavacord](https://npmjs.com/package/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](https://npmjs.com/package/snekfetch) to [axios](https://npmjs.com/package/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

---
_Source: https://npm.io/package/discord.js-lavalink-lib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
