Эх сурвалжийг харах

Refs #18 trim first letter case

isundil 6 жил өмнө
parent
commit
9ba7a6115b
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      rapido.js

+ 3 - 2
rapido.js

@@ -129,7 +129,7 @@ Rapido.prototype.onWordTimeout = function() {
     }
     this.endWord();
     if (this.setProgression >= this.config.WORD_IN_SET)
-        this.bot.sendMsg(this.room, "fin du temps réglementaire, tapez !next pour une prochaine partie.");
+        this.bot.sendMsg(this.room, "fin du temps réglementaire, tapez !rapido pour une prochaine partie.");
     else
         this.startNextWordTimer();
 }
@@ -193,9 +193,10 @@ Rapido.prototype.computeScore = function(ellapsed, word, index) {
 
 Rapido.prototype.onMessageInternal = function(username, user, msg) {
     const lmsg = msg.toLowerCase();
+    msg = lmsg.substr(0, 1) + msg.substr(1);
 
     if (lmsg === "!next") {
-        this.bot.sendMsg(this.room, "!next a été remplacé par !rapido.");
+        this.bot.sendMsg(this.room, "La commande !next a été remplacé par !rapido.");
     } else if (lmsg === "!rapido") {
         if (this.wordRequest.indexOf(username) === -1)
             this.wordRequest.push(username);