Skip to content

Installation

  • 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.
Terminal window
npm install raya.js

Raya works with both module systems:

import { Raya, Connectors } from 'raya.js';
// default import works too
import Raya from 'raya.js';
  1. Download Lavalink.jar from the Lavalink releases and install Java 17 or newer.

  2. Create an application.yml next to it. Pick a strong password and add the plugins you need:

    application.yml
    server:
    port: 2333
    lavalink:
    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"
  3. Start it:

    Terminal window
    java -jar Lavalink.jar
  4. Use the same host, port and password in Raya’s nodes option.

Head to the quick start to play your first track.