check server status and change server
my idea is to add 10 lavalink servers and each one can have max 100 bots on it
how can i make the code check if the server is at 100 bot or not and if it is how can the bot disconnect and re connect to another one
18 Replies
foreign-sapphire•17mo ago
Do you want to make it through IP checking? I'd recommend NodeLink for that case
It's easier to edit
can i connect and check?
foreign-sapphire•17mo ago
What do you mean, connect to..?
i get in the log
@1Lucas1.apk
foreign-sapphire•17mo ago
You're confusing nodelink with lavalink; with lavalink, it will need java knowledge.
The issue about connecting I am not sure, I don't use moonlink, but I recommend debugging with console.log
some bots don't connect to lavalink
when i run the command
play test
it reply with the music name and everything but the music don't start
@1Lucas1.apkforeign-sapphire•17mo ago
You're probably missing ws event calling moonlink's function to send voice info to lavalink
Could you add an event?
Just to see if you are receiving information from lavalink
And could you tell me which version of lavalink and nodejs are you using?
@1Lucas1.apk
nodejs 16
lavalink beta
this when i start a song
GG @Turki, you just advanced to level 1!
Update nodejs to v18 or above
When you download nodejs v18 could you test again
Because I did some tests before, in the version below node 18 some errors were occurring
i well try it
@Turki
Hello, I made some corrections
And to check if it's working
In your project's package.json
You look for moonlink.js in dependency and replace it with
"moonlink.js": "https://github.com/1Lucas1apk/moonlink.js",
And npm install, and test again
foreign-sapphire•16mo ago
(Que eu saiba, era pra ser 1Lucas1apk/moonlink.js)
Funcionar assim também eu testei indagora
foreign-sapphire•16mo ago
Ah sim
As in this form in package.json in this first image
Change the version using the repository link
Nem é segredo mais
Tem tanta print dele
