More fixes

This commit is contained in:
Daniel Odendahl Jr
2018-08-27 17:44:01 +00:00
parent 38ea1920a9
commit 1690460518
+2 -2
View File
@@ -73,11 +73,11 @@ module.exports = class QuizDuelCommand extends Command {
continue;
}
const result = msgs.first();
if (userPoints >= maxPts) winner = msg.author;
else if (oppoPoints >= maxPts) winner = opponent;
const userWin = result.author.id === msg.author.id;
if (userWin) ++userPoints;
else ++oppoPoints;
if (userPoints >= maxPts) winner = msg.author;
else if (oppoPoints >= maxPts) winner = opponent;
const score = oneLine`
${userWin ? '**' : ''}${userPoints}${userWin ? '**' : ''}-
${userWin ? '' : '**'}${oppoPoints}${userWin ? '' : '**'}