How do i get all the roles that one member has?

I tried
console.log(msg.member.roles)
console.log(msg.member.roles)
But it doesn't work and ive tried variations but i am confused
5 Replies
d.js docs
d.js docs3y 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.
Idris
Idris3y ago
add .cache
Alex Kuma
Alex KumaOP3y ago
Perfect this worked! What does cache do? ?cache hmm
d.js docs
d.js docs3y ago
Documentation suggestion for @alexkuma:property GuildMemberRoleManager#cache The roles of this member
Idris
Idris3y ago
a Collection the of member's roles
Want results from more Discord servers?
Add your server