EI
ratty-blush
TypeError: Cannot read properties of undefined (reading 'guildId')
Hello. Im getting the
TypeError: Cannot read properties of undefined (reading 'guildId') error but i cant get why. I have 3 buttons and the 1st and the 2nd button works fine but the 3th not and im confused because i used the client.moon.players.get() exactly like i did at the 1st and the 2nd button.
this is how i used to get the player:
(the guild_id is a let value and it is working its not undefined or null because at the 1st and the 2nd button it works too.)73 Replies
Hello
Could you give me the complete error that appears in the console, there are important parts below that show where it went
This can help us find the error
ratty-blushOP•3y ago
Sure! I know its important but i can only send it tomorrow. I didnt sent the entire error because idk why.
maybe, the daytime developers will help you when you submit the full bug, if you want to wait until nighttime to provide you with better support
ratty-blushOP•3y ago
Additional informations:
Nodejs: v18.15.0
Discordjs: v14.8.0
Moonlink.js: v1.10.70
wait let me try updating to the latest moonlink version.
You will have to update parts of your scripts if you update
updateVoiceState is now packetUpdate
ratty-blushOP•3y ago
i got got the error about that right now. but i suggest you to update the README of the package if you change such stuff.
GG @WhiteHell, you just advanced to level 1!
I changed
ratty-blushOP•3y ago
no
see the "Getting started" of the readme
ratty-blushOP•3y ago
updating the package version didnt helped
wait
so i guess its a issue with npm
since the entire readme is gone now
I'm checking the codes if there are any errors
ratty-blushOP•3y ago
npm and its issues :/

ratty-blushOP•3y ago
alright, thank you.
Oh my god I didn't update the package readme
ratty-blushOP•3y ago
happened to me and my package yesterday too lol
Did you check if the guildId property has a value in the players get?
ratty-blushOP•3y ago
yes
wait
i have 3 buttons. the "loop song", the "loop queue" and the "disable loop" button. all of them works with guild_id but the "disable loop" not.
i have checked my code
it should be all right on my side
Could you provide the part of the code that calls the players to execution?
to know if in this case it is the class or event that is not receiving the value
ratty-blushOP•3y ago
im confused. so you want to know if the guild value works?
In place of event is function*
ratty-blushOP•3y ago
wait
so the event "trackStart" ?
I'm doing a check
I just wanted the code part
ratty-blushOP•3y ago
it has 500+ lines. which one exactly? the part where it has the buttons function?
A from setLoop
ratty-blushOP•3y ago
wait
?play depois do universo
ratty-blushOP•3y ago
here is the collector:
("enable_queue_loop" and "enable_song_loop" works fine)
Music.<:Nota_Musica__Mlink:960665601574055966>╺╸
Title:<:Estrela_Mlink:960660485999587348>╺╸
Uri:<:emoji_21:967836966714503168>╺╸
Author:GIULIA BE
<:emoji_23:967837516558393365>╺╸
Duration:0 Days, 0 Hours, 3 Minutes, 188 Seconds

Request for: 1Lucas1.apk
GIULIA BE - DEPOIS DO UNIVERSO (official music video) is playing now
?eval client.moon.players.get(message.guild.id).setLoop(1)
?eval client.moon.players.get(message.guild.id).setLoop(null)
Internal error even in the disabling part
ratty-blushOP•3y ago
but setLoop(1 - 2) works for me so
GG @WhiteHell, you just advanced to level 2!
?play depois do universo
Music.<:Nota_Musica__Mlink:960665601574055966>╺╸
Title:<:Estrela_Mlink:960660485999587348>╺╸
Uri:<:emoji_21:967836966714503168>╺╸
Author:GIULIA BE
<:emoji_23:967837516558393365>╺╸
Duration:0 Days, 0 Hours, 3 Minutes, 188 Seconds

Request for: 1Lucas1.apk
GIULIA BE - DEPOIS DO UNIVERSO (official music video) is playing now
?eval client.moon.players.get(message.guild.id).setLoop(1)
?eval client.moon.players.get(message.guild.id).setLoop(null)
?play depois do universo
Music.<:Nota_Musica__Mlink:960665601574055966>╺╸
Title:<:Estrela_Mlink:960660485999587348>╺╸
Uri:<:emoji_21:967836966714503168>╺╸
Author:GIULIA BE
<:emoji_23:967837516558393365>╺╸
Duration:0 Days, 0 Hours, 3 Minutes, 188 Seconds

Request for: 1Lucas1.apk
GIULIA BE - DEPOIS DO UNIVERSO (official music video) is playing now
?eval client.moon.players.get(message.guild.id).setLoop(1)
?eval client.moon.players.get(message.guild.id).setLoop()
?play depois do universo
Music.<:Nota_Musica__Mlink:960665601574055966>╺╸
Title:<:Estrela_Mlink:960660485999587348>╺╸
Uri:<:emoji_21:967836966714503168>╺╸
Author:GIULIA BE
<:emoji_23:967837516558393365>╺╸
Duration:0 Days, 0 Hours, 3 Minutes, 188 Seconds

Request for: 1Lucas1.apk
GIULIA BE - DEPOIS DO UNIVERSO (official music video) is playing now
?eval client.moon.players.get(message.guild.id).setLoop(1)
?eval client.moon.players.get(message.guild.id).setLoop(null)
?eval typeof null
?eval 'null' == null
?eval null == null
?play depois do universo
Music.<:Nota_Musica__Mlink:960665601574055966>╺╸
Title:<:Estrela_Mlink:960660485999587348>╺╸
Uri:<:emoji_21:967836966714503168>╺╸
Author:GIULIA BE
<:emoji_23:967837516558393365>╺╸
Duration:0 Days, 0 Hours, 3 Minutes, 188 Seconds

Request for: 1Lucas1.apk
GIULIA BE - DEPOIS DO UNIVERSO (official music video) is playing now
?eval client.moon.players.get(message.guild.id).setLoop(1)
?eval client.moon.players.get(message.guild.id).setLoop(null)
Lewis Capaldi - Someone You Loved is playing now
Halsey - Without Me is playing now
@WhiteHell New version has been published with the fix
I think it should take a little while for the version to be available
ratty-blushOP•3y ago
alright thank you!
