Preventing correct answer feedback in timeout-mode Trivia when game is already aborted.

This commit is contained in:
ThePendulum 2022-01-07 23:39:46 +01:00
parent d4d736bb56
commit 1dc0565586
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ async function onMessage(message, context) {
game.ac.abort();
}
if (settings.mode === 'timeout') {
if (settings.mode === 'timeout' && !game.ac.signal.aborted) {
if (message.type === 'message') {
context.sendMessage(`**${fullAnswer || answer}** is the correct answer! You might want to **/whisper** the answer to me instead, so others can't leech off your impeccable knowledge. You will receive a point at the end of the round.`, context.room.id, null, context.user.username);
} else {