From 56b481b3e07335ecd9309aa3d592ba5ef3651f02 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Mon, 9 Oct 2023 10:22:55 +0300 Subject: [PATCH] fix(Role): calculate position correctly when rawPositions are equal (#9872) --- 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 afe1499f7..446a5947e 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;