Skip to content

Getting Started

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 shipgirlproject/Shoukaku#master
  2. Import the library

    import { Client } from "discord.js";
    import { Shoukaku, Connectors } from "shoukaku";
  3. Configure nodes

    const Nodes = [
    {
    name: "Localhost",
    url: "localhost:6969",
    auth: "re_aoharu", // password
    },
    ];
  4. Initialize the library using one of the connectors.

    const client = new Client();
    const shoukaku = new Shoukaku(new Connectors.DiscordJS(client), Nodes);
  5. Handle error events

    Always handle “error” events or your program may crash due to uncaught error

    shoukaku.on("error", (_, error) => console.error(error));
  6. Login to Discord

    client.login("token");

Other Resources