diff --git a/src/app/channel/chatHandler.js b/src/app/channel/chatHandler.js index c9d07ef..3da520a 100644 --- a/src/app/channel/chatHandler.js +++ b/src/app/channel/chatHandler.js @@ -14,6 +14,9 @@ GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see .*/ +//NPM imports +const validator = require('validator') + //local imports const commandPreprocessor = require('./commandPreprocessor'); const loggerUtils = require('../../utils/loggerUtils'); @@ -63,8 +66,8 @@ module.exports = class{ if(userDB){ try{ - //Set high level - userDB.highLevel = data.highLevel; + //Floor input to an integer and set high level + userDB.highLevel = Math.floor(data.highLevel); //Save user DB Document await userDB.save();