message handler will handle cmd errs - not needed

This commit is contained in:
Emily 2020-11-12 10:55:35 +11:00
parent 830658e8c6
commit 0a31fc0f5f
5 changed files with 8 additions and 11 deletions

View file

@ -55,7 +55,7 @@ module.exports = class {
`${client.emojis.userError} I couldn't find any abilities with names similar to ${query}. Check your spelling, maybe?`
);
} else {
client.logger.error('POKEMON_FETCH_ERROR', error.message);
client.logger.error('POKEMON_API_ERROR', error.message);
}
});
@ -79,7 +79,6 @@ module.exports = class {
}
embed.addField('External Resources:', `[Bulbapedia](${ability.bulbapediaPage}) • [Serebii](${ability.serebiiPage}) • [Smogon](${ability.smogonPage})`);
message.channel.createMessage({ embed: embed });
})
.catch(err => console.log(err));
});
}
};

View file

@ -50,7 +50,7 @@ module.exports = class {
`${client.emojis.userError} I couldn't find any Pokemon with names similar to ${args.join(' ').toLowerCase()}. Check your spelling, maybe?`
);
} else {
client.logger.error('MATCHUP_FETCH_ERROR', error.message);
client.logger.error('MATCHUP_API_ERROR', error.message);
}
});

View file

@ -56,7 +56,7 @@ module.exports = class {
`${client.emojis.userError} I couldn't find any items with names similar to ${query}. Check your spelling, maybe?`
);
} else {
client.logger.error('POKEMON_FETCH_ERROR', error.message);
client.logger.error('POKEMON_API_ERROR', error.message);
}
});

View file

@ -68,7 +68,7 @@ module.exports = class {
`${client.emojis.userError} I couldn't find any moves with names similar to ${query}. Check your spelling, maybe?`
);
} else {
client.logger.error('POKEMON_FETCH_ERROR', error.message);
client.logger.error('POKEMON_API_ERROR', error.message);
}
});
@ -113,7 +113,6 @@ module.exports = class {
if (move.contestType !== null) embed.addField('Contest Type', move.contestType, true);
embed.addField('External Resources:', `[Bulbapedia](${move.bulbapediaPage}) • [Serebii](${move.serebiiPage}) • [Smogon](${move.smogonPage})`);
message.channel.createMessage({ embed: embed });
})
.catch(err => console.log(err));
});
}
};

View file

@ -71,7 +71,7 @@ module.exports = class {
`${client.emojis.userError} I couldn't find any Pokemon with names similar to ${query}. Check your spelling, maybe?`
);
} else {
client.logger.error('POKEMON_FETCH_ERROR', error.message);
client.logger.error('POKEMON_API_ERROR', error.message);
}
});
@ -108,8 +108,7 @@ module.exports = class {
embed.addField('Smogon Tier:', pokemon.smogonTier, true);
embed.addField('External Resources:', `[Bulbapedia](${pokemon.bulbapediaPage}) • [Serebii](${pokemon.serebiiPage}) • [Smogon](${pokemon.smogonPage})`);
message.channel.createMessage({ embed: embed });
})
.catch(err => console.log(err));
});
}
constructEvoLink (species, level, evoChain, isEvo = true) {