From 50575fd3b9399feb8f92751a16c7f07346b105ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Wed, 24 Jul 2019 02:15:05 +0200 Subject: [PATCH] add way to stop --- commands/minigame/guess.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/minigame/guess.js b/commands/minigame/guess.js index cb4fb9a..19c5fd5 100644 --- a/commands/minigame/guess.js +++ b/commands/minigame/guess.js @@ -6,7 +6,7 @@ class guessCommand extends Command { aliases: ['guess'], category: 'minigame', description: { - content: 'Guess the number', + content: 'Guess the number ( Say "stop" to stop playing )', usage: '', examples: [''] } @@ -59,6 +59,8 @@ class guessCommand extends Command { numberTry++; if (input != secretnumber) { tryAgain(input); + } else if (input == 'stop') { + return message.channel.send('Ok, let\'s stop playing :('); } else { if (numberTry > 1) { return message.channel.send(`Congratulations! You won! It took you ${numberTry} turns!`);