Preventing correct answer feedback in timeout-mode Trivia when game is already aborted.
This commit is contained in:
parent
d4d736bb56
commit
1dc0565586
|
@ -195,7 +195,7 @@ async function onMessage(message, context) {
|
||||||
game.ac.abort();
|
game.ac.abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.mode === 'timeout') {
|
if (settings.mode === 'timeout' && !game.ac.signal.aborted) {
|
||||||
if (message.type === 'message') {
|
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);
|
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 {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue