From a2377e1a5a4c93368bb0041fcf7e9b2aed2f952f Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Fri, 30 Oct 2020 12:40:39 -0400 Subject: [PATCH] Fix --- README.md | 3 +++ commands/games-sp/jeopardy.js | 2 +- commands/games-sp/whos-that-pokemon.js | 7 ++++++- commands/search/pokedex.js | 8 +++++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7bd20ce7..8ddc3347 100644 --- a/README.md +++ b/README.md @@ -1503,6 +1503,9 @@ here. * poem ([API](https://github.com/thundercomb/poetrydb/blob/master/README.md)) - [Pokemon Fusion](https://pokemon.alexonsager.net/) * pokemon-fusion (Images) +- [Pokemoncries.com](https://pokemoncries.com/) + * pokedex (Cry Sound Effects) + * whos-that-pokemon (Cry Sound Effects) - [PokéAPI](https://pokeapi.co/) * pokedex (API) * whos-that-pokemon (API) diff --git a/commands/games-sp/jeopardy.js b/commands/games-sp/jeopardy.js index cf021d3d..590d3377 100644 --- a/commands/games-sp/jeopardy.js +++ b/commands/games-sp/jeopardy.js @@ -57,7 +57,7 @@ module.exports = class JeopardyCommand extends Command { max: 1, time: 30000 }); - if (connection) connection.dispatcher.end(); + if (connection && connection.dispatcher) connection.dispatcher.end(); const answer = question.answer.replace(/<\/?i>/gi, '*'); this.client.games.delete(msg.channel.id); if (!msgs.size) return msg.reply(`Time's up, the answer was **${answer}**.`); diff --git a/commands/games-sp/whos-that-pokemon.js b/commands/games-sp/whos-that-pokemon.js index 95216c16..47e2cb28 100644 --- a/commands/games-sp/whos-that-pokemon.js +++ b/commands/games-sp/whos-that-pokemon.js @@ -49,6 +49,11 @@ module.exports = class WhosThatPokemonCommand extends Command { url: 'https://www.dafont.com/', reason: 'Pokemon Solid Font', reasonURL: 'https://www.dafont.com/pokemon.font' + }, + { + name: 'Pokemoncries.com', + url: 'https://pokemoncries.com/', + reason: 'Cry Sound Effects' } ], args: [ @@ -81,7 +86,7 @@ module.exports = class WhosThatPokemonCommand extends Command { time: 15000 }); if (connection) { - connection.dispatcher.end(); + if (connection.dispatcher) connection.dispatcher.end(); await data.fetchCry(); if (data.cry) { connection.play(Readable.from([data.cry])); diff --git a/commands/search/pokedex.js b/commands/search/pokedex.js index 24f75c02..ffd1d769 100644 --- a/commands/search/pokedex.js +++ b/commands/search/pokedex.js @@ -28,6 +28,11 @@ module.exports = class PokedexCommand extends Command { name: 'Serebii.net', url: 'https://www.serebii.net/index2.shtml', reason: 'Images' + }, + { + name: 'Pokemoncries.com', + url: 'https://pokemoncries.com/', + reason: 'Cry Sound Effects' } ], args: [ @@ -79,7 +84,8 @@ module.exports = class PokedexCommand extends Command { await reactIfAble(msg, this.client.user, '🔉'); } } else { - embed.setFooter('Join a voice channel to hear the Pokémon\'s cry.'); + const usage = this.client.registry.commands.get('join').usage(); + embed.setFooter(`Join a voice channel and use ${usage} to hear the Pokémon\'s cry.`); } return msg.embed(embed); } catch (err) {