From 6bca81b7a98d03b981e24d9589e03566d25d9275 Mon Sep 17 00:00:00 2001 From: Emily J Date: Wed, 4 Nov 2020 17:21:34 +1100 Subject: [PATCH] type while waiting for API --- bot/commands/Fun/pokemon.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bot/commands/Fun/pokemon.js b/bot/commands/Fun/pokemon.js index 6642ef5..60512a5 100644 --- a/bot/commands/Fun/pokemon.js +++ b/bot/commands/Fun/pokemon.js @@ -11,12 +11,12 @@ module.exports = class { this.aliases = ['pokedex', 'dex'], this.userPerms = [], this.botPerms = [], - this.cooldown = 2000, + this.cooldown = 5000, this.help = { - description: '', - arguments: '', + description: 'Get useful data on any pokemon you ask me to!', + arguments: '', details: '', - examples: '' + examples: '`pokemon mudkip`\n`pokemon giratina-origin`' }; } @@ -25,6 +25,8 @@ module.exports = class { `${client.constants.emojis.userError} You didn't give me a pokemon to look up!` ); + message.channel.sendTyping(); + const query = args.join(' ').toLowerCase(); fetch('https://graphqlpokemon.favware.tech/', { @@ -67,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}c` + `${client.constants.emojis.userError} I couldn't find any Pokemon called ${query}` ); } else { client.logger.error('POKEMON_FETCH_ERROR', error.message);