Hotfix for calling methods in class
This commit is contained in:
1 parent
6d3b84fe28
commit
a3bbbfa577
2 files changed
+15
-13
No files matched your search
@@ -164,7 +164,7 @@ class Bot {
|
|||||||
|
|
||||||
// Basic Commands
|
// Basic Commands
|
||||||
client.on('message', (message) => {
|
client.on('message', (message) => {
|
||||||
getPrefix(message).then(prefix => {
|
this.getPrefix(message).then(prefix => {
|
||||||
if (!message.content.startsWith(prefix) || message.author.bot) return;
|
if (!message.content.startsWith(prefix) || message.author.bot) return;
|
||||||
|
|
||||||
const args = message.content.slice(prefix.length).trim().split(' ');
|
const args = message.content.slice(prefix.length).trim().split(' ');
|
||||||
@@ -216,24 +216,26 @@ class Bot {
|
|||||||
if (command == 'setprefix') {
|
if (command == 'setprefix') {
|
||||||
if (message.channel.type=="dm") return message.author.send(`You cannot set a prefix in a dm ${message.author}!`);
|
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}`);
|
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
|
// Login
|
||||||
if (command == 'login') {
|
if (command == 'login') {
|
||||||
if (message.channel.type=="text") return message.channel.send(`You must direct message me to login ${message.author}!`);
|
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 == 'validstatus') return message.channel.send(validStatus);
|
||||||
if (command == 'checkstatus') checkStatus(message, args);
|
if (command == 'checkstatus') this.checkStatus(message, args);
|
||||||
if (command == 'updatestatus') updateStatus(message, args, prefix);
|
if (command == 'updatestatus') this.updateStatus(message, args, prefix);
|
||||||
if (command == 'account') account(message);
|
if (command == 'account') this.account(message);
|
||||||
if (command == 'penalcodes') return message.channel.send('https://www.linespolice-cad.com/penal-code');
|
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);
|
// Disabled for dev
|
||||||
if (command == 'firearmdb') weaponSearch(message, args);
|
// if (command == 'namedb') this.nameSearch(message, args);
|
||||||
if (command == 'createbolo') createBolo(message, args);
|
// if (command == 'platedb') this.plateSearch(message, args);
|
||||||
if (command == 'panic') enablePanic(message);
|
// 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)
|
// Dev Commands (not visible in help)
|
||||||
if (command == 'version') return message.channel.send(`**LPS-BOT Version : ${this.dev}-${config.version}**`)
|
if (command == 'version') return message.channel.send(`**LPS-BOT Version : ${this.dev}-${config.version}**`)
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"defaultPrefix": "?",
|
"defaultPrefix": "?",
|
||||||
"botID": "860298681047056434",
|
"botID": "860298681047056434",
|
||||||
"mongoURI": "mongodb+srv://lps_bot:ktSkHml2BU9EIQ0a@heroku-police-cad-dev.j7aom.mongodb.net/heroku_8pc4g86l?retryWrites=true&w=majority",
|
"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/",
|
"socket": "https://police-cad-dev.herokuapp.com/",
|
||||||
"dbo": "heroku_8pc4g86l"
|
"dbo": "heroku_8pc4g86l"
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user