Find what role was added/removed with guildMemberUpdate
Hi, I am trying to detect when a role is removed from a user. I currently have the following code:
I thought it would work, and in theory it does, however it doesn't work when the member's roles aren't in the cache (which is quite possible in my use case) so I was wondering if there's any way to detect what role has been removed given that the
old
's roles may not be cached. Thanks!4 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!

ah
Checking the audit logs for modified roles is the only way I would think would work.