From aec13c1cee8deadf381910e9e9cba4c51d1f4897 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Fri, 3 Mar 2023 17:07:28 -0600 Subject: [PATCH] Improve response when the solution is correct --- src/endpoints/guess.ts | 1 + src/endpoints/nightbot.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/endpoints/guess.ts b/src/endpoints/guess.ts index 151698d..3c33f06 100644 --- a/src/endpoints/guess.ts +++ b/src/endpoints/guess.ts @@ -82,6 +82,7 @@ const route: ServerRoute = { status: 2, current: data.current, incorrect: data.incorrect, + solution: data.solution, }; }; diff --git a/src/endpoints/nightbot.ts b/src/endpoints/nightbot.ts index 0264b26..80c49c6 100644 --- a/src/endpoints/nightbot.ts +++ b/src/endpoints/nightbot.ts @@ -73,7 +73,7 @@ const subcommands: {[index: string]: subcommand} = { m = `"${meta.args[1].toUpperCase()}" has been guessed already. \n(incorrect: ${d.incorrect}/${config.game.max_incorrect})`; break; case 2: - m = `Merry chatmanmas! You won! Answer: ${d.current}`; + m = `Merry chatmanmas! You won! Answer: ${d.solution}`; break; case 3: m = `Booooo, you lost! Answer: ${d.solution}`; @@ -113,7 +113,7 @@ const subcommands: {[index: string]: subcommand} = { m = `"${meta.args[1].toUpperCase()}" has been guessed already. \n(incorrect: ${d.incorrect}/${config.game.max_incorrect})`; break; case 2: - m = `Merry chatmanmas! You won! Answer: ${d.current}`; + m = `Merry chatmanmas! You won! Answer: ${d.solution}`; break; case 3: m = `Booooo, you lost! Answer: ${d.solution}`;