This commit is contained in:
Daniel Odendahl Jr
2017-09-27 16:49:37 +00:00
parent 9f1b9688ae
commit 8a70e44902
16 changed files with 88 additions and 18 deletions
+8 -1
View File
@@ -27,6 +27,11 @@ module.exports = class BotInfoCommand extends Command {
const { body } = await snekfetch
.get(`https://bots.discord.pw/api/bots/${bot.id}`)
.set({ Authorization: DBOTS_KEY });
const owners = [];
for (const owner of body.owner_ids) {
const user = await this.client.users.fetch(owner);
owners.push(user.tag);
}
const embed = new MessageEmbed()
.setColor(0x9797FF)
.setAuthor('Discord Bots', 'https://i.imgur.com/tHTKaks.jpg')
@@ -38,7 +43,9 @@ module.exports = class BotInfoCommand extends Command {
.addField(' Invite',
`[Here](${body.invite_url})`, true)
.addField(' Prefix',
body.prefix, true);
body.prefix, true)
.addField(' Owner(s)',
owners.join(', '), true);
return msg.embed(embed);
} catch (err) {
if (err.status === 404) return msg.say('Could not find any results.');