add way to stop
This commit is contained in:
parent
84df353d51
commit
50575fd3b9
1 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,7 @@ class guessCommand extends Command {
|
||||||
aliases: ['guess'],
|
aliases: ['guess'],
|
||||||
category: 'minigame',
|
category: 'minigame',
|
||||||
description: {
|
description: {
|
||||||
content: 'Guess the number',
|
content: 'Guess the number ( Say "stop" to stop playing )',
|
||||||
usage: '',
|
usage: '',
|
||||||
examples: ['']
|
examples: ['']
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,8 @@ class guessCommand extends Command {
|
||||||
numberTry++;
|
numberTry++;
|
||||||
if (input != secretnumber) {
|
if (input != secretnumber) {
|
||||||
tryAgain(input);
|
tryAgain(input);
|
||||||
|
} else if (input == 'stop') {
|
||||||
|
return message.channel.send('Ok, let\'s stop playing :(');
|
||||||
} else {
|
} else {
|
||||||
if (numberTry > 1) {
|
if (numberTry > 1) {
|
||||||
return message.channel.send(`Congratulations! You won! It took you ${numberTry} turns!`);
|
return message.channel.send(`Congratulations! You won! It took you ${numberTry} turns!`);
|
||||||
|
|
Loading…
Reference in a new issue