Skip to content

Commit

Permalink
Fixes #110
Browse files Browse the repository at this point in the history
  • Loading branch information
saiteja-madha committed Mar 13, 2022
1 parent 2d6de3f commit 1fde934
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/commands/information/leaderboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,14 @@ async function getInviteLeaderboard({ guild }, author, settings) {
let collector = "";
for (let i = 0; i < lb.length; i++) {
try {
const user = await author.client.users.fetch(lb[i].member_id);
collector += `**#${(i + 1).toString()}** - ${user.tag} [${lb[i].invites}]\n`;
const memberId = lb[i].member_id;
if (memberId === "VANITY") collector += `**#${(i + 1).toString()}** - Vanity URL [${lb[i].invites}]\n`;
else {
const user = await author.client.users.fetch(lb[i].member_id);
collector += `**#${(i + 1).toString()}** - ${user.tag} [${lb[i].invites}]\n`;
}
} catch (ex) {
// Ignore
collector += `**#${(i + 1).toString()}** - DeletedUser#0000 [${lb[i].invites}]\n`;
}
}

Expand Down

0 comments on commit 1fde934

Please sign in to comment.