From a25d839f997e6c976289ce9c9e6f2ddd3d54495c Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Sun, 29 Oct 2023 13:17:35 +0700 Subject: [PATCH] fix(Role): calculate position correctly when rawPositions are equal #9872 djs --- src/structures/Role.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Role.js b/src/structures/Role.js index afe1499..446a594 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -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;