From c7ad9579b391cbf0d1a89b6cfc244e1b24086ced Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sun, 8 Oct 2017 19:03:42 +0000 Subject: [PATCH] Bugs --- commands/games/akinator.js | 2 +- commands/games/battle.js | 1 + commands/games/tic-tac-toe.js | 1 + commands/games/whos-that-pokemon.js | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/commands/games/akinator.js b/commands/games/akinator.js index 5ba13810..d723190b 100644 --- a/commands/games/akinator.js +++ b/commands/games/akinator.js @@ -63,7 +63,7 @@ module.exports = class AkinatorCommand extends Command { return msg.say(response === 'yes' ? 'Another win for me!' : 'Bravo, you have defeated me.'); } catch (err) { this.sessions.delete(msg.channel.id); - throw err; + return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } } diff --git a/commands/games/battle.js b/commands/games/battle.js index 6b0c0096..cbc4325b 100644 --- a/commands/games/battle.js +++ b/commands/games/battle.js @@ -70,6 +70,7 @@ module.exports = class BattleCommand extends Command { }); if (!turn.size) { await msg.say('Time!'); + reset(); continue; } choice = turn.first().content.toLowerCase(); diff --git a/commands/games/tic-tac-toe.js b/commands/games/tic-tac-toe.js index f2b91c30..b6125be2 100644 --- a/commands/games/tic-tac-toe.js +++ b/commands/games/tic-tac-toe.js @@ -56,6 +56,7 @@ module.exports = class TicTacToeCommand extends Command { }); if (!turn.size) { await msg.say('Time!'); + userTurn = !userTurn; continue; } const choice = turn.first().content.toLowerCase(); diff --git a/commands/games/whos-that-pokemon.js b/commands/games/whos-that-pokemon.js index 4d199454..50ad9b83 100644 --- a/commands/games/whos-that-pokemon.js +++ b/commands/games/whos-that-pokemon.js @@ -10,7 +10,8 @@ module.exports = class WhosThatPokemonCommand extends Command { aliases: ['who-pokemon', 'whos-that-pokémon', 'who-pokémon'], group: 'games', memberName: 'whos-that-pokemon', - description: 'Guess who that Pokémon is.' + description: 'Guess who that Pokémon is.', + clientPermissions: ['EMBED_LINKS'] }); }