From 223ea48ec253f8719cebafa46f2a31c561c08a72 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Fri, 23 Apr 2021 11:52:51 -0400 Subject: [PATCH] Fix --- commands/info/bot.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/info/bot.js b/commands/info/bot.js index 121b1e0c..5ceff07d 100644 --- a/commands/info/bot.js +++ b/commands/info/bot.js @@ -34,18 +34,21 @@ module.exports = class BotCommand extends Command { if (!user.bot) return msg.say('This user is not a bot.'); try { const { body } = await request.get(`https://discord.bots.gg/api/v1/bots/${user.id}`); + const avatar = body.avatarURL === '/img/bot_icon_placeholder.png' + ? 'https://discord.bots.gg/img/bot_icon_placeholder.png' + : body.avatarURL; const embed = new MessageEmbed() .setColor(0x000001) .setTitle(`${body.username} by ${body.owner.username}#${body.owner.discriminator}`) .setDescription(body.shortDescription) .setAuthor('Discord Bots', 'https://i.imgur.com/OhZCqVd.jpg', 'https://discord.bots.gg/') - .setThumbnail(body.avatarURL) + .setThumbnail(avatar) .setURL(`https://discord.bots.gg/bots/${user.id}`) .setFooter(user.id) .addField('❯ Prefix', body.prefix || '???', true) .addField('❯ Library', body.libraryName || '???', true) .addField('❯ Servers', body.guildCount ? formatNumber(body.guildCount) : '???', true) - .addField('❯ Invite', embedURL('Here', body.botInvite), true) + .addField('❯ Invite', body.botInvite ? embedURL('Here', body.botInvite) : '???', true) .addField('❯ Server', body.supportInvite ? embedURL('Here', body.supportInvite) : '???', true) .addField('❯ Public List Date', moment.utc(body.addedDate).format('MM/DD/YYYY h:mm A'), true); return msg.embed(embed);