Hotfix for calling methods in class

This commit is contained in:
SowinskiBraeden committed 2021-08-04 11:20:58 -07:00
1 parent 6d3b84fe28
commit a3bbbfa577
2 files changed
+15 -13

No files matched your search

+14 -12
View File
@@ -164,7 +164,7 @@ class Bot {
// Basic Commands
client.on('message', (message) => {
getPrefix(message).then(prefix => {
this.getPrefix(message).then(prefix => {
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(' ');
@@ -216,24 +216,26 @@ class Bot {
if (command == 'setprefix') {
if (message.channel.type=="dm") return message.author.send(`You cannot set a prefix in a dm ${message.author}!`);
if(!message.member.hasPermission(["ADMINISTRATOR","MANAGE_GUILD"])) return message.channel.send(`You don't have permission to used this command ${message.author}`);
newPrefix(message, args);
this.newPrefix(message, args);
}
// Login
if (command == 'login') {
if (message.channel.type=="text") return message.channel.send(`You must direct message me to login ${message.author}!`);
remoteLogin(message, args);
this.remoteLogin(message, args);
}
if (command == 'logout') remoteLogout(message);
if (command == 'logout') this.remoteLogout(message);
if (command == 'validstatus') return message.channel.send(validStatus);
if (command == 'checkstatus') checkStatus(message, args);
if (command == 'updatestatus') updateStatus(message, args, prefix);
if (command == 'account') account(message);
if (command == 'checkstatus') this.checkStatus(message, args);
if (command == 'updatestatus') this.updateStatus(message, args, prefix);
if (command == 'account') this.account(message);
if (command == 'penalcodes') return message.channel.send('https://www.linespolice-cad.com/penal-code');
if (command == 'namedb') nameSearch(message, args);
if (command == 'platedb') plateSearch(message, args);
if (command == 'firearmdb') weaponSearch(message, args);
if (command == 'createbolo') createBolo(message, args);
if (command == 'panic') enablePanic(message);
// Disabled for dev
// if (command == 'namedb') this.nameSearch(message, args);
// if (command == 'platedb') this.plateSearch(message, args);
// if (command == 'firearmdb') this.weaponSearch(message, args);
// if (command == 'createbolo') this.createBolo(message, args);
// if (command == 'panic') this.enablePanic(message);
// Dev Commands (not visible in help)
if (command == 'version') return message.channel.send(`**LPS-BOT Version : ${this.dev}-${config.version}**`)
+1 -1
View File
@@ -2,7 +2,7 @@
"defaultPrefix": "?",
"botID": "860298681047056434",
"mongoURI": "mongodb+srv://lps_bot:ktSkHml2BU9EIQ0a@heroku-police-cad-dev.j7aom.mongodb.net/heroku_8pc4g86l?retryWrites=true&w=majority",
"version": "Beta 1.1.3",
"version": "Beta 1.1.4",
"socket": "https://police-cad-dev.herokuapp.com/",
"dbo": "heroku_8pc4g86l"
}