Facebook
From Bayrakk#1337, 3 Years ago, written in JavaScript.
This paste is a reply to Re: unjail from Eratic Mockingjay - view diff
Embed
Download Paste or View Raw
Hits: 368
  1. const Discord = require('discord.js')
  2. const ayarlar = require('../ayarlar.json')
  3.  
  4. exports.run = async (client ,message ,args) => {
  5. if(!message.member.roles.has('JAİLCİ ROL ID')) return message.channel.send(`Bu Komutu Kullanmak İçin Gerekli Yetkiye Sahip Degilsin !`)
  6.     let kullanıcı = message.mentions.members.first()
  7.         if(!kullanıcı)
  8.              return message.channel.send('Lutfen Bir Kullanıcı Belirtin.')
  9. let cezlaırol = message.guild.roles.get("CEZALI ROL ID"); //Cezalı Rol Id
  10. let kayıtsızrol = message.guild.roles.get("KAYITSIZ ROL ID"); // Kayıtsız Rol Id
  11. if(!cezlaırol) return message.guild.owner.send(`Sunucuda Cezalı Rolunu Bulamadıgım!`)
  12. if(!kayıtsızrol) return message.guild.owner.send(`Sunucuda Kayıtsızı Rolunu Bulamadım!`)
  13.  
  14. let member = message.guild.member(kullanıcı)
  15. await member.addRole(kayıtsızrol) //
  16. await member.removeRole(cezlaırol)
  17.  
  18. let bse = message.guild.channels.find('name' , 'Kanal-İsmi') //Log kanalının ismini yaz
  19.     if(!bse) return message.guild.owner.send(`Sunucuda Log Kanalını Bulamadım !`)
  20. const darkcodebayraq = new Discord.RichEmbed()
  21. .setTitle('Başarılı :)')
  22. .setDescription(`Başarıyla ${message.author} adlı yetkili ${kullanıcı} adlı kullanıcıyı jailden cıkartdı.`)
  23. .setFooter('Discord')
  24. bse.send(darkcodebayraq)
  25.  
  26. const bayrakk = new Discord.RichEmbed()
  27. .setTitle('Başarılı :)')
  28. .setDescription(`Başarıyla ${kullanıcı} adlı kullanıcı jailden cıkartıldı.`)
  29. .setFooter('Discord')
  30. message.channel.send(bayrakk)
  31. };
  32. exports.conf = {
  33.   enabled: true,
  34.   guildOnly: false,
  35.   aliases: [],
  36.   permLevel: 0
  37. };
  38.  
  39. exports.help = {
  40.   name: "unjail",
  41.   description: "Belirtiniz Kullanıyı Cezalıdan Kaldırır!",
  42.   usage: "unjail <kullanıcı>"
  43. };