Submit templates for repl.it/templates here.

← Back to all posts
Lockdown command
Jet1234 (1)

//Creator: Jet#9308
//Lockdown command
//Node.js Discord only
exports.run = async (client, message, args) => {
const roleA = await message.guild.roles.cache.find(role => role.id === "everyone id [from your server]";

if (
!message.member.roles.cache.some(r =>
[
"role id that can activate this command",
"role id that can activate this command",
"role id that can activate this command"
].includes(r.id) )) {
return message.channel.send(${message.author.username} You don't have enough power!.);
} else if (message.content.includes("on")) {
await roleA.setPermissions(0).catch(console.error);

await message.channel.send(`🔨 **|** The channel was locked by ${message.author.username}`);

} else if (message.content.includes("off")) {
await roleA.setPermissions(0).catch(console.error);

await message.channel.send(
  `🔨 **|** The channel was open by ${message.author.username}`);

} else {
return message.channel.send(${message.author.username} The correct command is lockdown on| off);
}
};