Tomato6966 / erela.js

An up to date Lavalink Wrapper, which makes it easy to use Lavalink within your Discord Bot!
Apache License 2.0
50 stars 25 forks source link

Node won't connect. #38

Closed binary-blazer closed 1 year ago

binary-blazer commented 1 year ago

Hello! I have set my nodes array like so:

[
        {
            identifier: `MAIN`,
            port: 2333, host: "localhost",
            regions: ["us-east", "us-central", "us-south", "us-west", "brazil"],
            password: "youshallnotpass",
            retryAmount: 10,
            retryDelay: 7500,
            version: "v3",
            useVersionPath: true,
            secure: false
        }
],

I have downloaded the latest stable Lavalink.jar file already and I had setup the nodeConnect event and all the other events but it does not connect the node for some reason. The lavalink server is running fine and I already tried using the current lavalink at a different music bot I had coded last year and there it worked fine.

if needed, my enitre manager looks like so:

const { Client } = require('discord.js');

const client = new Client({
    intents: 32767
});

const { Manager } = require("erela.js");
const Deezer = require("better-erela.js-deezer");
const BandCampSearch = require("erela.js-bandcamp-search");

client.musicManager = new Manager({
    defaultSearchPlatform: "ytsearch",
    handleError: false,
    handleStuck: false,
    volumeDecrementer: 0.75,
    position_update_interval: 100,
    nodes: [
        {
            identifier: `MAIN`,
            port: 433, host: "localhost",
            regions: ["us-east", "us-central", "us-south", "us-west", "brazil"],
            password: "youshallnotpass",
            retryAmount: 10,
            retryDelay: 7500,
            version: "v3",
            useVersionPath: true,
            secure: false
        }
    ],
    validUnresolvedUris: [
        "spotify.com",
        "twitch.com",
        "twitch.tv",
        "vimeo.com",
        "bandcamp.com"
    ],
    plugins: [
        new Deezer(),
        new BandCampSearch({
            querySource: ["bandcamp", "bc"],
        }),
    ],
    shards: client.ws.totalShards || 1,
    clientName: client.user?.username,
    clientId: client.user?.id || client.id,
    send(id, payload) {
        const guild = client.guilds.cache.get(id);
        if(!guild) return;
        guild.shard.send(payload);
    },
});

I really don't know and understand what I'm doing wrong. can someone please help me?