Another fix for missing definition breaking mash.
This commit is contained in:
parent
5dcb928c35
commit
e4055ad99c
|
@ -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)}.`
|
||||
|
|
Loading…
Reference in New Issue