SHARE
TWEET

Untitled

a guest Sep 15th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. client.on('message', message => {
  2.  
  3.     if(message.content === prefix + "mutechannel") {
  4.                         if(!message.channel.guild) return message.reply('** This command only for servers**');
  5.  
  6. if(!message.member.hasPermission('MANAGE_MESSAGES')) return message.reply(' **ماعندك صلاحية**');
  7.            message.channel.overwritePermissions(message.guild.id, {
  8.          SEND_MESSAGES: false
  9.  
  10.            }).then(() => {
  11.                message.reply("**تم تقفيل الشات**")
  12.            });
  13.              }
  14. //FIRE BOT
  15.  if(message.content === prefix + "unmutechannel") {
  16.                      if(!message.channel.guild) return message.reply('** This command only for servers**');
  17.  
  18. if(!message.member.hasPermission('MANAGE_MESSAGES')) return message.reply('**ماعندك صلاحية**');
  19.            message.channel.overwritePermissions(message.guild.id, {
  20.          SEND_MESSAGES: true
  21.  
  22.            }).then(() => {
  23.                message.reply("**تم فتح الشات**")
  24.            });
  25.              }
  26.              
  27.      
  28.    
  29. });
  30.  
  31.  
  32. client.on('message', message => {
  33.     var prefix = "";
  34.     if (message.author.boss) return;
  35.     if (!message.content.startsWith(prefix)) return;
  36.     let command = message.content.split(" ")[0];
  37.     command = command.slice(prefix.length);
  38.     if (command == "Role") {
  39.     if (!message.channel.guild) return;
  40.     if(!message.guild.member(message.author).hasPermission("MANAGE_ROLES")) return message.reply("**:no_entry_sign:انت لا تملك صلاحيات **").then(msg => msg.delete(5000));;
  41.     if(!message.guild.member(client.user).hasPermission("MANAGE_ROLES")) return message.reply("البوت لايملك صلاحيات ").then(msg => msg.delete(5000));;
  42.     let user = message.mentions.users.first();
  43.     if (message.mentions.users.size < 1) return message.reply('حط منشن الشخص بعدين الرتبه الي تبيه تعطيه و ماراح تعطي الا اقل من رتبتك').then(msg => {msg.delete(5000)});
  44.     let MRole = message.content.split(" ").slice(2).join(" ");
  45.     if(!MRole)return message.reply("يجب عليك وضع اسم الرتبة").then(msg => {msg.delete(5000)});
  46.     message.guild.member(user).addRole(message.guild.roles.find("name", MRole));
  47.     message.reply('تم اعطاء الرتبه لشخص').then(msg => {msg.delete(10000)});
  48.     }
  49.     });
  50.  
  51.  
  52. client.on('ready', () => {
  53.     console.log(`~~~~~~~~~~~~~~~~~`);
  54.     console.log(`Logging into Discord`);
  55.     console.log(`~~~~~~~~~~~~~~~~~~~~~`);
  56.     console.log(`on  ${client.guilds.size} Servers `);
  57.     console.log(`~~~~~~~~~~~~~~~~~~~~~~~~`);
  58.     console.log(`Logged in as ${client.user.tag}!`);
  59.     client.user.setGame(`KINGDOM`,"http://twitch.tv/KINGDOM")
  60.     client.user.setStatus("dnd")
  61.  });
  62.  
  63.  
  64.  
  65. client.on('message', message => {
  66.     if(message.content.startsWith('kwelcometoserverkingdom')) {
  67.     let args = message.content.split(' ').slice(1);
  68.     let ar = args.join(' ');
  69.  
  70.     message.channel.send(ar,{tts:true});
  71. }
  72. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top