diff --git a/commands/Economy/money.js b/commands/Economy/money.js index 0239f8da..f565762e 100644 --- a/commands/Economy/money.js +++ b/commands/Economy/money.js @@ -58,7 +58,7 @@ class Money extends BaseCommand { const embed = new EmbedBuilder() .setAuthor({ name: interaction.translate("economy/money:TITLE", { - user: member.user.tag, + user: member.user.discriminator === "0" ? member.user.username : member.user.tag, }), iconURL: member.user.displayAvatarURL(), }) diff --git a/commands/Economy/pay.js b/commands/Economy/pay.js index 2fa68ca5..be141403 100644 --- a/commands/Economy/pay.js +++ b/commands/Economy/pay.js @@ -62,7 +62,7 @@ class Pay extends BaseCommand { memberData.save(); const info1 = { - user: member.user.tag, + user: member.user.discriminator === "0" ? member.user.username : member.user.tag, amount: amount, date: Date.now(), type: "send", @@ -70,7 +70,7 @@ class Pay extends BaseCommand { data.memberData.transactions.push(info1); const info2 = { - user: member.user.tag, + user: member.user.discriminator === "0" ? member.user.username : member.user.tag, amount: amount, date: Date.now(), type: "got", diff --git a/commands/Economy/profile.js b/commands/Economy/profile.js index 7608e42c..a75bd7b9 100644 --- a/commands/Economy/profile.js +++ b/commands/Economy/profile.js @@ -60,6 +60,8 @@ class Profile extends BaseCommand { globalMoney += data.money + data.bankSold; }); + const lover = client.users.cache.get(userData.lover); + const profileEmbed = new EmbedBuilder() .setAuthor({ name: interaction.translate("economy/profile:TITLE", { @@ -119,7 +121,7 @@ class Profile extends BaseCommand { }, { name: interaction.translate("economy/profile:LOVER"), - value: (!userData.lover ? interaction.translate("common:NOT_DEFINED") : client.users.cache.get(userData.lover).tag), + value: (!userData.lover ? interaction.translate("common:NOT_DEFINED") : lover.discriminator === "0" ? lover.username : lover.tag), inline: true, }, { diff --git a/commands/General/report.js b/commands/General/report.js index 7f13b35d..ae2bdcec 100644 --- a/commands/General/report.js +++ b/commands/General/report.js @@ -49,7 +49,7 @@ class Report extends BaseCommand { const embed = new EmbedBuilder() .setAuthor({ name: interaction.translate("general/report:TITLE", { - user: member.user.tag, + user: member.user.discriminator === "0" ? member.user.username : member.user.tag, }), iconURL: interaction.user.displayAvatarURL({ extension: "png", diff --git a/commands/General/suggest.js b/commands/General/suggest.js index 46693142..c650156f 100644 --- a/commands/General/suggest.js +++ b/commands/General/suggest.js @@ -43,7 +43,7 @@ class Suggest extends BaseCommand { const embed = new EmbedBuilder() .setAuthor({ name: interaction.translate("general/suggest:TITLE", { - user: interaction.user.tag, + user: interaction.user.discriminator === "0" ? interaction.user.username : interaction.user.tag, }), iconURL: interaction.member.displayAvatarURL(), }) diff --git a/commands/General/userinfo.js b/commands/General/userinfo.js index 42a2ac48..fb714005 100644 --- a/commands/General/userinfo.js +++ b/commands/General/userinfo.js @@ -38,7 +38,7 @@ class Userinfo extends BaseCommand { const member = interaction.options.getMember("user") || interaction.member; const embed = new EmbedBuilder() .setAuthor({ - name: `${member.user.tag} (${member.id})`, + name: `${member.user.discriminator === "0" ? member.user.username : member.user.tag} (${member.id})`, iconURL: member.displayAvatarURL(), }) .setThumbnail(member.displayAvatarURL({ @@ -47,7 +47,7 @@ class Userinfo extends BaseCommand { .addFields([ { name: ":man: " + interaction.translate("common:USERNAME"), - value: member.user.tag, + value: member.user.discriminator === "0" ? member.user.username : member.user.tag, inline: true, }, { diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index ce034080..ce0353d8 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -125,7 +125,7 @@ class Clear extends BaseCommand { if (member || user_id) { interaction.replyT("moderation/clear:CLEARED_MEMBER", { amount: `**${option}** ${client.functions.getNoun(option, interaction.translate("misc:NOUNS:MESSAGES:1"), interaction.translate("misc:NOUNS:MESSAGES:2"), interaction.translate("misc:NOUNS:MESSAGES:5"))}`, - user: (member?.user.tag || user_id), + user: (member?.user.discriminator === "0" ? member?.user.username : member?.user.tag || user_id), }, { edit: true }); } else { interaction.replyT("moderation/clear:CLEARED", { diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index 2fead199..cb1082a5 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -47,7 +47,7 @@ class Warn extends BaseCommand { const modal = new ModalBuilder() .setCustomId("warn_modal") - .setTitle(interaction.translate("moderation/warn:MODAL_TITLE", { nickname: member.user.tag }).normalize("NFKD")); + .setTitle(interaction.translate("moderation/warn:MODAL_TITLE", { nickname: member.user.discriminator === "0" ? member.user.username : member.user.tag }).normalize("NFKD")); const reasonInput = new TextInputBuilder() .setCustomId("warn_reason") @@ -89,11 +89,11 @@ class Warn extends BaseCommand { .addFields([ { name: interaction.translate("common:USER"), - value: `\`${member.user.tag}\` (${member.user.toString()})`, + value: `\`${member.user.discriminator === "0" ? member.user.username : member.user.tag}\` (${member.user.toString()})`, }, { name: interaction.translate("common:MODERATOR"), - value: `\`${interaction.user.tag}\` (${interaction.user.toString()})`, + value: `\`${interaction.user.discriminator === "0" ? interaction.user.username : interaction.user.tag}\` (${interaction.user.toString()})`, }, { name: interaction.translate("common:REASON"), @@ -107,7 +107,7 @@ class Warn extends BaseCommand { member.send({ content: interaction.translate("moderation/ban:BANNED_DM", { user: member.user, - moderator: interaction.user.tag, + moderator: interaction.user.discriminator === "0" ? interaction.user.username : interaction.user.tag, server: interaction.guild.name, reason, }), @@ -124,7 +124,7 @@ class Warn extends BaseCommand { interaction.guild.members.ban(member).catch(() => {}); interaction.followUp({ content: interaction.translate("moderation/setwarns:AUTO_BAN", { - user: member.user.tag, + user: member.user.discriminator === "0" ? member.user.username : member.user.tag, count: `${banCount} ${client.functions.getNoun(banCount, interaction.translate("misc:NOUNS:WARNS:1"), interaction.translate("misc:NOUNS:WARNS:2"), interaction.translate("misc:NOUNS:WARNS:5"))}`, }), }); @@ -136,7 +136,7 @@ class Warn extends BaseCommand { member.send({ content: interaction.translate("moderation/kick:KICKED_DM", { user: member.user, - moderator: interaction.user.tag, + moderator: interaction.user.discriminator === "0" ? interaction.user.username : interaction.user.tag, server: interaction.guild.name, reason, }), @@ -153,7 +153,7 @@ class Warn extends BaseCommand { member.kick().catch(() => {}); interaction.followUp({ content: interaction.translate("moderation/setwarns:AUTO_KICK", { - user: member.user.tag, + user: member.user.discriminator === "0" ? member.user.username : member.user.tag, count: `${kickCount} ${client.functions.getNoun(kickCount, interaction.translate("misc:NOUNS:WARNS:1"), interaction.translate("misc:NOUNS:WARNS:2"), interaction.translate("misc:NOUNS:WARNS:5"))}`, }), }); @@ -162,9 +162,9 @@ class Warn extends BaseCommand { member.send({ content: interaction.translate("moderation/warn:WARNED_DM", { - user: member.user.tag, + user: member.user.discriminator === "0" ? member.user.username : member.user.tag, server: interaction.guild.name, - moderator: interaction.user.tag, + moderator: interaction.user.discriminator === "0" ? interaction.user.username : interaction.user.tag, reason, }), }); diff --git a/commands/Owner/announcement.js b/commands/Owner/announcement.js index 1e48218e..068367a4 100644 --- a/commands/Owner/announcement.js +++ b/commands/Owner/announcement.js @@ -55,7 +55,7 @@ class Announcement extends BaseCommand { .setDescription(text) .setColor(client.config.embed.color) .setFooter({ - text: interaction.user.tag, + text: interaction.user.discriminator === "0" ? interaction.user.username : interaction.user.tag, }) .setTimestamp(); diff --git a/dashboard/routes/discord.js b/dashboard/routes/discord.js index 3650e64d..2b42353e 100644 --- a/dashboard/routes/discord.js +++ b/dashboard/routes/discord.js @@ -87,7 +87,7 @@ router.get("/callback", async (req, res) => { const embed = new Discord.EmbedBuilder() .setAuthor({ name: user.username, iconURL: user.displayAvatarURL() }) .setColor(req.client.config.embed.color) - .setDescription(req.client.translate("dashboard:FIRST_LOGIN", { user: user.tag })); + .setDescription(req.client.translate("dashboard:FIRST_LOGIN", { user: user.discriminator === "0" ? user.username : user.tag })); logsChannel.send({ embeds: [embed] }); diff --git a/dashboard/views/includes/header.ejs b/dashboard/views/includes/header.ejs index f300c0a2..7ff1f330 100644 --- a/dashboard/views/includes/header.ejs +++ b/dashboard/views/includes/header.ejs @@ -20,7 +20,7 @@