From 7d963b31951fdb4221e4ec799899923ade967b14 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Wed, 4 Oct 2023 00:36:17 +0300 Subject: [PATCH] fix(Role): calculate position correctly when rawPositions are equal --- packages/discord.js/src/structures/Role.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/src/structures/Role.js b/packages/discord.js/src/structures/Role.js index 09a2a52ca880..53e413d889e0 100644 --- a/packages/discord.js/src/structures/Role.js +++ b/packages/discord.js/src/structures/Role.js @@ -205,7 +205,7 @@ class Role extends Base { (acc, role) => acc + (this.rawPosition === role.rawPosition - ? BigInt(this.id) > BigInt(role.id) + ? BigInt(this.id) < BigInt(role.id) : this.rawPosition > role.rawPosition), 0, );