Skip to content

Commit

Permalink
Change the position to be 1-based
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilloftheshadow committed Aug 31, 2021
1 parent 3287c9a commit d223a08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AmariBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class AmariBot {
const position = lb.rawData.data.indexOf(userData)
if (lb.totalCount > 1000 && !position < 0) throw new Error(`The guild with the ID ${guildId} has more than 1000 people on the leaderboard, and the user is not in the first 1000 people in the guild's leaderboard! You need to check this yourself by fetching the leaderboard page by page and finding the user's position from there`)
if(!userData) throw new Error(`User ${userId} not found`)
return position
return position + 1
}

/**
Expand Down

0 comments on commit d223a08

Please sign in to comment.