Skip to content

Commit

Permalink
fix: everyone role members (#9685)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
Syjalo and kodiakhq[bot] authored Jul 6, 2023
1 parent 78381a5 commit 0803eb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/discord.js/src/structures/Role.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ class Role extends Base {
* @readonly
*/
get members() {
return this.guild.members.cache.filter(m => m._roles.includes(this.id));
return this.id === this.guild.id
? this.guild.members.cache.clone()
: this.guild.members.cache.filter(m => m._roles.includes(this.id));
}

/**
Expand Down

0 comments on commit 0803eb5

Please sign in to comment.