Added more Commands

This commit is contained in:
Noah Pombas
2025-02-13 04:42:11 +01:00
parent 216e95ee3e
commit 7860aab0e8
21 changed files with 684 additions and 253 deletions

30
commands/admin/lock.js Normal file
View File

@@ -0,0 +1,30 @@
const Discord = require("discord.js")
module.exports = {
name: "lock",
description: "Lock a Channel",
type: Discord.ApplicationCommandType.ChatInput,
run: async (client, interaction, args) => {
if (!interaction.member.permissions.has("MANAGE_CHANNELS")) {
interaction.reply(`
**Dicord BOT**
🚫 Access denied for this command! 🚫
${interaction.user}`)
} else {
let embed = new Discord.EmbedBuilder()
.setTitle("Channel locked.")
.setColor('Blue')
.addFields()
interaction.reply({ embeds: [embed] }).then(msg => {
interaction.channel.permissionOverwrites.edit(interaction.guild.id, { SendMessages: false }).catch(e => {
console.log(e)
interaction.editReply(`Oops, something went wrong while trying to lock this chat.`)
})
})
}
}
}