Advertisement
Zaayd

hide unhide open lock Code DJS V12

Jun 9th, 2021
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. client.on("message", message => {
  2.         let channel = message.mentions.channels.first() || message.channel
  3.   if (message.content.toLowerCase() === prefix + "lock" || message.content.toLowerCase() === prefix + "قفل" || message.content.toLowerCase() === "قفل") {
  4.     if (!message.channel.guild || message.author.bot) return;
  5.     if (!message.member.hasPermission("MANAGE_MESSAGES"))
  6.       return message.channel
  7.         .send("**Please Check Your Permssion**")
  8.         .then(m => m.delete({ timeout: 5000 }));
  9.     message.channel.updateOverwrite(message.guild.id, { SEND_MESSAGES: false });
  10.     let lock = new Discord.MessageEmbed()
  11.       .setDescription("```تم قفل الشات بواسطة : " + message.author.username + "```")
  12.       .setColor("None");
  13.     message.channel.send(`🔒 <#${message.channel.id}> تم قفل`);
  14.   }
  15.   if (message.content.toLowerCase() === prefix + "unlock" || message.content.toLowerCase() === prefix + "فتح" ) {
  16.     if (!message.channel.guild || message.author.bot) return;
  17.     if (!message.member.hasPermission("MANAGE_MESSAGES"))
  18.       return message.channel
  19.         .send("**Please Check Your Permssion**")
  20.         .then(m => m.delete({ timeout: 5000 }));
  21.     channel.updateOverwrite(message.guild.id, { SEND_MESSAGES: true });
  22.     let unlock = new Discord.MessageEmbed().setDescription(
  23.       "```تم فتح الشات بواسطة : " + message.author.username + "``` "
  24.     );
  25.     message.channel.send(`🔓 <#${message.channel.id}> تم فتح`);
  26.   }
  27.   if (message.content.toLocaleLowerCase() === prefix + "hide" || message.content.toLocaleLowerCase() === prefix + "اخفاء") {
  28.     if (!message.channel.guild || message.author.bot) return;
  29.     if (!message.member.hasPermission("MANAGE_MESSAGES"))
  30.       return message.channel
  31.         .send("**Please Check Your Permssion**")
  32.         .then(m => m.delete({ timeout: 5000 }));
  33.     channel.updateOverwrite(message.guild.id, { VIEW_CHANNEL: false });
  34.     message.channel.send(`🔒 <#${message.channel.id}> تم اخفاء`);
  35.   }
  36.   if (message.content.toLocaleLowerCase() === prefix + "unhide" || message.content.toLocaleLowerCase() === prefix + "اضهار") {
  37.     if (!message.channel.guild || message.author.bot) return;
  38.     if (!message.member.hasPermission("MANAGE_MESSAGES"))
  39.       return message.channel
  40.         .send("**Please Check Your Permssion**")
  41.         .then(m => m.delete({ timeout: 5000 }));
  42.     channel.updateOverwrite(message.guild.id, { VIEW_CHANNEL: true });
  43.     message.channel.send(`🔓 <#${message.channel.id}> تم اضهار`);
  44.   }
  45. });
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement