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 toolkit17mo 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
duck17mo 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
duck17mo 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