mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 01:31:29 +00:00
Add Role.members
This commit is contained in:
parent
aa9fdf2e26
commit
46c28c0d05
1 changed files with 8 additions and 0 deletions
|
|
@ -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>}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue