(Bug): Error synchronizing information when connection is resumed

Error: @Moonlink(Player) - cannot change volume while the player is not playing
at MoonlinkPlayer.setVolume (C:\Users\user\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkPlayer.js:262:19)
at Object.execute (C:\Users\user\Desktop\Miona\src\interactions\commands\music\volume.js:51:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (C\Users\user\Desktop\Miona\src\events\InteractionCreate.js:46:17)
Error: @Moonlink(Player) - cannot change volume while the player is not playing
at MoonlinkPlayer.setVolume (C:\Users\user\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkPlayer.js:262:19)
at Object.execute (C:\Users\user\Desktop\Miona\src\interactions\commands\music\volume.js:51:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (C\Users\user\Desktop\Miona\src\events\InteractionCreate.js:46:17)
This error pops up even though the player is playing music.
const player = interaction.client.moon.players.get(interaction.guild.id);
if(!player || !player.current) {
return interaction.followUp({embeds: [
new EmbedBuilder()
.setDescription(":011: | No music is playing.")
.setColor("#e8be99")
]})
}
const player = interaction.client.moon.players.get(interaction.guild.id);
if(!player || !player.current) {
return interaction.followUp({embeds: [
new EmbedBuilder()
.setDescription(":011: | No music is playing.")
.setColor("#e8be99")
]})
}
after this i do some other checks and then
await player.setVolume(volume)
await player.setVolume(volume)
and it throws the error right here. If it was my problem the first check should've stopped me from setting the volume but the player and player.current are set
Solution:
Thanks for the explanation, I'll fix it as soon as I finish all the changes I'm making
Jump to solution
94 Replies
piton
pitonOP•13mo ago
To reproduce you play some song, then you CTRL+C the bot, restart it and then play another song and change the volume. config:
module.exports = async function registerMusic(client){
client.moon = new MoonlinkManager(nodes,
{
clientId: client.user.id,
clientName: client.user.tag,
movePlayersToNextNode: true,
resume: true
},
(guild, sPayload) => client.guilds.cache.get(guild).shard.send(JSON.parse(sPayload))
);
client.moon.init(client.user.id)
client.on("raw", (data) => client.moon.packetUpdate(data))

client.moon.on("playerCreated", (guildId) => require('../events/musicEvents/playerCreated').execute(client, guildId));
client.moon.on("trackStart", (player, current) => require('../events/musicEvents/trackStart').execute(client, player, current));
}
module.exports = async function registerMusic(client){
client.moon = new MoonlinkManager(nodes,
{
clientId: client.user.id,
clientName: client.user.tag,
movePlayersToNextNode: true,
resume: true
},
(guild, sPayload) => client.guilds.cache.get(guild).shard.send(JSON.parse(sPayload))
);
client.moon.init(client.user.id)
client.on("raw", (data) => client.moon.packetUpdate(data))

client.moon.on("playerCreated", (guildId) => require('../events/musicEvents/playerCreated').execute(client, guildId));
client.moon.on("trackStart", (player, current) => require('../events/musicEvents/trackStart').execute(client, player, current));
}
1Lucas1.apk
1Lucas1.apk•13mo ago
In the code you are putting if player or player current has nothing it will return what is in the embed The right thing to do would be to use the player.playing property
piton
pitonOP•13mo ago
yeah but that doesn't change the fact the the bot is playing a song and the player.playing propery is false
1Lucas1.apk
1Lucas1.apk•13mo ago
const player = interaction.client.moon.players.get(interaction.guild.id);
if(!player.playing) {
return interaction.followUp({embeds: [
new EmbedBuilder()
.setDescription(":011: | No music is playing.")
.setColor("#e8be99")
]})
}
const player = interaction.client.moon.players.get(interaction.guild.id);
if(!player.playing) {
return interaction.followUp({embeds: [
new EmbedBuilder()
.setDescription(":011: | No music is playing.")
.setColor("#e8be99")
]})
}
I'll do a check to see if there's anything in the codes interfering.
piton
pitonOP•13mo ago
yeah try to reproduce it like explained here
MEE6
MEE6•13mo ago
GG @piton, you just advanced to level 1!
1Lucas1.apk
1Lucas1.apk•13mo ago
I understand, so it's something about the summary system
Solution
1Lucas1.apk
1Lucas1.apk•13mo ago
Thanks for the explanation, I'll fix it as soon as I finish all the changes I'm making
piton
pitonOP•13mo ago
BTW: Moonlink.js Version: ^3.3.76 Lavalink Version: 4.0.3 @1Lucas1.apk any updates?
1Lucas1.apk
1Lucas1.apk•13mo ago
Not yet, I'm going to do it tomorrow, because today my cell phone received the software update and I was unable to update the package for a while, and in a little while I'm going to school My cell phone is freezing a little
piton
pitonOP•13mo ago
@1Lucas1.apk the issue still persists after updating to the new version
[Shard: 0] @Moonlink(Nodes) - The node lavalink4.alfari.id has been added, and is starting its initialization process
[Shard: 0] @Moonlink(Nodes) - Structure(Nodes) was successfully initialized and assigned the value of the main class and checked the nodes
[Shard: 0] @Moonlink(Players) - Structure(Players) has been initialized, and assigned the value of the main class
[Shard: 0] @Moonlink(Node) - The Node Void2 has been connected successfully
[Shard: 0] @Moonlink(Node) - session was resumed, session is currently 6rtznxv7npch1vj3
[Shard: 0] @Moonlink(Nodes) - Resuming configured
[Shard: 0] @Moonlink(Nodes) - A new lavalink server is being drawn, sorting the type players
[Shard: 0] @Moonlink(Players) - A server player was created (1135849836579672084)
[1709239025069] Error: @Moonlink(Player) - cannot change volume while the player is not playing
at MoonlinkPlayer.setVolume (C:\Users\user\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkPlayer.js:272:19)
at Object.execute (C:\Users\user\Desktop\Miona\src\interactions\commands\music\volume.js:51:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (C:\Users\user\Desktop\Miona\src\events\InteractionCreate.js:46:17)
[Shard: 0] @Moonlink(Nodes) - The node lavalink4.alfari.id has been added, and is starting its initialization process
[Shard: 0] @Moonlink(Nodes) - Structure(Nodes) was successfully initialized and assigned the value of the main class and checked the nodes
[Shard: 0] @Moonlink(Players) - Structure(Players) has been initialized, and assigned the value of the main class
[Shard: 0] @Moonlink(Node) - The Node Void2 has been connected successfully
[Shard: 0] @Moonlink(Node) - session was resumed, session is currently 6rtznxv7npch1vj3
[Shard: 0] @Moonlink(Nodes) - Resuming configured
[Shard: 0] @Moonlink(Nodes) - A new lavalink server is being drawn, sorting the type players
[Shard: 0] @Moonlink(Players) - A server player was created (1135849836579672084)
[1709239025069] Error: @Moonlink(Player) - cannot change volume while the player is not playing
at MoonlinkPlayer.setVolume (C:\Users\user\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkPlayer.js:272:19)
at Object.execute (C:\Users\user\Desktop\Miona\src\interactions\commands\music\volume.js:51:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (C:\Users\user\Desktop\Miona\src\events\InteractionCreate.js:46:17)
1Lucas1.apk
1Lucas1.apk•13mo ago
Could you send me the volume code? And the step by step of what you did I want to replicate the error to correct it
piton
pitonOP•13mo ago
piton
pitonOP•13mo ago
quit the bot and restarted it again and doing /volume it breaks
client.moon = new MoonlinkManager(nodes,
{
clientId: client.user.id,
clientName: client.user.tag,
resume: true
},
(guild, sPayload) => client.guilds.cache.get(guild).shard.send(JSON.parse(sPayload))
);
client.moon = new MoonlinkManager(nodes,
{
clientId: client.user.id,
clientName: client.user.tag,
resume: true
},
(guild, sPayload) => client.guilds.cache.get(guild).shard.send(JSON.parse(sPayload))
);
MEE6
MEE6•13mo ago
GG @piton, you just advanced to level 2!
1Lucas1.apk
1Lucas1.apk•13mo ago
The Xotak will do a test to see if it replicates the error, if so I will try to find a lavalink that doesn't have an error so I can update it to fix it
piton
pitonOP•13mo ago
sure, thanks
1Lucas1.apk
1Lucas1.apk•13mo ago
If there's a different or weird translation, it's Google Translate 👀
piton
pitonOP•13mo ago
no problem
1Lucas1.apk
1Lucas1.apk•13mo ago
Could you put a console.log in node_modules?
piton
pitonOP•13mo ago
yes where
1Lucas1.apk
1Lucas1.apk•13mo ago
Before if(!this.playing) in 271 in the MoonlinkPlayer.js file, could you put console.log(this)?
piton
pitonOP•13mo ago
sure wait
1Lucas1.apk
1Lucas1.apk•13mo ago
Okay
piton
pitonOP•13mo ago
1Lucas1.apk
1Lucas1.apk•13mo ago
Thank you very much @piton Is trackStart triggered? Now that I read the error correctly, the creation of the player is not going correctly Error UnhandledRejection: Error: @Moonlink(PlayerManager) - Missing parameters for player creation: voiceChannel at PlayerManager.create (C:\Users\kiko\Desktop\Miona\node_modules.pnpm\[email protected]\node_modules\moonlink.js\dist\src@Managers\PlayerManager.js:110:19) at MoonlinkNode.message (C:\Users\kiko\Desktop\Miona\node_modules.pnpm\[email protected]\node_modules\moonlink.js\dist\src@Entities\MoonlinkNode.js:177:62) VoiceChanne is missing
1Lucas1.apk
1Lucas1.apk•13mo ago
No description
1Lucas1.apk
1Lucas1.apk•13mo ago
But there is also voiceChannel In 298 Could you put console.log(previousInfosPlayer, resumedPlayer) In the MoonlinkNode file? Could you do me this other favor?
piton
pitonOP•13mo ago
in a minute
1Lucas1.apk
1Lucas1.apk•13mo ago
please: it's like (please) Favor*
piton
pitonOP•13mo ago
@1Lucas1.apk
piton
pitonOP•13mo ago
No description
piton
pitonOP•13mo ago
like this?
1Lucas1.apk
1Lucas1.apk•13mo ago
Is different? It's in the this.resume part of the ready event Inside MoonlinkNode
piton
pitonOP•13mo ago
its in TrackEndEvent in moonlinknode
piton
pitonOP•13mo ago
No description
piton
pitonOP•13mo ago
but as i can see there isnt previousInfosPlayer, nore resumedPlayer
1Lucas1.apk
1Lucas1.apk•13mo ago
On line 176 On top of const player, Put console.log I was in another file instead of dist
piton
pitonOP•13mo ago
{
guildId: '1135849836579672084',
textChannel: '1182397072721313942',
voiceChannel: '1135849837707935814',
loop: 0,
autoLeave: false,
previous: [],
volume: 80,
current: {
encoded: 'QAAAxAMAIENMRUFSRUQgLSByZW1peCAoT2ZmaWNpYWwgQXVkaW8pAAxMaWxpdGh6cGx1Z3oAAAAAAAHYqAALUURhd3MxVERxekkAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1RRGF3czFURHF6SQEAOmh0dHBzOi8vaS55dGltZy5jb20vdmlfd2VicC9RRGF3czFURHF6SS9tYXhyZXNkZWZhdWx0LndlYnAAAAd5b3V0dWJlAAAAAAAAPPA=',
identifier: 'QDaws1TDqzI',
title: 'CLEARED - remix (Official Audio)',
author: 'Lilithzplugz',
url: 'https://www.youtube.com/watch?v=QDaws1TDqzI',
duration: 121281,
position: 15600,
isSeekable: true,
isStream: false,
sourceName: 'youtube',
artworkUrl: 'https://i.ytimg.com/vi_webp/QDaws1TDqzI/maxresdefault.webp',
isrc: null,
time: 0
}
} {
guildId: '1135849836579672084',
track: {
encoded: 'QAAAxAMAIENMRUFSRUQgLSByZW1peCAoT2ZmaWNpYWwgQXVkaW8pAAxMaWxpdGh6cGx1Z3oAAAAAAAHYqAALUURhd3MxVERxekkAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1RRGF3czFURHF6SQEAOmh0dHBzOi8vaS55dGltZy5jb20vdmlfd2VicC9RRGF3czFURHF6SS9tYXhyZXNkZWZhdWx0LndlYnAAAAd5b3V0dWJlAAAAAAABWkE=',
info: {
identifier: 'QDaws1TDqzI',
isSeekable: true,
author: 'Lilithzplugz',
length: 121281,
isStream: false,
position: 88641,
title: 'CLEARED - remix (Official Audio)',
uri: 'https://www.youtube.com/watch?v=QDaws1TDqzI',
sourceName: 'youtube',
artworkUrl: 'https://i.ytimg.com/vi_webp/QDaws1TDqzI/maxresdefault.webp',
isrc: null
},
pluginInfo: { save_uri: 'https://www.youtube.com/watch?v=QDaws1TDqzI' },
userData: {}
},
volume: 80,
paused: false,
state: { time: 1709244050038, position: 88641, connected: true, ping: 29 },
voice: {
token: '6bd318a66be2df0b',
endpoint: 'bucharest2697.discord.media:443',
sessionId: '58038aeb14ed782a8ec54d74069cb718'
},
filters: {}
}
{
guildId: '1135849836579672084',
textChannel: '1182397072721313942',
voiceChannel: '1135849837707935814',
loop: 0,
autoLeave: false,
previous: [],
volume: 80,
current: {
encoded: 'QAAAxAMAIENMRUFSRUQgLSByZW1peCAoT2ZmaWNpYWwgQXVkaW8pAAxMaWxpdGh6cGx1Z3oAAAAAAAHYqAALUURhd3MxVERxekkAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1RRGF3czFURHF6SQEAOmh0dHBzOi8vaS55dGltZy5jb20vdmlfd2VicC9RRGF3czFURHF6SS9tYXhyZXNkZWZhdWx0LndlYnAAAAd5b3V0dWJlAAAAAAAAPPA=',
identifier: 'QDaws1TDqzI',
title: 'CLEARED - remix (Official Audio)',
author: 'Lilithzplugz',
url: 'https://www.youtube.com/watch?v=QDaws1TDqzI',
duration: 121281,
position: 15600,
isSeekable: true,
isStream: false,
sourceName: 'youtube',
artworkUrl: 'https://i.ytimg.com/vi_webp/QDaws1TDqzI/maxresdefault.webp',
isrc: null,
time: 0
}
} {
guildId: '1135849836579672084',
track: {
encoded: 'QAAAxAMAIENMRUFSRUQgLSByZW1peCAoT2ZmaWNpYWwgQXVkaW8pAAxMaWxpdGh6cGx1Z3oAAAAAAAHYqAALUURhd3MxVERxekkAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1RRGF3czFURHF6SQEAOmh0dHBzOi8vaS55dGltZy5jb20vdmlfd2VicC9RRGF3czFURHF6SS9tYXhyZXNkZWZhdWx0LndlYnAAAAd5b3V0dWJlAAAAAAABWkE=',
info: {
identifier: 'QDaws1TDqzI',
isSeekable: true,
author: 'Lilithzplugz',
length: 121281,
isStream: false,
position: 88641,
title: 'CLEARED - remix (Official Audio)',
uri: 'https://www.youtube.com/watch?v=QDaws1TDqzI',
sourceName: 'youtube',
artworkUrl: 'https://i.ytimg.com/vi_webp/QDaws1TDqzI/maxresdefault.webp',
isrc: null
},
pluginInfo: { save_uri: 'https://www.youtube.com/watch?v=QDaws1TDqzI' },
userData: {}
},
volume: 80,
paused: false,
state: { time: 1709244050038, position: 88641, connected: true, ping: 29 },
voice: {
token: '6bd318a66be2df0b',
endpoint: 'bucharest2697.discord.media:443',
sessionId: '58038aeb14ed782a8ec54d74069cb718'
},
filters: {}
}
1Lucas1.apk
1Lucas1.apk•13mo ago
Thanks
piton
pitonOP•13mo ago
np
1Lucas1.apk
1Lucas1.apk•13mo ago
Pastebin
"use strict";Object.defineProperty(exports, "__esModule", { value:...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
1Lucas1.apk
1Lucas1.apk•13mo ago
@piton Try replacing the code to see if that solves the problem. On MoonlinkNode .js
piton
pitonOP•13mo ago
hey, i just wanted you to know that i don't have any other nodes, just one if that makes any problems
1Lucas1.apk
1Lucas1.apk•13mo ago
No, no cause Sometimes it can be script or nodejs itself
piton
pitonOP•13mo ago
[Shard: 0] @Moonlink(Nodes) - The node lavalink4.alfari.id has been added, and is starting its initialization process
[Shard: 0] @Moonlink(Nodes) - Structure(Nodes) was successfully initialized and assigned the value of the main class and checked the nodes
[Shard: 0] @Moonlink(Players) - Structure(Players) has been initialized, and assigned the value of the main class
[Shard: 0] [Interactions] Deployed global commands.
[Shard: 0] @Moonlink(Node) - The Node Void2 has been connected successfully
[Shard: 0] @Moonlink(Node) - session was resumed, session is currently 6rtznxv7npch1vj3
[Shard: 0] @Moonlink(Nodes) - Resuming configured
[Shard: 0] [Interactions] Deployed dev commands.
[Shard: 0] @Moonlink(Nodes) - A new lavalink server is being drawn, sorting the type players
[Shard: 0] @Moonlink(Players) - A server player was created (1135849836579672084)
[Shard: 0] Error UnhandledRejection: TypeError: Cannot read properties of undefined (reading 'encoded')
at new MoonlinkTrack (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Utils\MoonlinkTrack.js:20:29)
at MoonlinkNode.message (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkNode.js:193:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Promise {
<rejected> TypeError: Cannot read properties of undefined (reading 'encoded')
at new MoonlinkTrack (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Utils\MoonlinkTrack.js:20:29)
at MoonlinkNode.message (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkNode.js:193:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
}
[Shard: 0] @Moonlink(Nodes) - The node lavalink4.alfari.id has been added, and is starting its initialization process
[Shard: 0] @Moonlink(Nodes) - Structure(Nodes) was successfully initialized and assigned the value of the main class and checked the nodes
[Shard: 0] @Moonlink(Players) - Structure(Players) has been initialized, and assigned the value of the main class
[Shard: 0] [Interactions] Deployed global commands.
[Shard: 0] @Moonlink(Node) - The Node Void2 has been connected successfully
[Shard: 0] @Moonlink(Node) - session was resumed, session is currently 6rtznxv7npch1vj3
[Shard: 0] @Moonlink(Nodes) - Resuming configured
[Shard: 0] [Interactions] Deployed dev commands.
[Shard: 0] @Moonlink(Nodes) - A new lavalink server is being drawn, sorting the type players
[Shard: 0] @Moonlink(Players) - A server player was created (1135849836579672084)
[Shard: 0] Error UnhandledRejection: TypeError: Cannot read properties of undefined (reading 'encoded')
at new MoonlinkTrack (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Utils\MoonlinkTrack.js:20:29)
at MoonlinkNode.message (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkNode.js:193:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Promise {
<rejected> TypeError: Cannot read properties of undefined (reading 'encoded')
at new MoonlinkTrack (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Utils\MoonlinkTrack.js:20:29)
at MoonlinkNode.message (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkNode.js:193:27)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
}
1Lucas1.apk
1Lucas1.apk•13mo ago
These days I was getting an error in Termux's NodeJs, I deleted everything from the environment and managed to fix it.
piton
pitonOP•13mo ago
it tries to resume even when there are no tracks, or when the player is not playing Now it says that there is no music playing even though its playing something
[Shard: 0] @Moonlink(PlayerManager) - a player(1135849836579672084) was disconnected, issuing stop and resolving information
[Shard: 0] [ @Moonlink/Nodes ]: The queue is empty
[Shard: 0] @Moonlink(PlayerManager) - a player(1135849836579672084) was disconnected, issuing stop and resolving information
[Shard: 0] [ @Moonlink/Nodes ]: The queue is empty
piton
pitonOP•13mo ago
No description
1Lucas1.apk
1Lucas1.apk•13mo ago
Sorry, my fault, old code that was open in the recent one, I didn't close it and open it Now I will send the right one
piton
pitonOP•13mo ago
okay
1Lucas1.apk
1Lucas1.apk•13mo ago
Pastebin
"use strict";Object.defineProperty(exports, "__esModule", { value: ...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
1Lucas1.apk
1Lucas1.apk•13mo ago
This is what is now
piton
pitonOP•13mo ago
[1709246235271] Error: @Moonlink(Player) - cannot change volume while the player is not playing
at MoonlinkPlayer.setVolume (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkPlayer.js:273:19)
at Object.execute (C:\Users\kiko\Desktop\Miona\src\interactions\commands\music\volume.js:51:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (C:\Users\kiko\Desktop\Miona\src\events\InteractionCreate.js:46:17)
[1709246235271] Error: @Moonlink(Player) - cannot change volume while the player is not playing
at MoonlinkPlayer.setVolume (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkPlayer.js:273:19)
at Object.execute (C:\Users\kiko\Desktop\Miona\src\interactions\commands\music\volume.js:51:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (C:\Users\kiko\Desktop\Miona\src\events\InteractionCreate.js:46:17)
MEE6
MEE6•13mo ago
GG @piton, you just advanced to level 3!
1Lucas1.apk
1Lucas1.apk•13mo ago
Could you send me the complete log?
piton
pitonOP•13mo ago
same thing, but its trying to resume in lavalink when nothing is playing, like the bot is not in the voice and its trying to resume
1Lucas1.apk
1Lucas1.apk•13mo ago
[ Shard: 0] Error UnhandledRejection: Error: @Moonlink(PlayerManager) - Missing parameters for player creation: voiceChannel This error is still there Kind of intriguing, because in the log that I requested with the information it was there, this error is preventing the player from being created correctly and resuming the connection as it should
piton
pitonOP•13mo ago
yes, but it shouldn't resume because the bot is not in the voice
1Lucas1.apk
1Lucas1.apk•13mo ago
If moonlink was based entirely on lavalink rest ful yes, but how does it cache all the data so it can understand it better and faster instead of request and request for lavalink If it were based on rest ful, the entire package process would take longer Then the system reorganizes all the information But somehow, your can't find the voiceChannel even though it exists And you also need to do this reconnection, because Lavalink will disconnect if you don't make the connection attempt. What is the nodejs version?
piton
pitonOP•13mo ago
v21.1.0
piton
pitonOP•13mo ago
No description
piton
pitonOP•13mo ago
when restarting the bot, it tries to resume but voiceChannels is null
1Lucas1.apk
1Lucas1.apk•13mo ago
Now it's null voiceChannel In a log before restarting the bot, does player(id) disconnected appear?
piton
pitonOP•13mo ago
no
1Lucas1.apk
1Lucas1.apk•13mo ago
And player moved?
piton
pitonOP•13mo ago
no
1Lucas1.apk
1Lucas1.apk•13mo ago
In player Manager you could replace the code for this https://pastebin.com/bzppcYGf Some annoying logs will appear, but this is to better understand when the voiceChannel does not appear. Then you give me the log from before "resume" and after "resume"
Pastebin
"use strict";Object.defineProperty(exports, "__esModule", { value:...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
piton
pitonOP•13mo ago
okay
1Lucas1.apk
1Lucas1.apk•13mo ago
playerManager
piton
pitonOP•13mo ago
i cleared the @Datastore and now its working it resumes correctly and the volume works as well
1Lucas1.apk
1Lucas1.apk•13mo ago
🫥 Okay, have a great day
piton
pitonOP•13mo ago
piton
pitonOP•13mo ago
you too thanks maybe you should add something in the library to remove the datastore when the bot is shut down for a long time
1Lucas1.apk
1Lucas1.apk•13mo ago
Thanks for the suggestion, but I was a little confused afterwards, I thought that with each update it would delete these files But now that I know he doesn't, I'm going to make a system to delete these files.
piton
pitonOP•13mo ago
nope still getting the same issue
[1709248035514] Error: @Moonlink(Player) - cannot change volume while the player is not playing
at MoonlinkPlayer.setVolume (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkPlayer.js:273:19)
at Object.execute (C:\Users\kiko\Desktop\Miona\src\interactions\commands\music\volume.js:51:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (C:\Users\kiko\Desktop\Miona\src\events\InteractionCreate.js:46:17)
[1709248035514] Error: @Moonlink(Player) - cannot change volume while the player is not playing
at MoonlinkPlayer.setVolume (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkPlayer.js:273:19)
at Object.execute (C:\Users\kiko\Desktop\Miona\src\interactions\commands\music\volume.js:51:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.execute (C:\Users\kiko\Desktop\Miona\src\events\InteractionCreate.js:46:17)
i will go now its late for me cya tomorrow
1Lucas1.apk
1Lucas1.apk•13mo ago
🫥 Well, in short: the summary system (made by Lavalink, was for network complications and others, one of the ways we can test if this system works is by turning off the bot But she doesn't have a good idea, like DJs do Moonlink has movePlayers and autoResume, these two already do this job AutoResume and when the bot is still connected, it managed to make Lavalink play all the applications that were previously online on it when it is reconnected And movePlayers, it will move to another node In the case of the resume, it is not an ideal way to do this But if you still want this system, I'll be here tomorrow to try to help you solve the problem. It's also not very viable for the idea, wow, I'm going to make a change while the bot is online playing for people You can, at the exact moment, change the volume, shuffle, skip, or in the last part of playing a track, destroying another Confusion in the data
piton
pitonOP•13mo ago
It's not that I will make a change, but the lavalink server might stop so resume is good option to have
1Lucas1.apk
1Lucas1.apk•13mo ago
I understood
1Lucas1.apk
1Lucas1.apk•13mo ago
I fixed the playerManager, could you test it? https://pastebin.com/dCksi4S9
Pastebin
"use strict";Object.defineProperty(exports, "__esModule", { value:...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
1Lucas1.apk
1Lucas1.apk•13mo ago
Now it will no longer save undefined data, and also deletes @Datastore
piton
pitonOP•13mo ago
Sorry not home I'm home in about an hour or two
1Lucas1.apk
1Lucas1.apk•13mo ago
All good
piton
pitonOP•13mo ago
same error
piton
pitonOP•13mo ago
piton
pitonOP•13mo ago
Error UnhandledRejection: Error: @Moonlink(PlayerManager) - Missing parameters for player creation: textChannel, voiceChannel
at PlayerManager.create (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Managers\PlayerManager.js:111:13)
at MoonlinkNode.message (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkNode.js:177:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Promise {
<rejected> Error: @Moonlink(PlayerManager) - Missing parameters for player creation: textChannel, voiceChannel
at PlayerManager.create (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Managers\PlayerManager.js:111:13)
at MoonlinkNode.message (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkNode.js:177:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
}
Error UnhandledRejection: Error: @Moonlink(PlayerManager) - Missing parameters for player creation: textChannel, voiceChannel
at PlayerManager.create (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Managers\PlayerManager.js:111:13)
at MoonlinkNode.message (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkNode.js:177:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Promise {
<rejected> Error: @Moonlink(PlayerManager) - Missing parameters for player creation: textChannel, voiceChannel
at PlayerManager.create (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Managers\PlayerManager.js:111:13)
at MoonlinkNode.message (C:\Users\kiko\Desktop\Miona\node_modules\.pnpm\[email protected]\node_modules\moonlink.js\dist\src\@Entities\MoonlinkNode.js:177:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
}
MEE6
MEE6•13mo ago
GG @piton, you just advanced to level 4!
piton
pitonOP•13mo ago
{
"sessionId": {
"Void2": "nqww48w7prx7tmz3"
},
"players": {
"1135849836579672084": {
"previous": {
"encoded": "QAAAxAMAIENMRUFSRUQgLSByZW1peCAoT2ZmaWNpYWwgQXVkaW8pAAxMaWxpdGh6cGx1Z3oAAAAAAAHYqAALUURhd3MxVERxekkAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1RRGF3czFURHF6SQEAOmh0dHBzOi8vaS55dGltZy5jb20vdmlfd2VicC9RRGF3czFURHF6SS9tYXhyZXNkZWZhdWx0LndlYnAAAAd5b3V0dWJlAAAAAAAAAAA=",
"identifier": "QDaws1TDqzI",
"title": "CLEARED - remix (Official Audio)",
"author": "Lilithzplugz",
"url": "https://www.youtube.com/watch?v=QDaws1TDqzI",
"duration": 121000,
"position": 0,
"isSeekable": true,
"isStream": false,
"sourceName": "youtube",
"requester": "332434816601554945",
"artworkUrl": "https://i.ytimg.com/vi_webp/QDaws1TDqzI/maxresdefault.webp",
"isrc": null,
"time": 0
}
}
},
"queue": {
"1135849836579672084": []
}
}
{
"sessionId": {
"Void2": "nqww48w7prx7tmz3"
},
"players": {
"1135849836579672084": {
"previous": {
"encoded": "QAAAxAMAIENMRUFSRUQgLSByZW1peCAoT2ZmaWNpYWwgQXVkaW8pAAxMaWxpdGh6cGx1Z3oAAAAAAAHYqAALUURhd3MxVERxekkAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1RRGF3czFURHF6SQEAOmh0dHBzOi8vaS55dGltZy5jb20vdmlfd2VicC9RRGF3czFURHF6SS9tYXhyZXNkZWZhdWx0LndlYnAAAAd5b3V0dWJlAAAAAAAAAAA=",
"identifier": "QDaws1TDqzI",
"title": "CLEARED - remix (Official Audio)",
"author": "Lilithzplugz",
"url": "https://www.youtube.com/watch?v=QDaws1TDqzI",
"duration": 121000,
"position": 0,
"isSeekable": true,
"isStream": false,
"sourceName": "youtube",
"requester": "332434816601554945",
"artworkUrl": "https://i.ytimg.com/vi_webp/QDaws1TDqzI/maxresdefault.webp",
"isrc": null,
"time": 0
}
}
},
"queue": {
"1135849836579672084": []
}
}
1Lucas1.apk
1Lucas1.apk•13mo ago
It was just to test, it seems like something is being replaced, I'll fix it and you can test it Sorry for the delay in trying to find a solution to your problem, because we couldn't replicate the error, it was normal for the tester and for me too
1Lucas1.apk
1Lucas1.apk•13mo ago
https://pastebin.com/fudX87zg @piton Try now, delete @Datastore
Pastebin
"use strict";Object.defineProperty(exports, "__esModule", { value:...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
1Lucas1.apk
1Lucas1.apk•13mo ago
Now it should work, I saw that it wasn't right, I re-coded it like I did in ts, so I compiled it again and it seems to be right now.
piton
pitonOP•13mo ago
i've tried and resume works its late for me, so i will test it more tomorrow for now it works
1Lucas1.apk
1Lucas1.apk•13mo ago
Okay, when you've tested it further and it works, just confirm here in the chat and I'll close this post Have a great day :), in a day it will be corrected in the next version
piton
pitonOP•13mo ago
@1Lucas1.apk you can publish it it works now

Did you find this page helpful?