24 Replies
1Lucas1.apk
1Lucas1.apk•2y ago
client.moon.players.get('id').queue.all
rare-sapphire
rare-sapphireOP•2y ago
let queue = player.queue.db.data.queue[player.guildId];
let queue = player.queue.db.data.queue[player.guildId];
oh~ thanks
1Lucas1.apk
1Lucas1.apk•2y ago
🫠 You are welcome
rare-sapphire
rare-sapphireOP•2y ago
@1Lucas1.apk I'd like to search track and detect if it's already registered in queue, what should I do?
1Lucas1.apk
1Lucas1.apk•2y ago
const trackFound = queue.all.some(item => item.identifier === track.identifier);

console.log(trackFound);
const trackFound = queue.all.some(item => item.identifier === track.identifier);

console.log(trackFound);
rare-sapphire
rare-sapphireOP•2y ago
Thanks you Is there a workaround since there is still a queue or current when the player returns to destroy? @1Lucas1.apk
1Lucas1.apk
1Lucas1.apk•2y ago
Just add it to the options parameters autoResume: true, resume: true AutoResume is for when lavalink is inactive, and resume is when the client is inactive, then when it returns, moonlink recovers all data and continues
MEE6
MEE6•2y ago
GG @릴리, you just advanced to level 1!
rare-sapphire
rare-sapphireOP•2y ago
I want all the data to be initialized when Player is destroyed
1Lucas1.apk
1Lucas1.apk•2y ago
Could you explain better because I didn't understand correctly?
rare-sapphire
rare-sapphireOP•2y ago
If I Destroy Player, I want to Destroy the data in the current and queue together @1Lucas1.apk
1Lucas1.apk
1Lucas1.apk•2y ago
Destroy already does this ?play another love
Blobit - Moonlink.js
discordlogo Music.
<:Nota_Musica__Mlink:960665601574055966>╺╸Title:
<:Estrela_Mlink:960660485999587348>╺╸Uri:
<:emoji_21:967836966714503168>╺╸Author:
7clouds Rock
<:emoji_23:967837516558393365>╺╸Duration:
0 Days, 0 Hours, 4 Minutes, 3 Seconds
From An unknown user
Request for: 1lucas1.apk
Blobit - Moonlink.js
Tom Odell - Another Love (Lyrics) is playing now [ time test result: 862ms ]
1Lucas1.apk
1Lucas1.apk•2y ago
?eval client.moon.players.get(message.guild.id)
Blobit - Moonlink.js
<ref *2> MoonlinkPlayer {
manager: <ref *1> MoonlinkManager {
_events: [Object: null prototype] {
debug: [Function (anonymous)],
nodeRaw: [Function (anonymous)],
trackStart: [AsyncFunction (anonymous)],
queueEnd: [AsyncFunction (anonymous)],
trackEnd: [Function (anonymous)]
},
_eventsCount: 5,
_maxListeners: undefined,
_nodes: [ [Object], [Object] ],
_sPayload: [Function (anonymous)],
initiated: true,
options: {
resumeKey: true,
resume: false,
autoResume: true,
sortNode: 'players',
custom: {},
clientName: 'Moonlink/2.15.80'
},
nodes: Map(2) {
'45.131.65.87' => [MoonlinkNode],
'lavalink-replit-2.1lucas1apk.repl.co' => [MoonlinkNode]
},
spotify: Spotify {
token: 'Bearer BQCjg131CfbSxK7JwmVaXOPoOdBOCYEXQMk6YYdlc062RyWzaDnYptKo64Voj5NjwgR2_tjJqOzlTkOSQ6UuEKm3V5y20_0t9um4E-MXovN05bwSO0M',
interval: 1700001656283000,
clientId: null,
clientSecret: null,
authorization: null,
searchMarket: 'US',
artistLimit: null,
albumLimit: null,
manager: [Circular *1],
searchDefault: undefined
},
deezer: Deezer { manager: [Circular *1] },
clientId: '960185850346471505',
version: '2.15.80',
map: Map(5) {
'sessionId' => '9156ayxx347j74t2',
'players' => [Object],
'voiceStates' => [Object],
'voiceServer' => [Object],
'current' => [Object]
},
[Symbol(kCapture)]: false
},
infos: undefined,
map: Map(5) {
'sessionId' => '9156ayxx347j74t2',
'players' => { '990369410344701964': [Object] },
'voiceStates' => { '990369410344701964': [Object] },
'voiceServer' => { '990369410344701964': [Object] },
'current' => { '990369410344701964': [Object] }
},
payload: [Function (anonymous)],
guildId: '990369410344701964',
textChannel: '1174084739041337424',
voiceChannel: '1089198118022680
<ref *2> MoonlinkPlayer {
manager: <ref *1> MoonlinkManager {
_events: [Object: null prototype] {
debug: [Function (anonymous)],
nodeRaw: [Function (anonymous)],
trackStart: [AsyncFunction (anonymous)],
queueEnd: [AsyncFunction (anonymous)],
trackEnd: [Function (anonymous)]
},
_eventsCount: 5,
_maxListeners: undefined,
_nodes: [ [Object], [Object] ],
_sPayload: [Function (anonymous)],
initiated: true,
options: {
resumeKey: true,
resume: false,
autoResume: true,
sortNode: 'players',
custom: {},
clientName: 'Moonlink/2.15.80'
},
nodes: Map(2) {
'45.131.65.87' => [MoonlinkNode],
'lavalink-replit-2.1lucas1apk.repl.co' => [MoonlinkNode]
},
spotify: Spotify {
token: 'Bearer BQCjg131CfbSxK7JwmVaXOPoOdBOCYEXQMk6YYdlc062RyWzaDnYptKo64Voj5NjwgR2_tjJqOzlTkOSQ6UuEKm3V5y20_0t9um4E-MXovN05bwSO0M',
interval: 1700001656283000,
clientId: null,
clientSecret: null,
authorization: null,
searchMarket: 'US',
artistLimit: null,
albumLimit: null,
manager: [Circular *1],
searchDefault: undefined
},
deezer: Deezer { manager: [Circular *1] },
clientId: '960185850346471505',
version: '2.15.80',
map: Map(5) {
'sessionId' => '9156ayxx347j74t2',
'players' => [Object],
'voiceStates' => [Object],
'voiceServer' => [Object],
'current' => [Object]
},
[Symbol(kCapture)]: false
},
infos: undefined,
map: Map(5) {
'sessionId' => '9156ayxx347j74t2',
'players' => { '990369410344701964': [Object] },
'voiceStates' => { '990369410344701964': [Object] },
'voiceServer' => { '990369410344701964': [Object] },
'current' => { '990369410344701964': [Object] }
},
payload: [Function (anonymous)],
guildId: '990369410344701964',
textChannel: '1174084739041337424',
voiceChannel: '1089198118022680
1Lucas1.apk
1Lucas1.apk•2y ago
?eval client.moon.players.get(message.guild.id).destroy()
Blobit - Moonlink.js
Promise { <pending> }
Promise { <pending> }
1Lucas1.apk
1Lucas1.apk•2y ago
?eval client.moon.players.get(message.guild.id)
Blobit - Moonlink.js
null
null
rare-sapphire
rare-sapphireOP•2y ago
humm...
1Lucas1.apk
1Lucas1.apk•2y ago
The Destroy method already deletes all data, from the database to player information
rare-sapphire
rare-sapphireOP•2y ago
If you create the player again after you destroy the player, the data remains the same @1Lucas1.apk
1Lucas1.apk
1Lucas1.apk•2y ago
No, they will be different, but some information may be the same such as guildId, voiceChannel, textChannel Others may be different And voiceChannel and textChannel can be different too That in case a user enters another voice channel and has another chat, it will be different

Did you find this page helpful?