How do I get the number of roles that a user has on the server?

How do I get the number of roles that a user has on the server?
5 Replies
d.js toolkit
d.js toolkit2y 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.
duck
duck2y ago
<GuildMember>.roles.cache.size
Serial Designation N
It works, but it shows me +1. I have 21 Roles and he says 22. Why?
duck
duck2y ago
the everyone role is a role that everyone has
Serial Designation N
Oh true. And it is not shown in the profile XD Thanks
Want results from more Discord servers?
Add your server