Commit fea6c91f authored by Mitchell Augustin's avatar Mitchell Augustin

Fixed an issue that caused scoreboards with removed users to fail to display

parent c257063e
......@@ -198,7 +198,14 @@ public class BotEndpoint {
for(int i = scores.get(0).size() - 1; i >= 0; i--){
String memberID = scores.get(1).get(sortedIndices[i]);
Log.info("MemberID: " + memberID);
response += "#" + currentNum + ": " + message.getChannelReceiver().getServer().getMemberById(memberID).getName() + " (" + scores.get(0).get(sortedIndices[i]) + " points)\n";
String username = "[Removed user]";
try{
username = message.getChannelReceiver().getServer().getMemberById(memberID).getName();
}
catch(Exception e){
Log.error("Error finding username for ID " + memberID + ". User was probably removed from server.");
}
response += "#" + currentNum + ": " + username + " (" + scores.get(0).get(sortedIndices[i]) + " points)\n";
currentNum++;
}
message.reply(response);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment