isundil 6 years ago
parent
commit
f01c50d942
1 changed files with 3 additions and 3 deletions
  1. 3 3
      quizz.js

+ 3 - 3
quizz.js

@@ -498,7 +498,7 @@ QuizzBot.prototype.onMessageInternal = function(username, user, msg) {
         userToMod.score += sum;
         Cache.SetScores(this.users);
     }
-    else if (lmsg.startsWith("!score all")) {
+    else if (lmsg === "!score all") {
         if (!user.admin) {
             this.bot.sendMsg(this.room, "Must be channel operator");
             return;
@@ -513,10 +513,10 @@ QuizzBot.prototype.onMessageInternal = function(username, user, msg) {
         scores = scores.sort((a, b) => b.score - a.score);
         this.bot.sendNotice(username, scores.map(i => i.name+":"+i.score).join(", "));
     }
-    else if (lmsg.startsWith("!score")) {
+    else if (lmsg === "!score") {
         this.sendScore(true);
     }
-    else if (lmsg.startsWith("!top")) {
+    else if (lmsg === "!top") {
         this.sendScore(false);
     }
     else if (this.currentQuestion) {