Fix strange error in pokedex fetch

This commit is contained in:
Dragon Fire
2020-03-23 14:38:38 -04:00
parent a2af169168
commit 045176f799
2 changed files with 10 additions and 4 deletions
+1
View File
@@ -41,6 +41,7 @@ module.exports = class PokedexCommand extends Command {
async run(msg, { pokemon }) {
try {
const data = await this.client.pokemon.fetch(pokemon);
if (!data) return msg.say('Could not find any results.');
const embed = new MessageEmbed()
.setColor(0xED1C24)
.setAuthor(`#${data.displayID} - ${data.name}`, data.boxImageURL, data.serebiiURL)