fix interaction acknowledged bug
This commit is contained in:
1 parent
ec0096cdd3
commit
f7b8d06bd1
3 files changed
+10
-10
No files matched your search
@@ -70,12 +70,7 @@ class LinesPoliceCadBot extends Client {
|
||||
|
||||
// This is for the 'panic' command when enabling panic
|
||||
// May be used by other interaction
|
||||
async forceUpdateStatus(sendObject, userID, status) {
|
||||
let validStatus=['10-8','10-7','10-6','10-11','10-23','10-97','10-15','10-70','10-80', '10-41', '10-42', 'Panic'];
|
||||
let user = await this.dbo.collection("users").findOne({"user.discord.id":userID}).then(user => user);
|
||||
if (!user) return returnMessage(`You are not logged in <@${userID}>`);
|
||||
if (user.user.activeCommunity==null) return returnMessage(`You must join a community to use this command.`);
|
||||
if (!validStatus.includes(status)) return returnMessage(`\`${status}\` is a Invalid Status.`);
|
||||
async forceUpdateStatus(status, user) {
|
||||
let onDuty=null;
|
||||
let updateDuty=false;
|
||||
if (status=='10-41') {
|
||||
@@ -98,7 +93,6 @@ class LinesPoliceCadBot extends Client {
|
||||
const socket = io.connect(this.config.socket);
|
||||
socket.emit('bot_update_status', req);
|
||||
socket.on('bot_updated_status', (res) => {
|
||||
sendObject.send(`Succesfully updated status to \`${status}\` <@${userID}>`);
|
||||
socket.disconnect();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user