Add silent option

This commit is contained in:
Christopher Cookman 2024-04-24 22:18:11 -06:00
parent 50f9193349
commit ad023a9558
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -296,6 +296,12 @@ client.on("ready", async () => {
description: "Why is the defcon changing to this level?", description: "Why is the defcon changing to this level?",
required: true, required: true,
type: 3 type: 3
},
{
name: "silent",
type: 5,
description: "Don't send the @everyone funny ping",
required: false
} }
] ]
} }
@ -335,7 +341,7 @@ client.on('interactionCreate', async interaction => {
// Send automated announcement. // Send automated announcement.
color = parseInt(config.DEFCON.levels[defcon].color.replace("#", ""), 16); color = parseInt(config.DEFCON.levels[defcon].color.replace("#", ""), 16);
client.channels.cache.get(config.discord.announcement_channel).send({ client.channels.cache.get(config.discord.announcement_channel).send({
content: config.discord.announcment_content, content: interaction.options.getBoolean("silent") ? "" : config.discord.announcment_content,
embeds: [ embeds: [
{ {
color, color,