diff --git a/src/structures/Role.js b/src/structures/Role.js index 0195a7d61..90ec74fec 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -85,6 +85,14 @@ class Role { return `#${col}`; } + /** + * The cached guild members that have this role. + * @type {Collection} + */ + 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}