Skip to content

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

  1. Install Shoukaku using your favorite package manager.

    Terminal window
    npm i shoukaku@3.4.2
  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 do
    shoukaku.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 it
    client.shoukaku = shoukaku;

Further reading