Getting Started
This content is for the 3.4.2 version. Switch to the latest version for up-to-date documentation.
Shoukaku is a stable, powerful and updated wrapper around Lavalink. It is Discord library agnostic, and can add support for new Discord libraries using connectors.
Set up Shoukaku
-
Install Shoukaku using your favorite package manager.
Terminal window npm i shoukaku@3.4.2Terminal window yarn add shoukaku@3.4.2Terminal window pnpm add shoukaku@3.4.2Terminal window bun add shoukaku@3.4.2 -
Initialize the library using one of the connectors.
const { Client } = require('discord.js');const { Shoukaku, Connectors } = require('shoukaku');const Nodes = [{name: 'Localhost',url: 'localhost:6969',auth: 'marin_kitagawa'}];const client = new Client();const shoukaku = new Shoukaku(new Connectors.DiscordJS(client), Nodes);// ALWAYS handle error, logging it will doshoukaku.on('error', (_, error) => console.error(error));client.login('token');// If you want shoukaku to be available on client, then bind it to it, here is one example of itclient.shoukaku = shoukaku;const { Client } = require('discord.js');const { Shoukaku, Connectors } = require('shoukaku');const Nodes = [{name: 'Localhost',url: 'localhost:6969',auth: 'marin_kitagawa'}];const client = new Client();const shoukaku = new Shoukaku(new Connectors.Eris(client), Nodes);// ALWAYS handle error, logging it will doshoukaku.on('error', (_, error) => console.error(error));client.login('token');// If you want shoukaku to be available on client, then bind it to it, here is one example of itclient.shoukaku = shoukaku;const { Client } = require('discord.js');const { Shoukaku, Connectors } = require('shoukaku');const Nodes = [{name: 'Localhost',url: 'localhost:6969',auth: 'marin_kitagawa'}];const client = new Client();const shoukaku = new Shoukaku(new Connectors.OceanicJS(client), Nodes);// ALWAYS handle error, logging it will doshoukaku.on('error', (_, error) => console.error(error));client.login('token');// If you want shoukaku to be available on client, then bind it to it, here is one example of itclient.shoukaku = shoukaku;