Added numbers game.
This commit is contained in:
@@ -66,6 +66,11 @@ function playWord(rawWord, context) {
|
||||
function stop(context, aborted) {
|
||||
const game = games.get(context.room.id);
|
||||
|
||||
if (!game) {
|
||||
context.sendMessage(`There is no letters game going on, ${context.user.prefixedUsername}. You can start one with ${config.prefix}letters!`, context.room.id);
|
||||
return;
|
||||
}
|
||||
|
||||
game.ac.abort();
|
||||
games.delete(context.room.id);
|
||||
|
||||
@@ -124,7 +129,7 @@ function pickLetters(type, context) {
|
||||
|
||||
function start(context, letters) {
|
||||
if (games.has(context.room.id)) {
|
||||
context.sendMessage(`${getBoard(context)} This is the current board. Use ${config.prefix}letters:stop to reset.`, context.room.id);
|
||||
context.sendMessage(`${getBoard(context)} is the current board. Use ${config.prefix}letters:stop to reset.`, context.room.id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user