mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Add Role.members
This commit is contained in:
@@ -85,6 +85,14 @@ class Role {
|
||||
return `#${col}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* The cached guild members that have this role.
|
||||
* @type {Collection<string, GuildMember>}
|
||||
*/
|
||||
get members() {
|
||||
return this.guild.members.filter(m => m.roles.has(this.id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an object mapping permission names to whether or not the role enables that permission
|
||||
* @returns {Object<string, boolean>}
|
||||
|
||||
Reference in New Issue
Block a user