actually ping role with pingOnPanic
This commit is contained in:
1 parent
3355302994
commit
56180a7f4b
5 files changed
+1609
-1093
No files matched your search
@@ -13,3 +13,5 @@ dev.js
|
|||||||
# Logs
|
# Logs
|
||||||
logs/*
|
logs/*
|
||||||
Logs.log
|
Logs.log
|
||||||
|
|
||||||
|
.env
|
||||||
+6
-2
@@ -49,7 +49,7 @@ module.exports = {
|
|||||||
socket.emit('bot_update_status', myUpdateReq);
|
socket.emit('bot_update_status', myUpdateReq);
|
||||||
socket.on('bot_updated_status', (res) => {
|
socket.on('bot_updated_status', (res) => {
|
||||||
if (res.userID == user._id) {
|
if (res.userID == user._id) {
|
||||||
interaction.send({ content: `Disabled Panic <@${interaction.member.user.id}> and set status to \`10-8\`.` });
|
interaction.send({ content: `Disabled Panic and set status to \`10-8\`.`, flags: (1 << 6) });
|
||||||
socket.disconnect();
|
socket.disconnect();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -73,7 +73,11 @@ module.exports = {
|
|||||||
socket.disconnect();
|
socket.disconnect();
|
||||||
|
|
||||||
let guild = await client.dbo.collection("prefixes").findOne({"server.serverID": GuildDB.serverID}).then(guild => guild);
|
let guild = await client.dbo.collection("prefixes").findOne({"server.serverID": GuildDB.serverID}).then(guild => guild);
|
||||||
if (guild.server.pingOnPanic) return interaction.send({ content: `Attention <@&${guild.server.pingRole}> \`${user.user.username}\` has activated panic` });
|
|
||||||
|
if (guild.server.pingOnPanic) {
|
||||||
|
const channel = client.channels.cache.get(interaction.channel_id);
|
||||||
|
channel.send({ content: `Attention <@&${guild.server.pingRole}> \`${user.user.username}\` has activated panic` });
|
||||||
|
}
|
||||||
|
|
||||||
return interaction.send({ content: 'Successfully activated Panic', flags: (1 << 6) });
|
return interaction.send({ content: 'Successfully activated Panic', flags: (1 << 6) });
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+1594
-1083
File diff suppressed because it is too large.
Load diff
+7
-7
@@ -11,16 +11,16 @@
|
|||||||
"author": "Braeden Sowinski",
|
"author": "Braeden Sowinski",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@discordjs/rest": "^1.7.0",
|
||||||
"colors": "^1.4.0",
|
"colors": "^1.4.0",
|
||||||
"discord-bitfield-calculator": "^1.2.0",
|
"concat-stream": "^2.0.0",
|
||||||
"discord.js": "^14.8.0",
|
"discord-bitfield-calculator": "^1.0.0",
|
||||||
|
"discord.js": "^14.9.0",
|
||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
"express": "^4.17.1",
|
"form-data": "^4.0.0",
|
||||||
"moment-duration-format": "^2.3.2",
|
"moment-duration-format": "^2.3.2",
|
||||||
"mongodb": "^3.6.8",
|
"mongodb": "^4.12.1",
|
||||||
"nodemon": "^2.0.14",
|
|
||||||
"randomstring": "^1.2.1",
|
|
||||||
"socket.io-client": "^4.1.2",
|
"socket.io-client": "^4.1.2",
|
||||||
"winston": "^3.6.0"
|
"winston": "^3.8.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -214,7 +214,6 @@ class LinesPoliceCadBot extends Client {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
// require('../util/RegisterSlashCommands')(this, "942619852567363674");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkRoleStatus(rolesCache, allowedRoles) {
|
async checkRoleStatus(rolesCache, allowedRoles) {
|
||||||
|
|||||||
Reference in new issue
Block a user