diff --git a/commands/reset-channels.js b/commands/reset-channels.js new file mode 100644 index 0000000..5b9cb2b --- /dev/null +++ b/commands/reset-channels.js @@ -0,0 +1,26 @@ +const { EmbedBuilder } = require('discord.js'); + +module.exports = { + name: "setchannel", + description: "Add channel to allowed channels", + usage: "[channel]", + permissions: { + channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"], + member: ["MANAGE_GUILD"], + }, + SlashCommand: { + /** + * + * @param {require("../structures/LinesPoliceCadBot")} client + * @param {import("discord.js").MessageCreate} message + * @param {string[]} args + * @param {*} param3 + */ + run: async (client, interaction, args, { GuildDB }) => { + client.dbo.collection("prefixes").updateOne({"server.serverID":interaction.guild.id},{set:{"server.allowedChannels":[]]},$set:{"server.hasCustomChannels":false}},function(err, res) { + if (err) throw err; + return interaction.send({ content: `Successfully reset channels..` }); + }); + }, + }, +} \ No newline at end of file