discord.js-lavalink
A Discord.js lavalink client for discord.js@12.0.0-dev version.
Documentation
mrjacz.github.io/discord.js-lavalink
Installation
For stable
npm install discord.js-lavalink
For Development
npm install mrjacz/discord.js-lavalink
LavaLink configuration
Download from the CI server
Put an application.yml
file in your working directory. Example
Run with java -jar Lavalink.jar
The issue tracker is for issues only
If you're having a problem with the module contact us in the Discord Server
Implementation
Start by creating a new PlayerManager
passing an array of nodes and an object with user
the client's user id and shards
The total number of shards your bot is operating on.
const PlayerManager = ; const nodes = host: "localhost" port: 80 region: "asia" password: "youshallnotpass" ; const manager = client nodes user: clientuserid // Client id shards: shardCount // Total number of shards your bot is operating on;
Resolving tracks using LavaLink REST API
{ const res = await snekfetch ; if !res throw "There was an error, try again"; if !resbodylength throw "No tracks found"; return resbody;} ;
Joining and Leaving channels
// Joinmanager; // Leave voice channel and destory Playermanager; // Player ID aka guild id
For a proper example look at Testing/app.js