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
d.js docs
d.js docs3y ago
• 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.
MrMythical
MrMythical3y ago
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
⚡AmirhN
⚡AmirhNOP3y ago
so if i add GuildMember to my partials, it will get fixed?
MrMythical
MrMythical3y ago
Yeah, I believe
⚡AmirhN
⚡AmirhNOP3y ago
thanks uh it didnt fix oh it should be GUILD_MEMBER lemme try that
⚡AmirhN
⚡AmirhNOP3y ago
Discord.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.
⚡AmirhN
⚡AmirhNOP3y ago
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
MrMythical
MrMythical3y ago
👍
Want results from more Discord servers?
Add your server