Advertisement
Guest User

Code Discord Bot Creation by SUPRAZY #33

a guest
Mar 31st, 2020
495
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. const Discord = require("discord.js");
  2. const colours = require("../colours.json");
  3.  
  4. module.exports.run = async (bot, message, args) => {
  5.  
  6. if(!bot.lockit) bot.lockit = [];
  7. let validUnlocks = ["release", "unlock"]
  8.  
  9. if(validUnlocks.includes()) {
  10. message.channel.overwritePermissions(message.guild.id, {
  11. SEND_MESSAGES: null
  12. }).then(() => {
  13. message.channel.send("Le salon est réouvert !")
  14. })
  15. } else {
  16. message.channel.overwritePermissions(message.guild.id, {
  17. SEND_MESSAGES: false
  18. }).then(() => {
  19. message.channel.send("Le salon est fermer !")
  20. })
  21. }
  22. }
  23.  
  24. module.exports.help = {
  25. name: "lockchannel"
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement