From 3df8bc70e8e0557c61a6aa15bb7dad651138f753 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Wed, 16 Mar 2022 21:33:48 -0700 Subject: [PATCH] update/ping on panic status --- commands/getPingOnPanicStatus.js | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 commands/getPingOnPanicStatus.js diff --git a/commands/getPingOnPanicStatus.js b/commands/getPingOnPanicStatus.js new file mode 100644 index 0000000..800fe27 --- /dev/null +++ b/commands/getPingOnPanicStatus.js @@ -0,0 +1,41 @@ +const { MessageEmbed } = require('discord.js'); + +module.exports = { + name: "", + description: "", + usage: "", + permissions: { + channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], + member: [], + }, + aliases: [], + /** + * + * @param {require("../structures/LinesPoliceCadBot")} client + * @param {import("discord.js").MessageCreate} message + * @param {string[]} args + * @param {*} param3 + */ + run: async (client, message) => { + let guild = await client.dbo.collection("prefixes").findOne({"server.serverID":message.guild.id}).then(guild => guild); + return message.channel.send(`Current Ping on Panic Status: ${guild.server.pingOnPanic}`); + }, + SlashCommand: { + options: [], + /** + * + * @param {require("../structures/LinesPoliceCadBot")} client + * @param {import("discord.js").MessageCreate} message + * @param {string[]} args + * @param {*} param3 + */ + run: async (client, interaction, args, { GuildDB }) => { + if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) { + return interaction.send(`You are not allowed to use the bot in this channel.`); + } + + let guild = await client.dbo.collection("prefixes").findOne({"server.serverID":interaction.guild.id}).then(guild => guild); + return interaction.send(`Current Ping on Panic Status: ${guild.server.pingOnPanic}`); + }, + }, +} \ No newline at end of file