Cannot get online users
I am trying to get an online user on that server when I use the s slash command. At that time, an error occurred. I have tried various devices but could not get it to work.
Code
Error
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.Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted.
If you are using the GuildMembers
, GuildPresences
, or MessageContent
intents, you need to enable them in the developer portal:
• Developer Portal > Your app > Bot > Privileged Gateway IntentsIts also worth noting that if a user is offline, they dont have a presence
You should be optional chaining that
Privileged intent should be enabled.
And in Client constructor?
It should probably be enabled.
its this then
I'm able to resolve the issue.