wtfnotavailable / Discord-MusicBot

Discord Music Bot Source Tree
Other
179 stars 84 forks source link

feat/Lavalink V4 Support #215

Closed LewdHuTao closed 8 months ago

LewdHuTao commented 8 months ago

Since this bot been using old unmaintained wrapper (Erela.js) for a long time i think it would be good to change to a new wrapper. This new repo are unmaintained but at least it still support both lavalink v3 and v4.

LewdHuTao commented 8 months ago

Another reason why i update the wrapper because people been requesting for lavalink v4 ;-;

image image image

LewdHuTao commented 8 months ago

Changes:

Version should be clarify on top of config.js file, for default it will set to use lavalink v4

/**
 * restVersion to use // "v4" or "v3"
 */
const restVersion = "v4"; // for default lavalink v4 will be use

Then lavalink can be setup like usual

nodes: [
        {
            identifier: "DockerNode", // log id string
            host: "docker.lavalink",
            port: 2333,
            password: "youshallnotpass",
            retryAmount: 15, // for lavalink connection attempts
            retryDelay: 6000, // Delay between reconnect attempts if connection is lost.
            secure: false, // if lavalink is running SSL
            version: restVersion, // whether to use Lavalink v4 or v3
        },
        {
            identifier: "LocalNode", // log id string
            host: "localhost",
            port: 2333,
            password: "youshallnotpass",
            retryAmount: 15, // for lavalink connection attempts
            retryDelay: 6000, // Delay between reconnect attempts if connection is lost.
            secure: false, // if lavalink is running SSL
            version: restVersion, // whether to use Lavalink v4 or v3
        },
    ],