5 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.hey guys , im trying to add / remove role to/from users with a specific role.
honestly im not getting any error , and it was working like a bit ago but suddenly it just stopped working.
here is my code
https://sourceb.in/RoAJOkCIu4
and when i use
it returns 0 , althou i can see some users that has the role
<Role>.members only contains cached GuildMembers
you'd need to fetch all members first with <Guild>.members.fetch()
you only need to do this once, since the cache will be further updated by eventsso if i need to do it once , its better i do it in ready event when the bot is getting online ?
sure