Skip to content

Commit

Permalink
escape inline code
Browse files Browse the repository at this point in the history
  • Loading branch information
saiteja-madha committed Mar 27, 2022
1 parent 30b86cf commit b61f013
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/information/leaderboard.js
Original file line number Diff line number Diff line change
@@ -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");

Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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`;
Expand Down

0 comments on commit b61f013

Please sign in to comment.