From a0261c1f03a70b26907089b07a88348562996f03 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 11 Oct 2017 17:41:14 +0000 Subject: [PATCH] Embedless Who's that Pokemon --- commands/games/whos-that-pokemon.js | 12 +++--------- commands/util/help.js | 3 +-- package.json | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/commands/games/whos-that-pokemon.js b/commands/games/whos-that-pokemon.js index 74ef93b2..0bf89586 100644 --- a/commands/games/whos-that-pokemon.js +++ b/commands/games/whos-that-pokemon.js @@ -1,5 +1,4 @@ const { Command } = require('discord.js-commando'); -const { MessageEmbed } = require('discord.js'); const snekfetch = require('snekfetch'); const { filterPkmn } = require('../../structures/Util'); @@ -10,8 +9,7 @@ module.exports = class WhosThatPokemonCommand extends Command { aliases: ['who-pokemon', 'whos-that-pokémon', 'who-pokémon'], group: 'games', memberName: 'whos-that-pokemon', - description: 'Guess who that Pokémon is.', - clientPermissions: ['EMBED_LINKS'] + description: 'Guess who that Pokémon is.' }); } @@ -21,12 +19,8 @@ module.exports = class WhosThatPokemonCommand extends Command { const { body } = await snekfetch.get(`https://pokeapi.co/api/v2/pokemon-species/${pokemon}/`); const names = body.names.map(name => name.name.toLowerCase()); const displayName = filterPkmn(body.names).name; - const id = `${'000'.slice(body.id.toString().length)}${body.id}`; - const embed = new MessageEmbed() - .setTitle('You have 15 seconds, who\'s that Pokémon?') - .setColor(0xED1C24) - .setImage(`https://www.serebii.net/sunmoon/pokemon/${id}.png`); - await msg.embed(embed); + const image = `https://www.serebii.net/sunmoon/pokemon/${'000'.slice(body.id.toString().length)}${body.id}.png`; + await msg.say('**You have 15 seconds, who\'s that Pokémon?**', { files: [image] }); const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, { max: 1, time: 15000 diff --git a/commands/util/help.js b/commands/util/help.js index 2e7d82c5..2dad8056 100644 --- a/commands/util/help.js +++ b/commands/util/help.js @@ -45,8 +45,7 @@ module.exports = class HelpCommand extends Command { .setDescription(`Use ${msg.usage('')} to view detailed information about a command.`) .setColor(0x00AE86); for (const group of this.client.registry.groups.values()) { - embed.addField(`❯ ${group.name}`, - group.commands.map(c => c.name).join(', ') || 'None'); + embed.addField(`❯ ${group.name}`, group.commands.map(c => c.name).join(', ') || 'None'); } try { await msg.direct({ embed }); diff --git a/package.json b/package.json index 3af66c78..fdcd0dea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "47.0.0", + "version": "47.0.1", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {