Restart-proof
raya.shutdown() saves every player. The next process resumes the same Lavalink session, so the
music keeps playing through a bot restart.
Raya is a Lavalink v4 client for Node.js, written in TypeScript. It connects your Discord bot to one or more Lavalink servers (or NodeLink, or anything else that speaks the v4 protocol) and gives you players, queues, filters and events that are pleasant to use.
It’s built around one idea: the music should never stop. Network blips, Lavalink restarts, dead nodes and even restarting your own bot should all be invisible to the people listening.
const player = await raya.join({ guildId, voiceChannelId, textChannelId });await player.enqueue(await player.search('lofi hip hop', { requester: user }));Restart-proof
raya.shutdown() saves every player. The next process resumes the same Lavalink session, so the
music keeps playing through a bot restart.
Self-healing
v4 session resuming, rebuilds after a Lavalink restart, automatic failover between nodes, and voice reconnects after Discord voice errors.
Fast by design
Updates made in the same tick are merged into one request. Tracks decode locally, searches are cached and de-duplicated, and balancing is load-aware.
Easy and complete
Connectors for discord.js, Eris and Oceanic. Queue, loop, autoplay, filters, auto-leave, voice channel status, lyrics, SponsorBlock and fully typed events.
| Protocol | Lavalink v4 only |
| Runtime | Node.js 18.17+ |
| Dependencies | 1 (ws) |
| Module formats | CommonJS and ESM, with TypeScript declarations |
| Discord libraries | discord.js, Eris, Oceanic, or any library via send |
| License | MIT |