From b61f013ae06f744a7008e6902ef2a6091ac6d402 Mon Sep 17 00:00:00 2001 From: Sai Teja Madha <42540377+saiteja-madha@users.noreply.github.com> Date: Sun, 27 Mar 2022 23:28:32 +0530 Subject: [PATCH] escape inline code --- src/commands/information/leaderboard.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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`;