I have a problem with member.roles.cache.fetch()
why i can't use fetch method of RoleManager?

6 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!It indeed isnt
you either use the cache, or fetch. Not both
But you shouldn't have to fetch regardless if you have the Guilds intent
Neither should you have to fetch the guild
and you aren't using the fetch method of RoleManager, you're using the fetch method of RoleManager#cache, which is a Collection (a Map)
Thanks for explanation
I actually did have the intent enabled, and I was originally using the cache
But then a bug occurred, and I suspected it was because the cached information wasn't the latest
so, that's why I tried using fetch to get the updated data
oh i see , however when i try i got same error
Because it doesnt exist on a GuildMemberRoleManager
you need to fetch the member to get the roles, can't fetch only the roles