diff --git a/src/commands/information/leaderboard.js b/src/commands/information/leaderboard.js index 5b97bdd1b..1930a831e 100644 --- a/src/commands/information/leaderboard.js +++ b/src/commands/information/leaderboard.js @@ -1,5 +1,5 @@ const { Command } = require("@src/structures"); -const { Message, MessageEmbed, CommandInteraction } = require("discord.js"); +const { Message, MessageEmbed, CommandInteraction, Util } = require("discord.js"); const { EMBED_COLORS } = require("@root/config"); const { getXpLb, getInvitesLb } = require("@schemas/Member"); @@ -81,7 +81,7 @@ async function getXpLeaderboard({ guild }, author, settings) { 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}\n`; + collector += `**#${(i + 1).toString()}** - ${Util.escapeInlineCode(user.tag)}\n`; } catch (ex) { // Ignore } @@ -109,7 +109,7 @@ async function getInviteLeaderboard({ guild }, author, settings) { 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`; + collector += `**#${(i + 1).toString()}** - ${Util.escapeInlineCode(user.tag)} [${lb[i].invites}]\n`; } } catch (ex) { collector += `**#${(i + 1).toString()}** - DeletedUser#0000 [${lb[i].invites}]\n`;