guildMemberUpdate - not working first attempt
why does sometimes guildMemberUpdate won't trigger first time? when i start the bot, it won't detect first change, it will start detecting at second one. and is it guaranteed that guildMemberUpdate data's are upToDate?
8 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.it may not trigger the first time due to caching issues.
What I think is happening is the guildMemberUpdate event fires, caches the new member and doesn't emit event because there is no oldMember to send. You should be able to turn on the GuildMember partial to fix this
so if i add GuildMember to my partials, it will get fixed?
Yeah, I believe
thanks
uh it didnt fix
oh
it should be
GUILD_MEMBER
lemme try thatDiscord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
partials: ['MESSAGE', 'CHANNEL', 'REACTION', 'GUILD_MEMBER'] });
this is how i added it
oh
i thought stable is v14
oh gotcha, now trying with the correct partials
works perfectly
thanks👍