Hotfix for updateStatus
This commit is contained in:
1 parent
db4c54e1a0
commit
223dabbe31
2 files changed
+4
-3
No files matched your search
@@ -92,8 +92,9 @@ async function checkStatus(message, args) {
|
|||||||
|
|
||||||
async function updateStatus(message, args, prefix) {
|
async function updateStatus(message, args, prefix) {
|
||||||
let validStatus=['10-8','10-7','10-6','10-11','10-23','10-97','10-15','10-70','10-80'];
|
let validStatus=['10-8','10-7','10-6','10-11','10-23','10-97','10-15','10-70','10-80'];
|
||||||
getUser(message).then(user => {
|
getUser(message.author.id).then(user => {
|
||||||
if (user==null) return message.channel.send(`You are not logged in ${message.author}!`);
|
if (user==null) return message.channel.send(`You are not logged in ${message.author}!`);
|
||||||
|
if (args.length==0) return message.channel.send(`You must provide a new status ${message.author} | To see a list of valid statuses, use command \`${prefix}validStatus\`.`);
|
||||||
if (!validStatus.includes(args[0])) return message.channel.send(`**${args[0]}** is a Invalid Status ${message.author}! To see a list of valid statuses, use command \`${prefix}validStatus\`.`);
|
if (!validStatus.includes(args[0])) return message.channel.send(`**${args[0]}** is a Invalid Status ${message.author}! To see a list of valid statuses, use command \`${prefix}validStatus\`.`);
|
||||||
let onDuty=null;
|
let onDuty=null;
|
||||||
let updateDuty=false;
|
let updateDuty=false;
|
||||||
@@ -228,7 +229,7 @@ client.on('message', (message) => {
|
|||||||
// if (command == 'panic') enablePanic(message);
|
// if (command == 'panic') enablePanic(message);
|
||||||
|
|
||||||
// Dev Commands (not visible in help)
|
// Dev Commands (not visible in help)
|
||||||
if (command == 'version') return message.channel.send(`**LPS-BOT Version : PROD-${config.version}**`)
|
if (command == 'version') return message.channel.send(`**LPS-BOT Version : DEV-${config.version}**`)
|
||||||
if (command == 'whatisthemeaningoflife') message.channel.send('42');
|
if (command == 'whatisthemeaningoflife') message.channel.send('42');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+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.0.0",
|
"version": "Beta 1.0.1",
|
||||||
"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