guildMemberRemove Event

hi, how is the specific event to detect when a member of a guild leave the guild? Because I have tested with Events.GuildMemberRemove but it's not working (looks at the picture, helllllllo doesn't appears in the console...) thank u if you have replied this post
24 Replies
d.js toolkit
d.js toolkit5mo ago
Poulpe Glacé 🇨🇭
there is the code of event
d.js docs
d.js docs5mo ago
To share long code snippets, use a service like gist, sourcebin, pastebin, or similar instead of posting them as large code blocks or files.
Inky
Inky5mo ago
I doubt your code is even running if you don’t have discord.js installed How are you running the code?
Poulpe Glacé 🇨🇭
it is not long with discord.js it's strange
Amgelo
Amgelo5mo ago
it's more of a convenience thing, people on mobile also don't have to download your code he meant the exact command you don't run your code with djs though, you run it with node ... is that the folder where your index is located though? doesn't sound like it
Poulpe Glacé 🇨🇭
yes
Amgelo
Amgelo5mo ago
can you run ls there?
Poulpe Glacé 🇨🇭
I have many test-files in html and common javascript but if you want...
No description
Poulpe Glacé 🇨🇭
package.json :
No description
Amgelo
Amgelo5mo ago
cat index.cjs? or well, in a bin if it's large
Poulpe Glacé 🇨🇭
it is my code, i don't want you see my code, but i can keep you an event
Amgelo
Amgelo5mo ago
I mean, nobody here cares too much about anyone's code but at the very least show the client declaration which should most likely be in that index (and everything it depends on)
Amgelo
Amgelo5mo ago
both codeblocks are in the index.cjs?
Poulpe Glacé 🇨🇭
yes the second first, and first second 😅
souji
souji5mo ago
:boyeBomb: sorry for the automod, i screwed up a regex, should be fixed
Poulpe Glacé 🇨🇭
dont worry do you mean GuildMembers? I haven't found GuildMember
d.js docs
d.js docs5mo ago
:guide: Popular Topics: Partial Structures read more
Poulpe Glacé 🇨🇭
okay i am reading writing checking not working but i found my exact problem on stack overflow but it is too old so i will add GatewayIntentsBits.GuildPresences (256) to intents https://stackoverflow.com/questions/69021588/discord-js-guildmemberremove-doesnt-work-guildmemberadd-works-perfectly-fine isn't working again i understand i know okay and i have to do
if(member.partial){
await member.fetch()
}
(...)
if(member.partial){
await member.fetch()
}
(...)
okaaay i understand now but https://discord.com/channels/222078108977594368/1392114464278450247/1392163129793970240 it's working hello is writed in the console
Poulpe Glacé 🇨🇭
solved thx ❤️

Did you find this page helpful?