#get roles of mentionned members
1 messages · Page 1 of 1 (latest)
you want to get the roles of both members ?
if this, use <member>.roles on the member objects
_roles is a private property, theres a .roles which is a GuildMemberRoleManager
yes but when i parse mentions in message content
there is my code :
// ANTI PING STAFF
let user = message.mentions.members;
if(user) console.log(user)```
user is a collection of members
collection doesnt have a .roles property
yes
a GuildMember does
ye but how can i parse
do you know what a collection is
No he don’t
Or when he detect mentions, how can i get only all mentions users id?
You don’t have to "parse" a collection
Or
collection.forEach(member => {
console.log(member.roles)
})
With this you get each members, then just get the roles
member._roles