Replace tag with username
This commit is contained in:
parent
16842d7127
commit
5d6746a233
10 changed files with 12 additions and 12 deletions
|
@ -58,10 +58,10 @@ export default {
|
||||||
else {
|
else {
|
||||||
client.users.resolve(user).send(Embed)
|
client.users.resolve(user).send(Embed)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return interaction.reply(`DM sent to ${user.tag}`);
|
return interaction.reply(`DM sent to ${user.username}`);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
return interaction.reply(`Could not send a DM to ${user.tag}`);
|
return interaction.reply(`Could not send a DM to ${user.username}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default {
|
||||||
if (Donator[0]) {
|
if (Donator[0]) {
|
||||||
for (let i = 0; i < Donator.length; i++) {
|
for (let i = 0; i < Donator.length; i++) {
|
||||||
const user = await client.users.fetch(Donator[i].get('userID').toString());
|
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`;}
|
else {donatorMessage += `**A user of discord (${user.id}) | ${Donator[i].get('comment')} (This user no longer share a server with the bot)**\n`;}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,8 +141,8 @@ async function download(url, interaction, originalInteraction) {
|
||||||
|
|
||||||
const Embed = new EmbedBuilder()
|
const Embed = new EmbedBuilder()
|
||||||
.setColor(interaction.member ? interaction.member.displayHexColor : 'Navy')
|
.setColor(interaction.member ? interaction.member.displayHexColor : 'Navy')
|
||||||
.setAuthor({ name: `Downloaded by ${interaction.user.tag}`, iconURL: interaction.user.displayAvatarURL(), url: url })
|
.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.tag}" message!` });
|
.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}`) {
|
if (interaction.customId === `downloadQuality${interaction.user.id}`) {
|
||||||
|
|
|
@ -18,7 +18,7 @@ export default {
|
||||||
category: 'utility',
|
category: 'utility',
|
||||||
async execute(interaction, args) {
|
async execute(interaction, args) {
|
||||||
const Embed = new EmbedBuilder()
|
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();
|
.setTimestamp();
|
||||||
|
|
||||||
if (interaction.guild) Embed.addFields({ name: 'Guild', value: `${interaction.guild.name} (${interaction.guild.id})`, inline: true });
|
if (interaction.guild) Embed.addFields({ name: 'Guild', value: `${interaction.guild.name} (${interaction.guild.id})`, inline: true });
|
||||||
|
|
|
@ -36,7 +36,7 @@ export default {
|
||||||
const statsEmbed = new EmbedBuilder()
|
const statsEmbed = new EmbedBuilder()
|
||||||
.setColor(interaction.member ? interaction.member.displayHexColor : 'Navy')
|
.setColor(interaction.member ? interaction.member.displayHexColor : 'Navy')
|
||||||
.setTitle('Bot stats')
|
.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(
|
.addFields(
|
||||||
{ name: 'Servers', value: client.guilds.cache.size.toString(), inline: true },
|
{ name: 'Servers', value: client.guilds.cache.size.toString(), inline: true },
|
||||||
{ name: 'Channels', value: client.channels.cache.size.toString(), inline: true },
|
{ name: 'Channels', value: client.channels.cache.size.toString(), inline: true },
|
||||||
|
|
|
@ -20,7 +20,7 @@ export default {
|
||||||
}
|
}
|
||||||
const Embed = new EmbedBuilder()
|
const Embed = new EmbedBuilder()
|
||||||
.setColor(member ? member.displayHexColor : 'Navy')
|
.setColor(member ? member.displayHexColor : 'Navy')
|
||||||
.setAuthor({ name: `${user.tag} (${user.id})`, iconURL: user.displayAvatarURL() })
|
.setAuthor({ name: `${user.username} (${user.id})`, iconURL: user.displayAvatarURL() })
|
||||||
.addFields(
|
.addFields(
|
||||||
{ name: 'Current rank hex color', value: member ? member.displayHexColor : 'No rank color', inline: true },
|
{ 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 },
|
{ name: 'Joined guild at', value: member ? member.joinedAt.toString() : 'Not in this guild', inline: true },
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default {
|
||||||
return interaction.reply({ content: `You are blacklisted for the following reason: \`${commandBlacklist.reason}\``, ephemeral: true });
|
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 userID = interaction.user.id;
|
||||||
const commandName = interaction.commandName;
|
const commandName = interaction.commandName;
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,7 @@ export default {
|
||||||
return message.reply({ content: `You are blacklisted for the following reason: \`${commandBlacklist.reason}\``, ephemeral: true });
|
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 userID = message.author.id;
|
||||||
|
|
||||||
const isOptOut = await db.optout.findOne({ where: { userID: message.author.id } });
|
const isOptOut = await db.optout.findOne({ where: { userID: message.author.id } });
|
||||||
|
|
|
@ -21,7 +21,7 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
const commandSize = client.commands.size;
|
const commandSize = client.commands.size;
|
||||||
const clientTag = client.user.tag;
|
const clientTag = client.user.username;
|
||||||
const guildSize = client.guilds.cache.size;
|
const guildSize = client.guilds.cache.size;
|
||||||
const channelSize = client.channels.cache.size;
|
const channelSize = client.channels.cache.size;
|
||||||
const clientID = client.user.id;
|
const clientID = client.user.id;
|
||||||
|
|
|
@ -8,7 +8,7 @@ export default {
|
||||||
};
|
};
|
||||||
function check(user, commandName, commands) {
|
function check(user, commandName, commands) {
|
||||||
const userID = user.id;
|
const userID = user.id;
|
||||||
const userTag = user.tag;
|
const userTag = user.username;
|
||||||
|
|
||||||
// Don't apply the rate limit to bot owner
|
// Don't apply the rate limit to bot owner
|
||||||
if (userID === ownerId) {
|
if (userID === ownerId) {
|
||||||
|
|
Loading…
Reference in a new issue