diff --git a/commands/owner/addDonator.js b/commands/owner/addDonator.js index 4dc36785..35fc8c2f 100644 --- a/commands/owner/addDonator.js +++ b/commands/owner/addDonator.js @@ -43,21 +43,21 @@ class addDonatorCommand extends Command { if (!Donator) { const body = {userID: args.id, comment: userComment}; donator.create(body); - return message.channel.send(`A new donator have been added! ${this.client.users.resolve(args.id).username}#${this.client.users.resolve(args.id).discriminator} (${args.id}) ${userComment}`); + return message.channel.send(`A new donator have been added! ${this.client.users.resolve(args.id).tag} (${args.id}) ${userComment}`); } else { message.channel.send('This donator already exist, do you want to update it? y/n'); - const filter = m => m.content && m.author.id == message.author.id; + const filter = m => m.content && m.author.id === message.author.id; message.channel.awaitMessages(filter, {time: 5000 * 1000, max: 1, errors: ['time'] }) .then(messages => { let messageContent = messages.map(messages => messages.content); - if (messageContent == 'y' || messageContent == 'yes') { + if (messageContent === 'y' || messageContent === 'yes') { const body = {comment: userComment}; donator.update(body, {where: {userID: args.id}}); console.log(userComment); - if (userComment == '') { - return message.channel.send(`Removed the comment from ${this.client.users.resolve(args.id).username}#${this.client.users.resolve(args.id).discriminator} (${args.id})`); + if (userComment === '') { + return message.channel.send(`Removed the comment from ${this.client.users.resolve(args.id).tag} (${args.id})`); } else { - return message.channel.send(`You edited the comment for ${this.client.users.resolve(args.id).username}#${this.client.users.resolve(args.id).discriminator} (${args.id}) with ${args.userComment}`); + return message.channel.send(`You edited the comment for ${this.client.users.resolve(args.id).tag} (${args.id}) with ${args.userComment}`); } } }) diff --git a/commands/owner/blacklist.js b/commands/owner/blacklist.js index 83713c09..0d55ff64 100644 --- a/commands/owner/blacklist.js +++ b/commands/owner/blacklist.js @@ -32,16 +32,16 @@ class blacklistCommand extends Command { if (!blacklist) { const body = {userID: args.userID}; userBlacklist.create(body); - return message.channel.send(`The following user have been blacklisted: ${this.client.users.resolve(args.userID).username}#${this.client.users.resolve(args.userID).discriminator} (${args.userID})`); + return message.channel.send(`The following user have been blacklisted: ${this.client.users.resolve(args.userID).tag} (${args.userID})`); } else { message.channel.send('This user is already blacklisted, do you want to unblacklist him? y/n'); - const filter = m => m.content && m.author.id == message.author.id; + const filter = m => m.content && m.author.id === message.author.id; message.channel.awaitMessages(filter, {time: 5000 * 1000, max: 1, errors: ['time'] }) .then(messages => { let messageContent = messages.map(messages => messages.content); - if (messageContent == 'y' || messageContent == 'yes') { + if (messageContent === 'y' || messageContent === 'yes') { userBlacklist.destroy({where: {userID:args.userID}}); - return message.channel.send(`The following user have been unblacklisted: ${this.client.users.resolve(args.userID).username}#${this.client.users.resolve(args.userID).discriminator} (${args.userID})`); + return message.channel.send(`The following user have been unblacklisted: ${this.client.users.resolve(args.userID).tag} (${args.userID})`); } }) .catch(err => { diff --git a/commands/utility/about.js b/commands/utility/about.js index 52e42c8c..e553c445 100644 --- a/commands/utility/about.js +++ b/commands/utility/about.js @@ -20,11 +20,11 @@ class aboutCommand extends Command { async exec(message) { const Donator = await donator.findAll({order: ['id']}); - let description = `This bot is made using [discord.js](https://github.com/discordjs/discord.js) & [Discord-Akairo](https://github.com/discord-akairo/discord-akairo)\nHelp command from [hoshi](https://github.com/1Computer1/hoshi)\n[Rantionary](https://github.com/RantLang/Rantionary) for their dictionnary.\nThanks to ${this.client.users.resolve('336492042299637771').username}#${this.client.users.resolve('336492042299637771').discriminator} (336492042299637771) for inspiring me for making this bot!\n\nThe people who donated for the bot <3\n`; + let description = `This bot is made using [discord.js](https://github.com/discordjs/discord.js) & [Discord-Akairo](https://github.com/discord-akairo/discord-akairo)\nHelp command from [hoshi](https://github.com/1Computer1/hoshi)\n[Rantionary](https://github.com/RantLang/Rantionary) for their dictionnary.\nThanks to ${this.client.users.resolve('336492042299637771').tag} (336492042299637771) for inspiring me for making this bot!\n\nThe people who donated for the bot <3\n`; if (Donator[0]) { for (let i = 0; i < Donator.length; i++) { - description += `**${this.client.users.resolve(Donator[i].get('userID')).username}#${this.client.users.resolve(Donator[i].get('userID')).discriminator} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`; + description += `**${this.client.users.resolve(Donator[i].get('userID')).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`; } } else { description += 'No one :(\n'; @@ -40,11 +40,11 @@ class aboutCommand extends Command { .setTitle('About me') .setDescription(description) .addField('Current commit', out.stdout) - .addField('Current owner: ', `${this.client.users.resolve(this.client.ownerID).username}#${this.client.users.resolve(this.client.ownerID).discriminator} (${this.client.ownerID})`) + .addField('Current owner: ', `${this.client.users.resolve(this.client.ownerID).tag} (${this.client.ownerID})`) .addField('Gitlab', 'https://gitlab.com/LoicBersier/DiscordBot', true) .addField('Github', 'https://github.com/loicbersier/Haha-yes', true) .setThumbnail('https://its.gamingti.me/ZiRe.png') - .setFooter(`Original bot made by ${this.client.users.resolve('267065637183029248').username}#${this.client.users.resolve('267065637183029248').discriminator} (267065637183029248)`); // Please don't change the "original bot made by" + .setFooter(`Original bot made by ${this.client.users.resolve('267065637183029248').tag} (267065637183029248)`); // Please don't change the "original bot made by" message.channel.send(aboutEmbed); }); diff --git a/commands/utility/donator.js b/commands/utility/donator.js index 66a0d5e8..cc285297 100644 --- a/commands/utility/donator.js +++ b/commands/utility/donator.js @@ -22,7 +22,7 @@ class donatorCommand extends Command { if (Donator[0]) { for (let i = 0; i < Donator.length; i++) { - donatorMessage += `**${this.client.users.resolve(Donator[i].get('userID')).username}#${this.client.users.resolve(Donator[i].get('userID')).discriminator} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`; + donatorMessage += `**${this.client.users.resolve(Donator[i].get('userID')).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`; } } else { donatorMessage += 'No one :('; diff --git a/event/listeners/commandblocked.js b/event/listeners/commandblocked.js index 1118063e..4153039d 100644 --- a/event/listeners/commandblocked.js +++ b/event/listeners/commandblocked.js @@ -38,7 +38,7 @@ class CommandBlockedListener extends Listener { break; case 'serverblacklist': Embed.setTitle('Server blacklisted.'); - Embed.setDescription(`This server have been blacklisted... to appeal contact ${this.client.users.resolve(this.client.ownerID).username}#${this.client.users.resolve(this.client.ownerID).discriminator}, and now i will yeet out of here`); + Embed.setDescription(`This server have been blacklisted... to appeal contact ${this.client.users.resolve(this.client.ownerID).tag}, and now i will yeet out of here`); message.channel.send(Embed); message.guild.leave(); break;