diff --git a/commands/updateLicense.js b/commands/updateLicense.js index 432bff6..f216bc8 100644 --- a/commands/updateLicense.js +++ b/commands/updateLicense.js @@ -115,12 +115,12 @@ module.exports = { status: null, bot_request: true }; - if (queryString.substr(8, 6)=='revoke') { + if (queryString.split('-')[1]=='revoke') { query.status = 2; - query._id = queryString.substr(15, 24); - } else if (queryString.substr(8, 9)=='reinstate') { + query._id = queryString.split('-')[2]; + } else if (queryString.split('-')[1]=='reinstate') { query.status = 1; - query._id = queryString.substr(18, 24); + query._id = queryString.split('-')[2]; } socket.emit("update_drivers_license_status", query); socket.on("bot_updated_drivers_license_status", (res) => { diff --git a/config/config.js b/config/config.js index 698df24..c96460c 100644 --- a/config/config.js +++ b/config/config.js @@ -2,7 +2,7 @@ require('dotenv').config() module.exports = { Dev: "PRODUCTION", - Version: "3.1.2", + Version: "3.1.3", Admins: ["362791661274660874"], // Admins of the bot DefaultPrefix: "?", socket: "https://www.linespolice-cad.com/",