From 505b2449bab89ffb686ccbe5b26cfb18ca7f44c5 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Tue, 1 Nov 2022 05:31:05 +0100 Subject: [PATCH] Added ~letsgo shortcut to the letters. --- src/games/letters.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/games/letters.js b/src/games/letters.js index 4b515ef..c872691 100755 --- a/src/games/letters.js +++ b/src/games/letters.js @@ -150,7 +150,7 @@ function onCommand(args, context) { return; } - if (['start', 'go', 'auto', 'random'].includes(context.subcommand)) { + if (context.command === 'letsgo' || ['start', 'go', 'auto', 'random'].includes(context.subcommand)) { start(context, Array.from({ length: config.letters.length }, () => (Math.random() < 0.55 ? 'c' : 'v')).join('')); // a slight bias towards consonants seems to give better boards return; } @@ -194,6 +194,7 @@ function onMessage(message, context) { module.exports = { name: 'Letters', help: `Make the longest word from the ${config.letters.length} letters on the board. Start with ${config.prefix}letters, and fill the board by selecting a vow(el), a con(sonant), or multiple at once like CCVVCCVVC.`, + commands: ['letsgo'], onCommand, onMessage, };