Type-safe WebSocket client for Lavalink v4 Beta 3. Current stable version is 1.1.2, released on an ongoing schedule via GitHub. It leverages the lavalink-protocol package for type definitions and requires lavalink-api-client as a peer dependency. Provides a lightweight and performant abstraction over raw WebSocket connections with full TypeScript support. Differentiators include strict typing, minimal overhead, and compatibility with the latest Lavalink beta protocol.
npm install lavalink-ws-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Lavalink WebSocket client instance, connects to the server, and sends a voice update.
Ensure your project uses ESM ("type": "module" in package.json or .mjs files) and Node.js 20+.Install peer dependencies: npm install lavalink-api-client lavalink-protocol
Use 'tls: { rejectUnauthorized: false }' instead of 'secure: false' if available.Update to use WebSocketClientOptions interface. Refer to the changelog.
Always send objects conforming to lavalink-protocol types. Use the provided send overloads.
Switch to ESM imports or use dynamic import().
Use `import { LavalinkWS } from 'lavalink-ws-client'` or `import LavalinkWS from 'lavalink-ws-client'` consistently.Run `npm install lavalink-protocol` in your project.
Update package to latest version and ensure type imports are correct.