Skip to content

Commit

Permalink
Edit error message
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilloftheshadow committed Sep 2, 2021
1 parent d683e2d commit 83b9d4e
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 @@ -147,7 +147,7 @@ class AmariBot {
const lb = await this.getGuildLeaderboard(guildId)
const userData = lb.rawData.data.find((x) => x.id == userId)
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 (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!\nYou need to check this yourself by fetching the leaderboard page by page and finding the user's position from there.\nIn the future, there will be a better way to handle this, but its simply not possible at the moment.`)
if(!userData) throw new Error(`User ${userId} not found`)
return position + 1
}
Expand Down

0 comments on commit 83b9d4e

Please sign in to comment.