Skip to content

Commit

Permalink
Fix use-fixed-round config comparison
Browse files Browse the repository at this point in the history
Fix the use-fixed-rounds config check explicitly checking for a "false", resulting in a nonexistent option being treated as "true". Fixes #232
  • Loading branch information
LakeYS committed Jun 25, 2021
1 parent 579df6e commit 6c5364c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion triviabot.js
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ Trivia.doGame = async function(id, channel, author, scheduled, config, category,
"config": typeof game[id]!=="undefined"?game[id].config:config
};
// DELTA - Adding fixed number of rounds game
if(isFirstQuestion && getConfigVal("use-fixed-rounds", channel) !== false) {
if(isFirstQuestion && getConfigVal("use-fixed-rounds", channel) === true) {
game[id].config.customRoundCount = getConfigVal("rounds-fixed-number", channel);
game[id].config.useFixedRounds = 1;
if(getConfigVal("debug-log")) { console.log("Setting CustomRoundCount to: " + game[id].config.customRoundCount); } // DELTA - Debug output
Expand Down

0 comments on commit 6c5364c

Please sign in to comment.