Changed riddle timeout to seconds.

This commit is contained in:
Niels Simenon 2022-10-28 05:12:33 +02:00
parent 273013e390
commit 02da8f7705
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ module.exports = {
timeout: 60,
},
riddle: {
timeout: 10000,
timeout: 20,
score: false,
},
dice: {

View File

@ -26,7 +26,7 @@ async function onCommand(args, context) {
context.logger.info(`Riddle asked "${riddle.riddle}" with answer: ${riddle.answers[0]}`);
try {
await timers.setTimeout(config.riddle.timeout, null, { signal: ac.signal });
await timers.setTimeout(config.riddle.timeout * 1000, null, { signal: ac.signal });
open.delete(context.room.id);
context.sendMessage(`No one guessed the riddle: ${style.bold(riddle.fullAnswer)}! ${emojis[crypto.randomInt(0, emojis.length)]}`, context.room.id);