From 5d6746a233d13caf19a9b37f6d04839115b670d9 Mon Sep 17 00:00:00 2001 From: Supositware Date: Wed, 13 Sep 2023 20:56:06 +0200 Subject: [PATCH] Replace tag with username --- commands/owner/dm.js | 4 ++-- commands/utility/donator.js | 2 +- commands/utility/download.js | 4 ++-- commands/utility/feedback.js | 2 +- commands/utility/stats.js | 2 +- commands/utility/userinfo.js | 2 +- events/client/interactionCreate.js | 2 +- events/client/messageCreate.js | 2 +- events/client/ready.js | 2 +- utils/ratelimiter.js | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/commands/owner/dm.js b/commands/owner/dm.js index f3f640bf..968a1d75 100644 --- a/commands/owner/dm.js +++ b/commands/owner/dm.js @@ -58,10 +58,10 @@ export default { else { client.users.resolve(user).send(Embed) .then(() => { - return interaction.reply(`DM sent to ${user.tag}`); + return interaction.reply(`DM sent to ${user.username}`); }) .catch(() => { - return interaction.reply(`Could not send a DM to ${user.tag}`); + return interaction.reply(`Could not send a DM to ${user.username}`); }); } */ diff --git a/commands/utility/donator.js b/commands/utility/donator.js index 9558d540..889bd377 100644 --- a/commands/utility/donator.js +++ b/commands/utility/donator.js @@ -17,7 +17,7 @@ export default { if (Donator[0]) { for (let i = 0; i < Donator.length; i++) { const user = await client.users.fetch(Donator[i].get('userID').toString()); - if (user !== null) {donatorMessage += `**${user.tag} (${user.id}) | ${Donator[i].get('comment')}**\n`;} + if (user !== null) {donatorMessage += `**${user.username} (${user.id}) | ${Donator[i].get('comment')}**\n`;} else {donatorMessage += `**A user of discord (${user.id}) | ${Donator[i].get('comment')} (This user no longer share a server with the bot)**\n`;} } diff --git a/commands/utility/download.js b/commands/utility/download.js index 463cde39..3113b5eb 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -141,8 +141,8 @@ async function download(url, interaction, originalInteraction) { const Embed = new EmbedBuilder() .setColor(interaction.member ? interaction.member.displayHexColor : 'Navy') - .setAuthor({ name: `Downloaded by ${interaction.user.tag}`, iconURL: interaction.user.displayAvatarURL(), url: url }) - .setFooter({ text: `You can get the original video by clicking on the "Downloaded by ${interaction.user.tag}" message!` }); + .setAuthor({ name: `Downloaded by ${interaction.user.username}`, iconURL: interaction.user.displayAvatarURL(), url: url }) + .setFooter({ text: `You can get the original video by clicking on the "Downloaded by ${interaction.user.username}" message!` }); if (interaction.customId === `downloadQuality${interaction.user.id}`) { diff --git a/commands/utility/feedback.js b/commands/utility/feedback.js index 9cf0c5d5..b90af795 100644 --- a/commands/utility/feedback.js +++ b/commands/utility/feedback.js @@ -18,7 +18,7 @@ export default { category: 'utility', async execute(interaction, args) { const Embed = new EmbedBuilder() - .setAuthor({ name: `${interaction.user.tag} (${interaction.user.id})`, iconURL: interaction.user.avatarURL() }) + .setAuthor({ name: `${interaction.user.username} (${interaction.user.id})`, iconURL: interaction.user.avatarURL() }) .setTimestamp(); if (interaction.guild) Embed.addFields({ name: 'Guild', value: `${interaction.guild.name} (${interaction.guild.id})`, inline: true }); diff --git a/commands/utility/stats.js b/commands/utility/stats.js index 76e89759..bd7b567f 100644 --- a/commands/utility/stats.js +++ b/commands/utility/stats.js @@ -36,7 +36,7 @@ export default { const statsEmbed = new EmbedBuilder() .setColor(interaction.member ? interaction.member.displayHexColor : 'Navy') .setTitle('Bot stats') - .setAuthor({ name: client.user.tag, iconURL: client.user.displayAvatarURL(), url: 'https://libtar.de' }) + .setAuthor({ name: client.user.username, iconURL: client.user.displayAvatarURL(), url: 'https://libtar.de' }) .addFields( { name: 'Servers', value: client.guilds.cache.size.toString(), inline: true }, { name: 'Channels', value: client.channels.cache.size.toString(), inline: true }, diff --git a/commands/utility/userinfo.js b/commands/utility/userinfo.js index 21937f76..1f9ae531 100644 --- a/commands/utility/userinfo.js +++ b/commands/utility/userinfo.js @@ -20,7 +20,7 @@ export default { } const Embed = new EmbedBuilder() .setColor(member ? member.displayHexColor : 'Navy') - .setAuthor({ name: `${user.tag} (${user.id})`, iconURL: user.displayAvatarURL() }) + .setAuthor({ name: `${user.username} (${user.id})`, iconURL: user.displayAvatarURL() }) .addFields( { name: 'Current rank hex color', value: member ? member.displayHexColor : 'No rank color', inline: true }, { name: 'Joined guild at', value: member ? member.joinedAt.toString() : 'Not in this guild', inline: true }, diff --git a/events/client/interactionCreate.js b/events/client/interactionCreate.js index f8eae21c..a0572122 100644 --- a/events/client/interactionCreate.js +++ b/events/client/interactionCreate.js @@ -19,7 +19,7 @@ export default { return interaction.reply({ content: `You are blacklisted for the following reason: \`${commandBlacklist.reason}\``, ephemeral: true }); } - const userTag = interaction.user.tag; + const userTag = interaction.user.username; const userID = interaction.user.id; const commandName = interaction.commandName; diff --git a/events/client/messageCreate.js b/events/client/messageCreate.js index bd8cd228..3d048899 100644 --- a/events/client/messageCreate.js +++ b/events/client/messageCreate.js @@ -290,7 +290,7 @@ export default { return message.reply({ content: `You are blacklisted for the following reason: \`${commandBlacklist.reason}\``, ephemeral: true }); } - const userTag = message.author.tag; + const userTag = message.author.username; const userID = message.author.id; const isOptOut = await db.optout.findOne({ where: { userID: message.author.id } }); diff --git a/events/client/ready.js b/events/client/ready.js index 373db5b0..59376168 100644 --- a/events/client/ready.js +++ b/events/client/ready.js @@ -21,7 +21,7 @@ export default { }); const commandSize = client.commands.size; - const clientTag = client.user.tag; + const clientTag = client.user.username; const guildSize = client.guilds.cache.size; const channelSize = client.channels.cache.size; const clientID = client.user.id; diff --git a/utils/ratelimiter.js b/utils/ratelimiter.js index 242df4d6..9ae6b8b8 100644 --- a/utils/ratelimiter.js +++ b/utils/ratelimiter.js @@ -8,7 +8,7 @@ export default { }; function check(user, commandName, commands) { const userID = user.id; - const userTag = user.tag; + const userTag = user.username; // Don't apply the rate limit to bot owner if (userID === ownerId) {