Skip to content

Commit

Permalink
perf(Role): improve members getter (#9529)
Browse files Browse the repository at this point in the history
perf(Role): improve members
  • Loading branch information
jaw0r3k authored May 6, 2023
1 parent cdaa0a3 commit 37181ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/discord.js/src/structures/Role.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class Role extends Base {
* @readonly
*/
get members() {
return this.guild.members.cache.filter(m => m.roles.cache.has(this.id));
return this.guild.members.cache.filter(m => m._roles.includes(this.id));
}

/**
Expand Down

0 comments on commit 37181ab

Please sign in to comment.