Description:
Shows incorrect position in description of leaderboard. The correct position is displayed in the top 10 list however for any user below 10th it's confusing.
Unknown if this affects this bot but is currently affecting this English version.
Commands Affected/leaderboard
Cause
Unknown
Source of issue:
.setDescription(
userPosition
? `You currently rank as ${userPosition < 4 ? bold(['🥇 top', '🥈 second highest', '🥉 third highest'][userPosition - 1]) : bold(`${ordinalNumber(userPosition)} place`)}, out of ${inlineCode(`${globalLeaderboard.length}`)}.`
: 'You don\'t have a rank card yet.'
)
(base)/commands/leaderboard.ts:96-100
Changes to be made
Attempt to debug through console.log
Issue detected
During definition of userPosition, leaderboard was not sorted therefore items came in random order, hence why the 15th out of 15 position
Description: Shows incorrect position in description of leaderboard. The correct position is displayed in the top 10 list however for any user below 10th it's confusing. Unknown if this affects this bot but is currently affecting this English version.
Commands Affected
/leaderboard
Cause Unknown
Source of issue:
(base)/commands/leaderboard.ts:96-100
Changes to be made Attempt to debug through console.log
Refer to #zbot-announcements for the latest updates while we're at it.