<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
continuing-cyanโข11mo 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
continuing-cyanโข11mo ago
(For updating NL, just git pull)
same happened
continuing-cyanโข11mo ago
Mind providing newest logs from NL?
& could provide me what's the output of the command git log?
give me second
continuing-cyanโข11mo ago
Sure
never mind now its work ๐
continuing-cyanโข11mo 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
continuing-cyanโข11mo 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?
continuing-cyanโข11mo 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
continuing-cyanโข11mo ago
Mind enabling
all
logs in config.js and showing the logs?NodeLink ?
continuing-cyanโข11mo ago
Yes, there is a logging called
all
Are these logs correct?
continuing-cyanโข11mo 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 ๐
continuing-cyanโข11mo ago
For what? ๐
I mean, I'm sorry that I brought so many weird errors ๐ญ
continuing-cyanโข11mo 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
continuing-cyanโข11mo 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
continuing-cyanโข11mo ago
Some error is causing Moonlink to disconnect in this case
continuing-cyanโข11mo ago
Ahh, that's a internal Moonlink error
I thought it was a nodelink error ๐คฃ
yeah thats right XD
continuing-cyanโข11mo ago
The most appropriate case for this would be listening to trackStart event and set it
umm
continuing-cyanโข11mo ago
orrrrrrrrrrr
I think that would be good, too
continuing-cyanโข11mo 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
continuing-cyanโข11mo 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
continuing-cyanโข11mo 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?
continuing-cyanโข11mo ago
NodeLink accuses it to be sending volume 80% on-the-play
So somewhere does that
umm
continuing-cyanโข11mo ago
Before .play
Use
player.volume = selected_data?.volume || 50
Does it mean to set the <MoonlinkPlayer>.volume property?
continuing-cyanโข11mo ago
Yes
Its work :happypepe:
continuing-cyanโข11mo 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
continuing-cyanโข11mo ago
The NL logs seems fine
Yeah ๐
continuing-cyanโข11mo 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 โค๏ธ
continuing-cyanโข11mo 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
continuing-cyanโข11mo ago
Wouldn't affect anything at normal case though
Affects
continuing-cyanโข11mo 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??
continuing-cyanโข11mo ago
Nรฃo
Ele queria setar o volume on-the-play
ร o que o comando faz
continuing-cyanโข11mo 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
continuing-cyanโข11mo 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
continuing-cyanโข11mo ago
KKKKK รฉ sรณ adicionar um parรขmetro no play pra enviar coisa junta
Usa create
continuing-cyanโข11mo ago
Mas e depois no segundo play e se ele quiser alterar o volume?
Altera o parรขmetro
continuing-cyanโข11mo ago
Qual?
volume
continuing-cyanโข11mo ago
this.volume?
Ele รฉ sempre acionado junto com o play
continuing-cyanโข11mo 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
continuing-cyanโข11mo 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!
continuing-cyanโข11mo 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.
continuing-cyanโข11mo ago
To change the volume on-the-play, seems like this is the only way
i think so
continuing-cyanโข11mo 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 ๐
continuing-cyanโข11mo 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. ๐
continuing-cyanโข11mo ago
If you need any help with making a code more readable, count on us too :)