mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-20 23:24:43 +12:00
fix(Role): calculate position correctly when rawPositions are equal (#9872)
This commit is contained in:
parent
5f6a82d349
commit
56b481b3e0
1 changed files with 1 additions and 1 deletions
|
@ -231,7 +231,7 @@ class Role extends Base {
|
|||
let count = 0;
|
||||
for (const role of this.guild.roles.cache.values()) {
|
||||
if (this.rawPosition > role.rawPosition) count++;
|
||||
else if (this.rawPosition === role.rawPosition && BigInt(this.id) > BigInt(role.id)) count++;
|
||||
else if (this.rawPosition === role.rawPosition && BigInt(this.id) < BigInt(role.id)) count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
|
|
Loading…
Reference in a new issue