Create Unlock.js

imgbot
Kieran 2022-07-04 21:34:06 +01:00
parent f02ff9a7bd
commit 7736780988
1 changed files with 20 additions and 0 deletions

20
commands/admin/unlock.js Normal file
View File

@ -0,0 +1,20 @@
const { Discord, Client, Message, MessageEmbed, Permissions } = require('discord.js');
module.exports = {
name: 'unlock',
aliases: [''],
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async(client, message, args) => {
const permission = message.member.permissions.has(Permissions.FLAGS.MANAGE_CHANNELS)
if (!permission)return message.reply({ contents: "You don't have permission to use this command" });
message.channel.permissionOverwrites.edit(message.guild.roles.everyone.id, {SEND_MESSAGES: true});
message.channel.send("Channel has been unlocked.")
}
}