From e4055ad99cfd9d3202a54aefaebc516bf9406cdb Mon Sep 17 00:00:00 2001 From: ThePendulum Date: Wed, 4 Sep 2024 22:26:14 +0200 Subject: [PATCH] Another fix for missing definition breaking mash. --- src/games/mash.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/games/mash.js b/src/games/mash.js index 32332b9..1cb3f1a 100755 --- a/src/games/mash.js +++ b/src/games/mash.js @@ -81,7 +81,9 @@ function play(rawWord, context, shouted) { } if (answer) { - const definition = answer.definitions[0] ? `: ${style.italic(`${answer.definitions[0].slice(0, 100)}${mash.answers[0].definitions[0].length > 100 ? '...' : ''}`)}` : ''; + const definition = answer.definitions[0] + ? `: ${style.italic(`${answer.definitions[0].slice(0, 100)}${answer.definitions[0].length > 100 ? '...' : ''}`)}` + : ''; context.sendMessage(mash.answers.length === 1 ? `${style.bold(style.yellow(word))} is the right answer${definition}, ${style.bold(style.cyan(`${config.usernamePrefix}${context.user.username}`))} now has ${style.bold(`${context.user.points + 1} ${context.user.points === 0 ? 'point' : 'points'}`)}! There were no other options for ${style.bold(mash.anagram)}.`