mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
Add Role.members
This commit is contained in:
@@ -85,6 +85,14 @@ class Role {
|
|||||||
return `#${col}`;
|
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
|
* Get an object mapping permission names to whether or not the role enables that permission
|
||||||
* @returns {Object<string, boolean>}
|
* @returns {Object<string, boolean>}
|
||||||
|
|||||||
Reference in New Issue
Block a user