Fixed missing user breaking Trivia.
This commit is contained in:
parent
0983d7e920
commit
fa54000f1c
|
@ -29,11 +29,15 @@ function scoreRound(context, round) {
|
|||
}
|
||||
|
||||
return game.answers.map(({ user }) => {
|
||||
if (user) {
|
||||
context.setPoints(user, 1);
|
||||
game.points[user.username] = (game.points[user.username] || 0) + 1;
|
||||
|
||||
return `**@${user.username}** gets a point`;
|
||||
}).join(', ');
|
||||
}
|
||||
|
||||
return null;
|
||||
}).filter(Boolean).join(', ');
|
||||
}
|
||||
|
||||
async function playRound(context, round = 0) {
|
||||
|
|
Loading…
Reference in New Issue