Lavalink Library based on lavalink.js made for discord.js.
npm i @lavalink/discord.js
const { NodeManager } = require('@lavalink/discord.js');
const { Client } = require('discord.js');
const client = new Client();
const node = new NodeManager(client, {
userID: 'your bot user ID',
hosts: {
// see lavalink.js docs
},
});
See the lavalink.js docs for details on BaseCluster, BaseNode, and any other options.
constructor(client: Discord.Client, options?: ClusterManagerOptions)
interface ClusterManagerOptions {
nodes?: ClusterNodeOptions[];
filter: (node: ClusterNode, guildID: string) => boolean;
}
constructor(client: Discord.Client, options?: BaseNodeOptions)