friendlier error messages

This commit is contained in:
Emily 2020-11-04 17:26:05 +11:00
parent cd71b0ae76
commit ce709f0576
2 changed files with 2 additions and 2 deletions

View file

@ -51,7 +51,7 @@ module.exports = class {
json.errors.forEach(error => {
if (error.message.startsWith('Failed to get data for ability')) {
message.channel.createMessage(
`${client.constants.emojis.userError} I couldn't find any ability called ${query}`
`${client.constants.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);

View file

@ -69,7 +69,7 @@ module.exports = class {
json.errors.forEach(error => {
if (error.message.startsWith('No Pokémon found')) {
message.channel.createMessage(
`${client.constants.emojis.userError} I couldn't find any Pokemon called ${query}`
`${client.constants.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);