Start playing the wrong track
Currently we have the problem when the player is destroyed and then recreated that it starts for 3 seconds with the old track, but then cancels it and starts again with the right one.
22 Replies
This seems to me to be a problem with lavalink/nodelink or alternatively, moonlink only instructs the server,
It could be a problem on our side in destroying the player, I will investigate tomorrow
I'm from Brazil and it's night
Can you provide me with moonlink logs?
GG @1Lucas1.apk, you just advanced to level 41!
You can put a parameter to save in file there you upload here
Rest assured that it will only save the package, I need this to know what is happening
If possible, send me full, not in parts, I need the details
I also left the Voice Channel at the end. But I don't see the destroy in the log file. But the bot leaves the voice channel. Is that perhaps the problem?
I see that when you enter the channel, create the player, wait for the voice information and play Zorro - Heaven Was Mine after All
Then it is destroyed, and applied at the end of the loop.
But you only got the player information
I really want everything
To see if there is any abnormality in Rest, etc.
this is all that is in the log file
Are you using Lavalink?
yes
This is the track https://s3.galaxybot.app/media/audio/support/open-stefan.mp3
GG @BastiGameć, you just advanced to level 2!
I got ready, already went to make a Commit Pro Dev
@BastiGameć npm install git+https://github.com/Ecliptia/moonlink.js.git#dev
GitHub
GitHub - Ecliptia/moonlink.js: MoonLink.js is a simple package for ...
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. - GitHub - Ecliptia/moonlink.js: MoonLink.js is a simpl...
I could test for me, I made a change that worked for me
okay, i would test it
The fact that the bot now takes longer may also be due to the fact that I tested it locally. Unfortunately, I can't test it directly on the host at the moment.
The change I made is to check if the loop is activated, but from the logs, the loop is being activated after the player is destroyed
[2025-04-26T15:50:57.763Z] Moonlink.js - Player > Player for guildId 1364543610200002634 has been deleted
[2025-04-26T15:50:57.836Z] Moonlink.js > Player 1364543610200002634 is looping the track.
When loop is activated, some tracks may come with the last team that played, so we should return to position 0, but as this is about destruction
There is something assigning a value
And the database recognizes this
It needs to be before destruction
The bot I tested is in the repository in the dev branch, testBot/index.js folder
This is the code we currently have. It does not work with this one. But I don't see any difference to your code
I think I know the problem, I'll fix it
@BastiGameć npm install git+https://github.com/Ecliptia/moonlink.js.git#dev
GitHub
GitHub - Ecliptia/moonlink.js: MoonLink.js is a simple package for ...
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. - GitHub - Ecliptia/moonlink.js: MoonLink.js is a simpl...
I made another change
Now I did it right and it seems to have gone
Package was processing data even if the player was destroyed, then I made a parameter to ensure that I do not happen it

thank you very much. Do you make a new release for this? We don't want to use the dev branch for the live bot.
And can i maybe have the bug hanter role š
I will launch this when one of the source is finished inside the package
It can be :hi:
Solution
Thank you š