diff --git a/commands/utility/about.js b/commands/utility/about.js index e553c44..ed9d6a8 100644 --- a/commands/utility/about.js +++ b/commands/utility/about.js @@ -17,6 +17,8 @@ class aboutCommand extends Command { }); } + + async exec(message) { const Donator = await donator.findAll({order: ['id']}); @@ -24,7 +26,10 @@ class aboutCommand extends Command { if (Donator[0]) { for (let i = 0; i < Donator.length; i++) { - description += `**${this.client.users.resolve(Donator[i].get('userID')).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`; + if (this.client.users.resolve(Donator[i].get('userID')) !== null) + description += `**${this.client.users.resolve(Donator[i].get('userID')).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`; + else + description += `**A user of discord (${Donator[i].get('userID')}) | ${Donator[i].get('comment')} (This user no longer share a server with the bot)**\n`; } } else { description += 'No one :(\n'; @@ -44,7 +49,7 @@ class aboutCommand extends Command { .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').tag} (267065637183029248)`); // Please don't change the "original bot made by" + .setFooter(`Original bot made by ${this.client.users.resolve('267065637183029248').tag} (267065637183029248)`); // Please this line message.channel.send(aboutEmbed); }); diff --git a/commands/utility/donator.js b/commands/utility/donator.js index cd7416b..e691a2e 100644 --- a/commands/utility/donator.js +++ b/commands/utility/donator.js @@ -22,7 +22,11 @@ class donatorCommand extends Command { if (Donator[0]) { for (let i = 0; i < Donator.length; i++) { - donatorMessage += `**${this.client.users.resolve(Donator[i].get('userID')).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`; + if (this.client.users.resolve(Donator[i].get('userID')) !== null) + donatorMessage += `**${this.client.users.resolve(Donator[i].get('userID')).tag} (${Donator[i].get('userID')}) | ${Donator[i].get('comment')}**\n`; + else + donatorMessage += `**A user of discord (${Donator[i].get('userID')}) | ${Donator[i].get('comment')} (This user no longer share a server with the bot)**\n`; + } } else { donatorMessage += 'No one :(';