<MoonlinkPlayer>.skip() bug
When using the skip method, the <MoonlinkPlayer>.playing is returned to false
96 Replies
NodeLink Server Log
When I checked about the MoonlinkPlayer by eval (two queues and skip)
No trackStart event occurs either
helpful-purpleโข2y ago
Coincidence, that's a bug I literally fixed some few hours ago
Just update your NodeLink and it should be fine
Sorry for the trouble
Ahh i will try
helpful-purpleโข2y ago
(For updating NL, just git pull)
same happened
helpful-purpleโข2y ago
Mind providing newest logs from NL?
& could provide me what's the output of the command git log?
give me second
helpful-purpleโข2y ago
Sure
never mind now its work ๐
helpful-purpleโข2y ago
If you have any other bug with NodeLink, feel free to create a GitHub issue instead
The logs are very useful to know if it's a NodeLink bug or a client bug. If they don't say anything, and it should, then it's NodeLink mostly LMAO
Feel free to DM me for any bug confirmation, but hopefully you won't find any more :)
Thank you for always actively helping ๐
I thought I wrote the code wrong
helpful-purpleโข2y ago
And thanks for supporting small projects ^^
๐คฃ
I'm sorry for the trouble btw
@ThePedroo Sorry for ping
When playing a song, I try to adjust the sound using <MoonlinkPlayer>.setVolume(), but it's not a NodeLink problem to return the error just because the player hasn't played yet, right?
helpful-purpleโข2y ago
I wouldn't define it as a problem as this is made on purpose
But if you either try to pause or stop a player which doesn't have a playing player, it will do that
not set volume though
Also, dw about pinging me, I preffer that people ping me or else I won't see it till maybe days
The user tried to set the volume value when trying to play the song.
But I don't think the player was created in the meantime
GG @Jasper, you just advanced to level 3!

like that
helpful-purpleโข2y ago
Mind enabling
all
logs in config.js and showing the logs?NodeLink ?
helpful-purpleโข2y ago
Yes, there is a logging called
all
Are these logs correct?
helpful-purpleโข2y ago
Kinda of, let me see the crash in the end
It's weird how some people can get some issues others can't
Sorry ๐
helpful-purpleโข2y ago
For what? ๐
I mean, I'm sorry that I brought so many weird errors ๐ญ
helpful-purpleโข2y ago
Oh, I love when people send me then
Makes the project more stable
If i provide a delay with setTimeout, there will be no problem, but if i process it with then, an error will occur

helpful-purpleโข2y ago
Anyway, this happened because the client disconnected before NodeLink could actually process the play request -- so I'm not sending it to you a fix for that right now to wait me find a proper solution and send to the repo, as it's not an urgency
However we must find the reason of why the client is disconnecting
Mind providing your bot logs?
Probably can't wait on Moonlink for Player to be created
helpful-purpleโข2y ago
Some error is causing Moonlink to disconnect in this case
helpful-purpleโข2y ago
Ahh, that's a internal Moonlink error
I thought it was a nodelink error ๐คฃ
yeah thats right XD
helpful-purpleโข2y ago
The most appropriate case for this would be listening to trackStart event and set it
umm
helpful-purpleโข2y ago
orrrrrrrrrrr
I think that would be good, too
helpful-purpleโข2y ago
sending the volume together with play
Sending together is more appropriate
If i do this, it'll be output at the default sound value for about a second
helpful-purpleโข2y ago
Yeah
I thought that first but then I realized there are better ways
If I do this, the Player will be created late, and the same error will occur
helpful-purpleโข2y ago
Not really
It will be sent in the same payload
Let me see if I can find the example which does that
Async function included play and set volume method and exec
wrong code?
helpful-purpleโข2y ago
NodeLink accuses it to be sending volume 80% on-the-play
So somewhere does that
umm
helpful-purpleโข2y ago
Before .play
Use
player.volume = selected_data?.volume || 50
Does it mean to set the <MoonlinkPlayer>.volume property?
helpful-purpleโข2y ago
Yes
Its work :happypepe:
helpful-purpleโข2y ago
@1Lucas1.apk Aliรกs, vocรช tem que rever isso
Porque nรฃo tem como fazer o que ele quer sem fazer dessa forma -- exceto se for assim mesmo que tu queria que fizessem
helpful-purpleโข2y ago
The NL logs seems fine
Yeah ๐
helpful-purpleโข2y ago
Awesome! :)
Lmk if you have any further issues or questions
I'm always grateful that you've helped me in something that's not a big deal โค๏ธ
helpful-purpleโข2y ago
That's what I call open source community ^^
But his If is wrong...
If(player.playing) without the question mark, it will try to emit every time it is not playing
helpful-purpleโข2y ago
Wouldn't affect anything at normal case though
Affects
helpful-purpleโข2y ago
Nรฃo afeta o problema que ele queria resolver
Ele queria setar o volume ao tocar
Tentar mudar um volume em um player que nรฃo tรก tocando??
helpful-purpleโข2y ago
Nรฃo
Ele queria setar o volume on-the-play
ร o que o comando faz
helpful-purpleโข2y ago
Mas a รบnica forma de fazer isso รฉ mudando o this.volume direto
Isso nรฃo รฉ on-the-play, ele nรฃo vai junto ao pedido pra tocar
Precisa ser no mesmo payload
Sรณ era colocar no create
helpful-purpleโข2y ago
Seria รบtil no play tu deixar a pessoa fazer on-the-play de qualquer forma
ร รบtil pra reduzir latรชncia porque aรญ vai tudo no mesmo request
Vou encher de ifs se eu fizer
helpful-purpleโข2y ago
KKKKK รฉ sรณ adicionar um parรขmetro no play pra enviar coisa junta
Usa create
helpful-purpleโข2y ago
Mas e depois no segundo play e se ele quiser alterar o volume?
Altera o parรขmetro
helpful-purpleโข2y ago
Qual?
volume
helpful-purpleโข2y ago
this.volume?
Ele รฉ sempre acionado junto com o play
helpful-purpleโข2y ago
Se for o this.volume foi oq foi usado mesmo
GitHub
moonlink.js/src/@Entities/MoonlinkPlayer.ts at v3 ยท Ecliptia/moonli...
MoonLink.js is a simple package for lavalink client, perfect for you to create your discord bot with songs, and very simple and easy to use. - Ecliptia/moonlink.js
helpful-purpleโข2y ago
Sim, por isso eu falei pra usar o this.volume
Aliรกs, eu nรฃo tinha achado como alterar o volume no create
what happened
GG @Jasper, you just advanced to level 4!
helpful-purpleโข2y ago
^
Seems like you also set the volume on the create function too
When using the command, we implemented the track to be selected and played by the user based on the search. I was just trying to adjust the volume based on the selection.
For now, I wrote the code as above.
helpful-purpleโข2y ago
To change the volume on-the-play, seems like this is the only way
i think so
helpful-purpleโข2y ago
@1Lucas1.apk ?
It's been a while since I've studied typescript, so the code can be terrible ๐
GitHub
moonlink.js/src/@Entities/MoonlinkPlayer.ts at v3 ยท Ecliptia/moonli...
MoonLink.js is a simple package for lavalink client, perfect for you to create your discord bot with songs, and very simple and easy to use. - Ecliptia/moonlink.js
Tudo que vem do construtor รฉ usado
Desde autoPlay atรฉ node
Se quiser colocar que ele jรก venha com connected e playing pode atรฉ colocar ๐
helpful-purpleโข2y ago
ATA
Por isso que nรฃo vi explicitamente
As long as it works -- but it's always important to keep the code clean
I'll do my best. ๐
helpful-purpleโข2y ago
If you need any help with making a code more readable, count on us too :)