Skip to content

Commit c691cc4

Browse files
committed
trivia
1 parent 892e547 commit c691cc4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

commands/trivia.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,25 +93,25 @@ async function play(message, bot, send, trivia) {
9393
.addField("Difficulty", difficulty)
9494
.addField("Reward", worth + ":dollar:")
9595
.addField("Choices", "**" + incorrect_answers.join(", ") + "**")
96-
.setFooter("You have 10 seconds to answer.")
96+
.setFooter("You have 20 seconds to answer.")
9797
.setColor("#4DD0D9")
9898
.setAuthor(message.guild.name, message.guild.iconURL)
9999

100100
send({
101101
embed
102102
})
103-
103+
let guessed = {};
104104
let collector = message.channel.createMessageCollector(m => {
105105
if (m.author.bot) return false
106+
if (guessed[m.author.id]) return false;
107+
guessed[m.author.id] = true;
106108
if (checkAnswer(correct_answer, m.content)) {
107109
collector.stop("WINNED")
108110
win(bot, message, m.author, worth)
109-
} else {
110-
collector.stop("wrong");
111111
}
112112
return false
113113
}, {
114-
time: 10000
114+
time: 20000
115115
})
116116

117117
collector.on("end", (c, reason) => {

0 commit comments

Comments
 (0)