Skip to content

Commit

Permalink
refac(command): Reduced XP leaderboard chunk size to 5 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seb committed Apr 25, 2022
1 parent 80525f5 commit e7b2394
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,16 @@ public void executeInternal(CommandContext context, List<String> args) {
case "lb":
showServerLeaderboard(context, server);
break;
default:
context.reply("**That's not a valid subcommand!**\n" + this.getUsage());
break;
}
}
}
}

private void showServerLeaderboard(CommandContext context, Server server) {
List<Experience> topTenMembers = xpService.getServerLeaderboardChunk(server.getId(), 10, 0);
List<Experience> topTenMembers = xpService.getServerLeaderboardChunk(server.getId(), 5, 0);
int userPosition = xpService.getUserLeaderboardPosition(server.getId(), context.getAuthor().getId());
Experience userXP = xpService.getUserExperience(context.getAuthor().getId(), server.getId());

Expand Down Expand Up @@ -139,7 +142,7 @@ private String numberToEmoji(int number) {
private String convertSingleDigitToEmoji(String digit) {
switch (digit) {
case "0":
return ":zero";
return ":zero:";
case "1":
return ":one:";
case "2":
Expand Down

0 comments on commit e7b2394

Please sign in to comment.