Installation
Requirements
Section titled “Requirements”- Node.js 18.17 or newer. Raya uses the built-in
fetch. - A Lavalink v4 server (or NodeLink). Lavalink v3 is not supported.
- A Discord bot with the Guilds and Guild Voice States intents.
Install the package
Section titled “Install the package”npm install raya.jspnpm add raya.jsyarn add raya.jsbun add raya.jsRaya works with both module systems:
import { Raya, Connectors } from 'raya.js';// default import works tooimport Raya from 'raya.js';const { Raya, Connectors } = require('raya.js');Set up Lavalink
Section titled “Set up Lavalink”-
Download
Lavalink.jarfrom the Lavalink releases and install Java 17 or newer. -
Create an
application.ymlnext to it. Pick a strong password and add the plugins you need:application.yml server:port: 2333lavalink:server:password: "youshallnotpass"plugins:# YouTube support- dependency: "dev.lavalink.youtube:youtube-plugin:VERSION"# Spotify, Apple Music, Deezer and more- dependency: "com.github.topi314.lavasrc:lavasrc-plugin:VERSION" -
Start it:
Terminal window java -jar Lavalink.jar -
Use the same host, port and password in Raya’s
nodesoption.
Head to the quick start to play your first track.