Skip to content

A asynchronous implementation of lavalink websocket API in NodeJS

License

Notifications You must be signed in to change notification settings

kirishima-ship/ws

Repository files navigation

Kirishima Banner

@kirishima/ws

Instalation

npm install @kirishima/ws ws @sapphire/async-queue

Features

  • Written in TypeScript
  • Support ESM & CommonJS

Example

import { Gateway } from "@kirishima/ws";

(async () => {
    const lavalinkSocket = new Gateway("ws://lava.link:80")
    .setClientId("12345678901234")
    .setClientName("@kirishima/ws lavalink websocket implementation")
    .setAuthorization("youshallnotpass")

    lavalinkSocket.on("open", () => {
        console.log("Lavalink connected !")
    })

    await lavalinkSocket.connect();

})()