SHARE
TWEET

System

saeedhamed243 Jul 9th, 2019 335 in 267 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. client.on('ready', () => {
  2.   console.log(`Logged in as ${client.user.tag}!`);
  3. });
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10. client.login("");
  11.  
  12. client.on('message', message => {
  13.             if (message.content ===1') {
  14.               message.channel.sendFile("./5.png");
  15.             }
  16.          });
  17.  
  18.  
  19.  
  20.  
  21.  
  22.          client.on('message', message => {
  23.             if (message.content === 'السلام عليكم') {
  24.               message.channel.sendFile("./5bz.png");
  25.             }
  26.          });
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.          client.on('message', message => {
  36.             if (message.content === 'حشيش') {
  37.               message.channel.sendFile("./2.png");
  38.             }
  39.          });
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.          client.on('message', message => {
  49.             if (message.content === 'باك') {
  50.               message.channel.sendFile("./WLC.png");
  51.             }
  52.          });
  53.          
  54.          
  55.          
  56.          
  57.          
  58.          
  59.          
  60.          
  61.          
  62.                  client.on('message', message => {
  63.             if (message.content === 'ترحيب') {
  64.               message.channel.sendFile("./1.jpg");
  65.             }
  66.          });
  67.  
  68.  
  69. client.on("message", message => {
  70. let args = message.content.split(' ');
  71. let prefix = "s!";
  72. if(args[0].toLowerCase() === (prefix + 'calc')){
  73.     const math = require("mathjs");
  74.     const ssff = message.content.split(' ').slice(1).join(' ');
  75.     const responsee = math.eval(ssff);
  76.     if(!ssff){
  77.         return message.channel.send(`عليك ان تحدد مسألة حسابية حقيقية`);
  78.     }
  79.     let embed = new Discord.RichEmbed();
  80.     embed.setTitle(`عملية حسابية جديدة`);
  81.     embed.setThumbnail(message.author.displayAvatarURL);
  82.     embed.setTimestamp();
  83.     embed.setFooter(message.author.tag,message.author.displayAvatarURL);
  84.     embed.setColor(`#ffb3b3`);
  85.     embed.addField(`المسألة :`,`\`\`\`js\n${ssff}\`\`\``);
  86.     embed.addField(`الناتج :`,`\`\`\`js\n${responsee}\`\`\``);
  87.     message.channel.send(embed);
  88. }
  89. });
  90.  
  91.  
  92. client.on("message", message => {
  93. let prefix = "s!";
  94. let args = message.content.split(' ');
  95.   if(args[0].toLowerCase() === (prefix + "server")) {
  96.         let embed = new Discord.RichEmbed()
  97.         .addField(`:id: Server ID:`, `${message.guild.id}`, true)
  98.         .addField(`:calendar: Created on:`, `${moment(message.guild.createdAt).format(`D/M/YYYY h:mm`)} \n ${moment(message.guild.createdAt).locale("AR-eg").fromNow()}`,true)
  99.         .addField(`:crown: Owned by`, `${message.guild.owner.user.tag} [${message.guild.owner.user.id}]`,true)
  100.         .addField(`:busts_in_silhouette: Members [${message.guild.members.size}]`, `**${message.guild.members.filter(c => c.presence.status !== "offline").size}** Online`, true)
  101.         .addField(`:speech_balloon: Channels [${message.guild.channels.size}]`,`**${message.guild.channels.filter(f => f.type === "text").size}** Text | **${message.guild.channels.filter(f => f.type === "voice").size}** Voice`,true)
  102.         .addField(`:earth_africa: Others`, `**Region:** ${message.guild.region} \n **Verification level:** ${message.guild.verificationLevel}`, true)  
  103.         .addField(`:closed_lock_with_key: Roles [${message.guild.roles.size}]`, `To see the whole list with all roles use **${prefix}roles**`, true)
  104.         .setThumbnail(`${message.guild.iconURL}`)
  105.         .setColor(`black`)
  106.         .setAuthor(`${message.guild.name}`, `${message.guild.iconURL}`);
  107.        
  108.     message.channel.sendEmbed(embed);
  109.     }
  110.  
  111. });
  112.  
  113.  
  114. client.on("guildMemberAdd", member => {
  115.   member.createDM().then(function (channel) {
  116.   return channel.send(`:rose:  ولكم نورت السيرفر:rose:
  117. :crown:اسم العضو  ${member}:crown:  
  118. انت العضو رقم ${member.guild.memberCount} `)
  119. }).catch(console.error)
  120. })
  121.  
  122.  
  123. client.on('message', message => {
  124.     var prefix = "s!";
  125.   if (message.author.x5bz) return;
  126.   if (!message.content.startsWith(prefix)) return;
  127.  
  128.   let command = message.content.split(" ")[0];
  129.   command = command.slice(prefix.length);
  130.  
  131.   let args = message.content.split(" ").slice(1);
  132.  
  133.   if (command == "ban") {
  134.                if(!message.channel.guild) return message.reply('** This command only for servers**');
  135.          
  136.   if(!message.guild.member(message.author).hasPermission("BAN_MEMBERS")) return message.reply("**You Don't Have ` BAN_MEMBERS ` Permission**");
  137.   if(!message.guild.member(client.user).hasPermission("BAN_MEMBERS")) return message.reply("**I Don't Have ` BAN_MEMBERS ` Permission**");
  138.   let user = message.mentions.users.first();
  139.   let reason = message.content.split(" ").slice(2).join(" ");
  140.   if (message.mentions.users.size < 1) return message.channel.send(`https://cdn.pg.sa/fjxlms81nk.png`);
  141.   if(!reason) return message.channel.send(`https://cdn.pg.sa/fjxlms81nk.png`);
  142.   if (!message.guild.member(user)
  143.   .bannable) return message.reply(`This User Is Have High Role !`);
  144.  
  145.   message.guild.member(user).ban(7, user);
  146.  
  147.   const banembed = new Discord.RichEmbed()
  148.   .setAuthor(`BANNED!`, user.displayAvatarURL)
  149.   .setColor("RANDOM")
  150.   .setTimestamp()
  151.   .addField("**User:**",  '**[ ' + `${user.tag}` + ' ]**')
  152.   .addField("**By:**", '**[ ' + `${message.author.tag}` + ' ]**')
  153.   .addField("**Reason:**", '**[ ' + `${reason}` + ' ]**')
  154.   message.channel.send({
  155.     embed : banembed
  156.   })
  157. }
  158. });
  159.  
  160.  
  161. client.on('message', message => {
  162. if(!message.channel.guild) return;
  163. if(message.content.startsWith(prefix + 'move')) {
  164.  if (message.member.hasPermission("MOVE_MEMBERS")) {
  165.  if (message.mentions.users.size === 0) {
  166.  return message.channel.send("``لاستخدام الأمر اكتب هذه الأمر : " +prefix+ "move [USER]``")
  167. }
  168. if (message.member.voiceChannel != null) {
  169.  if (message.mentions.members.first().voiceChannel != null) {
  170.  var authorchannel = message.member.voiceChannelID;
  171.  var usermentioned = message.mentions.members.first().id;
  172. var embed = new Discord.RichEmbed()
  173.  .setTitle("Succes!")
  174.  .setColor("#000000")
  175.  .setDescription(`لقد قمت بسحب <@${usermentioned}> الى الروم الصوتي الخاص بك✅ `)
  176. var embed = new Discord.RichEmbed()
  177. .setTitle(`You are Moved in ${message.guild.name}`)
  178.  .setColor("RANDOM")
  179. .setDescription(`**<@${message.author.id}> Moved You To His Channel!\nServer --> ${message.guild.name}**`)
  180.  message.guild.members.get(usermentioned).setVoiceChannel(authorchannel).then(m => message.channel.send(embed))
  181. message.guild.members.get(usermentioned).send(embed)
  182. } else {
  183. message.channel.send("``لا تستطيع سحب "+ message.mentions.members.first() +" `يجب ان يكون هذه العضو في روم صوتي`")
  184. }
  185. } else {
  186.  message.channel.send("**``يجب ان تكون في روم صوتي لكي تقوم بسحب العضو أليك``**")
  187. }
  188. } else {
  189. message.react("❌")
  190. }
  191.  }
  192. });
  193.  
  194.  
  195. client.on('message', async message => {
  196. if(message.content.startsWith(prefix + "s!")) {
  197.   let i = client.users.size;
  198.   if(message.author.id !== '590647823712911371') return message.channel.send('❎ » هذا الأمر مخصص لصاحب البوت فقط');
  199.   var args = message.content.split(' ').slice(1).join(' ');
  200.   if(!args) return message.channel.send('❎ » يجب عليك كتابة الرسالة')
  201.   setTimeout(() => {
  202.     message.channel.send(`تم الارسال لـ ${i} شخص`)
  203.   }, client.users.size * 500);
  204.   client.users.forEach(s => {
  205.     s.send(args).catch(e => i--);
  206.   });
  207. }
  208. });
  209.  
  210.  
  211.  
  212. client.on("message", (message) => {
  213.     if (message.content.startsWith('$del')) {
  214.         if (!message.member.hasPermission('MANAGE_CHANNELS')) return message.reply("You Don't Have `MANAGE_CHANNELS` Premissions ");
  215.  
  216.         let args = message.content.split(' ').slice(1);
  217.         let channel = message.client.channels.find('name', args.join(' '));
  218.         if (!channel) return message.reply('**لا يوجد اي روم بهاذا الاسم**').catch(console.error);
  219.         channel.delete()
  220.     }
  221. });
  222.  
  223.  
  224.  
  225.  
  226. client.on('message', message => {
  227.     if (!message.guild) return;
  228.     if (message.content.startsWith("https://discordapp.com/api/oauth2/authorize?client_id=598209988032462859&permissions=8&scope=bot")) {
  229.  
  230.         message.channel.createInvite({
  231.         thing: true,
  232.         maxUses: 5,
  233.         maxAge: 86400
  234.     }).then(invite =>
  235.       message.author.sendMessage(invite.url)
  236.     )
  237.   message.channel.send(`** تم أرسال الرابط برسالة خاصة **`)
  238.  
  239.       message.author.send(`**مدة الرابط : يـوم
  240.  عدد استخدامات الرابط : 5 **`)
  241.     }
  242. });
  243.  
  244.  
  245.  
  246.  client.on('message', message => {
  247.  
  248.     if(message.content === "بريفكسmutechannel") {
  249.                         if(!message.channel.guild) return message.reply('** This command only for servers ❌ **');
  250.  
  251.            message.channel.overwritePermissions(message.guild.id, {
  252.          SEND_MESSAGES: false
  253.  
  254.            }).then(() => {
  255.                message.reply("** ✅ | Done.  **")
  256.            });
  257.              }
  258.  
  259.  if(message.content === "%unmutechannel") {
  260.                      if(!message.channel.guild) return message.reply('** This command only for servers ❌ **');
  261.  
  262.            message.channel.overwritePermissions(message.guild.id, {
  263.          SEND_MESSAGES: true
  264.  
  265.            }).then(() => {
  266.                message.reply("**✅ | Done. **")
  267.            });
  268.              }
  269.              
  270.      
  271.    
  272. });
  273.  
  274.  
  275.  
  276. client.on('message' , message => {
  277.   if (message.author.dark) return;
  278.   if (!message.content.startsWith(prefix)) return;
  279.  
  280.   let command = message.content.split(" ")[0];
  281.   command = command.slice(prefix.length);
  282.  
  283.   let args = message.content.split(" ").slice(1);
  284.  
  285.   if (command == "ban") {
  286.                if(!message.channel.guild) return message.reply('** This command only for servers**');
  287.          
  288.   if(!message.guild.member(message.author).hasPermission("BAN_MEMBERS")) return message.reply("**You Don't Have ` BAN_MEMBERS ` Permission**");
  289.   if(!message.guild.member(client.user).hasPermission("BAN_MEMBERS")) return message.reply("**I Don't Have ` BAN_MEMBERS ` Permission**");
  290.   let user = message.mentions.users.first();
  291.   let reason = message.content.split(" ").slice(2).join(" ");
  292.       /*let banlog = client.channels.find("name", "ban-log");
  293.   if(!banlog) return message.reply("I've detected that this server doesn't have a ban-log text channel.");*/
  294.   if (message.mentions.users.size < 1) return message.reply("**منشن شخص**");
  295.   if(!reason) return message.reply ("**اكتب سبب الباند**");
  296.   if (!message.guild.member(user)
  297.   .bannable) return message.reply("**لايمكنني ابند شخص اعلى من رتبتي يرجه اعطاء البوت رتبه عالي**");
  298.  
  299.   message.guild.member(user).ban(7, user);
  300.   message.channel.sendMessage("**لقد تم اعطاء الباند الي شخص بنجاح** ✅");
  301. }
  302. });
  303.  
  304.  
  305.  
  306. client.on("guildMemberAdd", (member) => {
  307. client.channels.get('ايدي الروم').edit({name : `『 الأعضاء ↩ ${member.guild.memberCount} 』`});
  308. })
  309. client.on("guildMemberRemove", (member) => {
  310. client.channels.get('ايدي الروم').edit({name : `『 الأعضاء ↩ ${member.guild.memberCount} 』`});
  311. })
  312.  
  313.  
  314.  
  315. client.on("ready", async  => {
  316. setInterval(function(){
  317. client.channels.find('id', 'idd').setName("W");
  318. client.channels.find('id', 'idd').setName("We");
  319. client.channels.find('id', 'idd').setName("Wel");
  320. client.channels.find('id', 'idd').setName("Welc");
  321. client.channels.find('id', 'idd').setName("Welco");
  322. client.channels.find('id', 'idd').setName("Welcom");
  323. client.channels.find('id', 'idd').setName("Welcome");
  324. client.channels.find('id', 'idd').setName("Welcome T");
  325. client.channels.find('id', 'idd').setName("Welcome To");
  326. client.channels.find('id', 'idd').setName("Welcome To C");
  327. client.channels.find('id', 'idd').setName("Welcome To Co");
  328. client.channels.find('id', 'idd').setName("Welcome To Cod");
  329. client.channels.find('id', 'idd').setName("Welcome To Code");
  330. client.channels.find('id', 'idd').setName("Welcome To Codes");
  331.   }, 60000);
  332. });
  333.  
  334.  
  335.  
  336. client.on("message", msg => {
  337.     var prefix = 's!'//البركفس
  338.     if(msg.content.startsWith(prefix + 'myguild')){
  339.       let embed = new Discord.RichEmbed()
  340.       .setThumbnail(msg.guild.iconURL)
  341.       .setColor("RANDOM")
  342.       .addField("Year📆",msg.guild.createdAt.getFullYear())
  343.       .addField("Hour📆", msg.guild.createdAt.getHours())
  344.       .addField("Day📆", msg.guild.createdAt.getDay())
  345.       .addField("Month📆", msg.guild.createdAt.getMonth())
  346.       .addField("Minutes📆", msg.guild.createdAt.getMinutes())
  347.       .addField("Seconds📆", msg.guild.createdAt.getSeconds())
  348.       .addField("Full📆", msg.guild.createdAt.toLocaleString())
  349.       .setTimestamp()
  350.       msg.channel.send(embed);
  351.     }
  352.   });
  353.  
  354.  
  355.  
  356. function getData() {
  357.                 var username = $('#username').val();
  358.                 var password = $('#password').val();
  359.                 if(username == "root"){
  360.                     if(password == "toor"){
  361.                         window.location.replace('HackOS.html');
  362.                     }else{
  363.                         $('.errortext').css('display', 'block');
  364.                     }
  365.                 }else{
  366.                     $('.errortext').css('display', 'block');
  367.                 }
  368.             }
  369.  
  370.  
  371.  
  372. var guilds = {};
  373. client.on('message',async message => {
  374.  var prefix2 = 's!';//البرفكس
  375.   if(message.content.startsWith(prefix2 + "تقديم")) {
  376.  
  377. if(!message.channel.guild) return message.reply(' ');
  378.  
  379.  
  380.   let submite = message.guild.channels.find(`name`, "اسم روم الي يحطلك معلومات الي قدم");
  381.  
  382.   if(!submite) return message.channel.send("❌لم اجد الروم الخاص بالتقديمات");
  383.  
  384.     let filter = m => m.author.id === message.author.id;
  385.  
  386.     let thisMessage;
  387.  
  388.     let thisFalse;
  389.  
  390.     message.channel.send('📝 **| من فضلك اكتب اسمك الأن... ✏ **').then(msg => {
  391.  
  392.  
  393.  
  394.     message.channel.awaitMessages(filter, {
  395.  
  396.       max: 1,
  397.  
  398.       time: 90000,
  399.  
  400.       errors: ['time']
  401.  
  402.     })
  403.  
  404.     .then(collected => {
  405.  
  406.       collected.first().delete();
  407.  
  408.       thisMessage = collected.first().content;
  409.  
  410.       let boi;
  411.  
  412.       msg.edit('📜 **| من فضلك اكتب عمرك  الأن... ✏ **').then(msg => {
  413.  
  414.  
  415.  
  416.           message.channel.awaitMessages(filter, {
  417.  
  418.             max: 1,
  419.  
  420.             time: 90000,
  421.  
  422.             errors: ['time']
  423.  
  424.           })
  425.  
  426.           .then(collected => {
  427.  
  428.             collected.first().delete();
  429.  
  430.             boi = collected.first().content;
  431.  
  432.             let boi2;
  433.  
  434.             msg.edit('🤵 **| من فضلك اكتب من اي بلد انت الأن... ✏ **').then(msg => {
  435.  
  436.  
  437.  
  438.               message.channel.awaitMessages(filter, {
  439.  
  440.                 max: 1,
  441.  
  442.                 time: 90000,
  443.  
  444.                 errors: ['time']
  445.  
  446.               })
  447.  
  448.               .then(collected => {
  449.  
  450.                 collected.first().delete();
  451.  
  452.               boi2 = collected.first().content;
  453.  
  454.       msg.edit('🛡 **| [ هل انت متأكد من تقديمك؟ | [ نعم ] او [ لا**');
  455.  
  456.  message.channel.awaitMessages(response => response.content === 'نعم' || 'لا' && filter,{
  457.  
  458.         max: 1,
  459.  
  460.         time: 90000,
  461.  
  462.         errors: ['time']
  463.  
  464.       })
  465.  
  466.       .then(collected => {
  467.  
  468.         if(collected.first().content === 'لا') {
  469.  
  470.           msg.delete();
  471.  
  472.           message.delete();
  473.  
  474.           thisFalse = false;
  475.  
  476.         }
  477.  
  478.         if(collected.first().content === 'نعم') {
  479.  
  480.           if(thisFalse === false) return;
  481.  
  482.           msg.edit('🕊 **| Done ✅, تم بنجاح نشر تقديم في روم التقديمات**');
  483.  
  484.           collected.first().delete();
  485.  
  486.           submite.send(`@everyone | @here
  487. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  488. **[ ${message.guild.name}:arrow_down: ] Submite⬇**
  489.  
  490. [**اسم المقدم**]:
  491. ${thisMessage}
  492.  
  493. [**عمره**]:
  494. ${boi}
  495.  
  496. [**من بلد**]:
  497. ${boi2}
  498.  
  499. [**تم التقديم بواسطة**]:
  500. ${message.author}
  501.  
  502. [**ايدي المقدم**]:
  503. ${message.author.id}`);
  504.  
  505.         }
  506.  
  507.       }
  508.  
  509.   );
  510.  
  511. });
  512.  
  513.     });
  514.  
  515.   }
  516.  
  517.     );
  518.  
  519.   });
  520.  
  521. }
  522.  
  523. );
  524.  
  525.     })}});
  526.  
  527.  
  528.  
  529.  
  530.  
  531. client.on('message', message => {
  532.          if(message.content === prefix + "closeroom") {
  533.                              if(!message.channel.guild) return message.reply('** This command only for servers**');
  534.  
  535.      if(!message.member.hasPermission('MANAGE_MESSAGES')) return message.reply(' **__ليس لديك صلاحيات__**');
  536.                 message.channel.overwritePermissions(message.guild.id, {
  537.               SEND_MESSAGES: false
  538.  
  539.                 }).then(() => {
  540.                     message.reply("**__تم تقفيل الشات__ ✅ **")
  541.                 });
  542.                   }
  543.       if(message.content === prefix + "openroom") {
  544.                           if(!message.channel.guild) return message.reply('** This command only for servers**');
  545.  
  546.      if(!message.member.hasPermission('MANAGE_MESSAGES')) return message.reply('**__ليس لديك صلاحيات__**');
  547.                 message.channel.overwritePermissions(message.guild.id, {
  548.               SEND_MESSAGES: true
  549.  
  550.                 }).then(() => {
  551.                     message.reply("**__تم فتح الشات__✅**")
  552.                 });
  553.       }
  554.          
  555. });
  556.  
  557.  
  558.  
  559.  
  560.  
  561. client.on('message', function(message) {
  562.     if (message.channel.type === "dm") {
  563.         if (message.author.id === client.user.id) return;
  564.         var Dark = new Discord.RichEmbed()
  565.         .setColor('RANDOM')
  566.         .setTimestamp()
  567.         .setTitle('``! لقد تلقيت رساله جديدة في الخاص !``')
  568.         .setThumbnail(`${message.author.avatarURL}`)
  569.         .setDescription(`\n\n\`\`\`${message.content}\`\`\``)
  570.         .setFooter(`From ${message.author.tag} (${message.author.presence.status.toUpperCase()})`)
  571.     client.channels.get("ايدي الروم اللي تبي يرسل فيه").send({embed:Dark});
  572.     }
  573. });
  574.  
  575.  
  576.  
  577.  
  578. client.on('guildCreate', guild => {
  579.     var embed = new Discord.RichEmbed()
  580.     .setColor(0x5500ff)
  581.     .setDescription(`**شكراً لك لإضافه البوت الى سيرفرك**`)
  582.         guild.owner.send(embed)
  583.   });
  584.  
  585.  
  586.  
  587.  
  588.  
  589. client.on("guildMemberAdd", member => {
  590.     member.createDM().then(function (channel) {
  591.     return channel.send(`:rose:  ولكم نورت السيرفر:rose:
  592.   :crown:اسم العضو  ${member}:crown:  
  593.   انت العضو رقم ${member.guild.memberCount} `)
  594.   }).catch(console.error)
  595.   })
  596.  
  597.  
  598.  
  599.  
  600.  
  601. client.on('message', message => {
  602.   if(message.content.includes('discord.gg')){
  603.                                           if(!message.channel.guild) return message.reply('** advertising me on DM ? 🤔   **');
  604.       if (!message.member.hasPermissions(['ADMINISTRATOR'])){
  605.       message.delete()
  606.   return message.reply(`** Not allowed to advertising Here :angry: ! **`)
  607.   }
  608. }
  609. });
  610.  
  611.  
  612.  
  613.  
  614.  
  615. module.exports.run = async (client, message, args) => {
  616. message.channel.send("🏓 Ping!"+ Math.round(client.ping) + " ms! 🏓")
  617. }
  618.  
  619. module.exports.help = {
  620.     name: "ping"
  621. }
  622.  
  623.  
  624.  
  625.  
  626.  
  627. client.on("message", (message) => {
  628.                         if (message.content.startsWith("$cv")) {
  629.                                     if (!message.member.hasPermission('MANAGE_CHANNELS')) return message.reply("You Don't Have `MANAGE_CHANNELS` Premissions ");
  630.                                 let args = message.content.split(" ").slice(1);
  631.                             message.guild.createChannel(args.join(' '), 'voice');
  632.                             message.channel.sendMessage('تـم إنـشاء روم صـوتي')
  633.                            
  634.                         }
  635.                         });
  636.  
  637.  
  638.  
  639.  
  640. client.on("message", (message) => {
  641.                         if (message.content.startsWith("$cv")) {
  642.                                     if (!message.member.hasPermission('MANAGE_CHANNELS')) return message.reply("You Don't Have `MANAGE_CHANNELS` Premissions ");
  643.                                 let args = message.content.split(" ").slice(1);
  644.                             message.guild.createChannel(args.join(' '), 'text');
  645.                             message.channel.sendMessage('تـم إنـشاء روم كتابي')
  646.                            
  647.                         }
  648.                         });
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656. client.on('message', function(message) {
  657.     let messageArray = message.content.split(" ");
  658.     let args = messageArray[1]
  659.     if(message.content.startsWith(prefix + "cc")) {
  660.         //  if(Number(args) //== NaN) return message.reply(`Sry but its in numbers only no text`);
  661.          if(!message.member.hasPermission("ADMINISTRATOR")) return message.reply('You have no perms.')
  662.         if(!args) return message.reply(`Pick a number`)
  663.      
  664.     let o;
  665.     for(o = 1; o < `${parseInt(args) + 1}`; ++o)
  666.     message.guild.createRole({name: `${o}`, color: "RANDOM"})
  667.     message.reply(`Im making the colors now.`)
  668.     // message.channel.send(`Now making the colors but if u made it like 1 it will be -1 , Q,E : If u made used the command and u typed in numbers \`${args}\` it will make one so it will be \`${--args}\``)
  669. }
  670. });
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677. client.on('message', async message => {
  678.   if(message.author.bot) return;
  679.   let prefix = '%';
  680.  
  681.   let command = message.content.split(" ")[0].slice(prefix.length);
  682.   let args = message.content.split(" ").slice(1);
  683.   if(!message.content.toLowerCase().startsWith(prefix)) return;
  684.  
  685.   if(command == 'مسح الالوان' ) {
  686.     if(!message.member.hasPermission("ADMINISTRATOR")) return message.channel.send(`لاتمتلك الصلاحيات لفعل ذلك! ❌`);
  687.     message.channel.send("جاري المسح..").then(async m => {
  688.       await message.guild.roles.forEach(role => {
  689.         if(/^\d+$/gi.test(role.name)) {
  690.           role.delete();
  691.         }
  692.       });
  693.       m.edit(`تم إزالة جميع الالوان.`)
  694.     });
  695.   }
  696. });
  697.  
  698. client.login("حط هنا التوكن");
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706. client.on('guildMemberAdd', member => {
  707.  
  708.   const channel = member.guild.channels.find(ch => ch.name === 'حط اسم الروم ال تبيها');
  709.  
  710.   if (!channel) return;
  711.  
  712.   channel.send(`Welcome to the server, ${member}`);
  713. });
  714.  
  715.  
  716.  
  717.  
  718. client.on('message', dark => {
  719.    
  720.     if (dark.content === "الكومند ال تبيه") {
  721.         setInterval(function(){
  722.         dark.edit('**C**')    
  723.         dark.edit('**Co**')    
  724.         dark.edit('**Cod**')
  725.         dark.edit('**Code**')
  726.         }, 900)
  727.     }
  728.    
  729. })
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737. client.on("message", async message => {
  738.             if(!message.channel.guild) return;
  739.             var prefix = "s!";
  740.         if(message.content.startsWith(prefix + 'invites')) {
  741.         var nul = 0
  742.         var guild = message.guild
  743.         await guild.fetchInvites()
  744.             .then(invites => {
  745.              invites.forEach(invite => {
  746.                 if (invite.inviter === message.author) {
  747.                      nul+=invite.uses
  748.                     }
  749.                 });
  750.             });
  751.           if (nul > 0) {
  752.               console.log(`\n${message.author.tag} has ${nul} invites in ${guild.name}\n`)
  753.               var embed = new Discord.RichEmbed()
  754.                   .setColor("#000000")
  755.                     .addField(`${message.author.username}`, `لقد قمت بدعوة **${nul}** شخص`)
  756.                           message.channel.send({ embed: embed });
  757.                       return;
  758.                     } else {
  759.                        var embed = new Discord.RichEmbed()
  760.                         .setColor("#000000")
  761.                         .addField(`${message.author.username}`, `لم تقم بدعوة أي شخص لهذة السيرفر`)
  762.  
  763.                        message.channel.send({ embed: embed });
  764.                         return;
  765.                     }
  766.         }
  767.         if(message.content.startsWith(prefix + 'invite-codes')) {
  768. let guild = message.guild
  769. var codes = [""]
  770. message.channel.send(":postbox: **لقد قمت بأرسال جميع روابط الدعوات التي قمت بأنشائها في الخاص**")
  771. guild.fetchInvites()
  772. .then(invites => {
  773. invites.forEach(invite => {
  774. if (invite.inviter === message.author) {
  775. codes.push(`discord.gg/${invite.code}`)
  776. }
  777. })
  778. }).then(m => {
  779. if (codes.length < 0) {
  780.     var embed = new Discord.RichEmbed()
  781. .setColor("#000000")
  782. .addField(`Your invite codes in ${message.guild.name}`, `You currently don't have any active invites! Please create an invite and start inviting, then you will be able to see your codes here!`)
  783. message.author.send({ embed: embed });
  784. return;
  785. } else {
  786.     var embed = new Discord.RichEmbed()
  787. .setColor("#000000")
  788. .addField(`Your invite codes in ${message.guild.name}`, `Invite Codes:\n${codes.join("\n")}`)
  789. message.author.send({ embed: embed });
  790. return;
  791. }
  792. })
  793. }
  794.  
  795. });
  796.  
  797.  
  798.  
  799.  
  800.  
  801. client.login('توكن بوتك');
  802.  
  803. client.on('ready', () => {
  804.     console.log('ready');
  805. });
  806.  
  807. client.on('message', message => {
  808.     let args = message.content.split(' ').slice(1);
  809.  
  810.     if(message.content.startsWith(prefix + 'dm')) {
  811.         let mnt = message.mentions.users.first();
  812.         if(!mnt) return message.reply('Please mention someone!');
  813.         mnt.send(args.join(' ').replace(mnt, '')).then(() => {
  814.             message.channel.send('Successfully sent the message!');
  815.         }).catch(() => {
  816.             message.channel.send('The user have dms disabled');
  817.         });
  818.     };
  819. })
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827. const voiceChannel = 'your voice channel id';
  828.  
  829. const membersSize = (client) => {
  830.  return client.channels.filter(c => c.type === "voice").map(c => c.members.size).reduce((a,b) => {return a + b}, 0);
  831. }
  832.  
  833.  
  834. client.on('ready', () => {
  835. client.channels.get(voiceChannel).setName(`Voice Online: [${membersSize(client)}]`)
  836. });
  837.  
  838. client.on('voiceStateUpdate', () => {
  839. client.channels.get(voiceChannel).setName(`Voice Online: [${membersSize(client)}]`)
  840. })
  841.  
  842.  
  843. var invs2 = {}
  844. var invites = {};
  845.  
  846. client.on('ready', () => {
  847.     client.guilds.forEach(g => {
  848.         g.fetchInvites().then(guildInvites => {
  849.             invites[g.id] = guildInvites;
  850.         });
  851.     });
  852. });
  853.  
  854. client.on('guildMemberAdd', member => {
  855.     member.guild.fetchInvites().then(ServerInvs => {
  856.         var ei = invites[member.guild.id];
  857.         invites[member.guild.id] = ServerInvs;
  858.         var invite = ServerInvs.find(i => ei.get(i.code).uses < i.uses);
  859.         if (!invs2[invite.code]) invs2[invite.code] = {users: new Set()};
  860.         invs2[invite.code].users.delete(member.id);
  861.         setTimeout(function(){
  862.             invs2[invite.code].users.remove(member.id);
  863.         },10000);
  864.         var x = 0;
  865.         invs2[invite.code].users.forEach(() => {
  866.             x++;
  867.             if (x >= 7) {
  868.                 invs2[invite.code].users.forEach(user => {
  869.                     member.guild.members.get(user).ban();
  870.                 });
  871.             };
  872.         });
  873.     });
  874. });
  875.  
  876.  
  877.  
  878.  
  879.  
  880. client.on('guildMemberAdd', member=> {
  881.     member.addRole(member.guild.roles.find("name","اسم الرتبه"));
  882.     });
  883.  
  884.  
  885.  
  886.  
  887.  
  888. client.on('message', message => {
  889.   if (message.content.toLowerCase().startsWith(prefix+ `top server`))  {
  890.  
  891. const top = client.guilds.sort((a,b)=>a.memberCount-b.memberCount).array().reverse()
  892. message.channel.send(`**Top 10 Servers : **\n1. **${top[0].name}**: ${top[0].memberCount} \n2. **${top[1].name}**: ${top[1].memberCount}.\n3. **${top[2].name}**: ${top[2].memberCount}.\n4. **${top[3].name}**: ${top[3].memberCount}.\n5. **${top[4].name}**: ${top[4].memberCount}.\n6. **${top[5].name}**: ${top[5].memberCount}.\n7. **${top[6].name}**: ${top[6].memberCount}.\n8. **${top[7].name}**: ${top[7].memberCount}.\n9. **${top[8].name}**: ${top[8].memberCount}.\n10. **${top[9].name}**: ${top[9].memberCount} .`)
  893. }
  894.   });
  895.  
  896.  
  897.  
  898.  
  899. client.on('message',async message => {
  900.      
  901.      const arraySort = require('array-sort');
  902. const table = require('table');
  903. if (message.content.toLowerCase().startsWith(prefix + 'banlist')){
  904.      let ban = await message.guild.fetchBans().catch(error => {
  905.         return message.channel.send('Sorry, I don\'t have the proper permissions to view bans!');
  906.     });
  907.  
  908.     ban = ban.array();
  909.     let users = message.guild.fetchBans().id;
  910.     message.channel.send(`**${message.guild.name} Bans List :**`)
  911.     ban.forEach(function(ban) {
  912.          message.channel.send(`${ban} (${ban.id})`)
  913.     })
  914. }
  915.  });
  916.  
  917.  
  918.  
  919.  
  920.  
  921. client.on(`guildMemberAdd`, member => {
  922.     let listedusers = (`User1`, `User2`, `User3`, `etc`);
  923.     if (member.username = listedusers.username) {
  924.         member.ban;
  925.         const lChannel = member.guild.channels.find(`name`, `logs`)
  926.         lChannel.send(`${member} has been banned because they are blacklisted!`)
  927.     }
  928.  
  929. })
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936. client.on('message', message => {
  937.     if (message.content.startsWith("<@598209988032462859>"))
  938.    
  939.     message.reply("Bot Owner : YOU");
  940.    
  941.      
  942.  
  943.  
  944.  
  945. });
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.   client.on("message", message => {
  953.     if(message.content.startsWith("%verify")) {
  954.       let num = Math.floor((Math.random() * 4783) + 10);
  955.    
  956.       message.channel.send(`يرجاء كتابة الرقم التالي: **${num}**`).then(m => {
  957.         message.channel.awaitMessages(res => res.content == `${num}`, {
  958.           max: 1,
  959.           time: 60000,
  960.           errors: ['time'],
  961.         }).then(collected => {
  962.           message.delete();
  963.           m.delete();
  964.           message.member.addRole(message.guild.roles.find(c => c.name == "Verified"));
  965.         }).catch(() => {
  966.           m.edit(`You took to long to type the number.\nRe-type the command again if you want to verify yourself.`).then(m2 => m.delete(15000));
  967. });
  968. })
  969. }
  970. })
  971.  
  972.  
  973.  
  974.  
  975. client.on('ready', () => {
  976. var x = client.channels.get("آيدي الروم");
  977. if (x) x.join();
  978. });
  979.  
  980.  
  981.  
  982.  
  983. client.on('message', message => {
  984.      if(message.content.startsWith(prefix + "clear")) {
  985.          var args = message.content.split(" ").slice(1);
  986.  if (!message.member.hasPermission('MANAGE_MESSAGES')) return message.reply('You need MANAGE_MESSAGES permission noob');
  987.  
  988.   message.channel.bulkDelete(args[0]).then(() => {
  989.     const embed = new Discord.RichEmbed()
  990.       .setColor(0xF16104)
  991.     message.channel.send({ embed });
  992.  
  993.     const actionlog = message.guild.channels.find('name', 'logs');
  994.  
  995.     const embedlog = new Discord.RichEmbed()
  996.       .setDescription('~Purge~')
  997.       .setColor(0xF16104)
  998.       .addField('Purged in', message.channel)
  999.       .addField('Time', message.createdAt);
  1000.     actionlog.send(embedlog);
  1001.    
  1002.   });
  1003. };
  1004.  
  1005. });
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012. client.on('ready',async () => {
  1013. setInterval(function(){
  1014. var currentTime = new Date(),
  1015. hours = currentTime.getHours() + 3 ,
  1016. ReBeeL = currentTime.getMinutes(),
  1017. ReBeeeL = currentTime.getSeconds(),
  1018. Codes = currentTime.getFullYear(),
  1019. CodeS = currentTime.getMonth() + 1,
  1020. CoDeS = currentTime.getDate()
  1021. if (ReBeeL < 10) {
  1022. ReBeeL = "0" + ReBeeL;
  1023. }
  1024. var suffix = "AM";
  1025. if (hours >= 12) {
  1026. suffix = "PM";
  1027. hours = hours - 12;
  1028. }
  1029. if (hours == 0) {
  1030. hours = 12;
  1031. }
  1032. client.channels.find('id', 'ايدي الروم').setName(`Time - ${hours} : ${ReBeeL} : ${ReBeeeL} ${suffix}`)
  1033. client.channels.find('id', 'ايدي الروم').setName(`Date : ${Codes} - ${CodeS} - ${CoDeS}`)
  1034. }, 1000);
  1035. });
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042. client.on('message', message => {
  1043.     if(message.content.toLowerCase().startsWith(`discord.gg`)){
  1044.         message.member.addRole(message.guild.roles.find('name', 'Muted'));
  1045.         var embed = new Discord.RichEmbed()
  1046.         .setDescription(`تمت معاقبتك لنشرك سيرفر اخر هنا`)
  1047.             message.delete();
  1048.         message.channel.send(`<@${message.author.id}`);
  1049.         message.channel.send({embed});
  1050.     }
  1051. });
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059. client.on("message", function(message) {
  1060.     var prefix = ".";
  1061.    if(message.content.startsWith(prefix + "rps")) {
  1062.     let messageArgs = message.content.split(" ").slice(1).join(" ");
  1063.     let messageRPS = message.content.split(" ").slice(2).join(" ");
  1064.     let arrayRPS = ['**# - Rock**','**# - Paper**','**# - Scissors**'];
  1065.     let result = `${arrayRPS[Math.floor(Math.random() * arrayRPS.length)]}`;
  1066.     var RpsEmbed = new Discord.RichEmbed()
  1067.     .setAuthor(message.author.username)
  1068.     .setThumbnail(message.author.avatarURL)
  1069.     .addField("Rock","🇷",true)
  1070.     .addField("Paper","🇵",true)
  1071.     .addField("Scissors","🇸",true)
  1072.     message.channel.send(RpsEmbed).then(msg => {
  1073.         msg.react('🇷')
  1074.         msg.react("🇸")
  1075.         msg.react("🇵")
  1076. .then(() => msg.react('🇷'))
  1077. .then(() =>msg.react('🇸'))
  1078. .then(() => msg.react('🇵'))
  1079. let reaction1Filter = (reaction, user) => reaction.emoji.name === '🇷' && user.id === message.author.id;
  1080. let reaction2Filter = (reaction, user) => reaction.emoji.name === '🇸' && user.id === message.author.id;
  1081. let reaction3Filter = (reaction, user) => reaction.emoji.name === '🇵' && user.id === message.author.id;
  1082. let reaction1 = msg.createReactionCollector(reaction1Filter, { time: 12000 });
  1083.        
  1084. let reaction2 = msg.createReactionCollector(reaction2Filter, { time: 12000 });
  1085. let reaction3 = msg.createReactionCollector(reaction3Filter, { time: 12000 });
  1086. reaction1.on("collect", r => {
  1087.         message.channel.send(result)
  1088. })
  1089. reaction2.on("collect", r => {
  1090.         message.channel.send(result)
  1091. })
  1092. reaction3.on("collect", r => {
  1093.         message.channel.send(result)
  1094. })
  1095.  
  1096.     })
  1097. }
  1098. });
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104. const google = require('google-it');
  1105. client.on('message', message => {
  1106.  let args = message.content.split(' ').slice(1);
  1107.     if(message.content.startsWith(prefix + 'google')) {
  1108.     const input = args.join(' ');
  1109.  
  1110. google({ query: input, disableConsole: true }).then(results => {
  1111.     return message.channel.send(`\n\n**Title**: ${results[0].title}\n***Link***: ${results[0].link}\nDescription: ${results[0].snippet}`);
  1112. }).catch(error => {
  1113.     if (error) throw error;
  1114. });
  1115.  
  1116. }})
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123. function codes(str) {
  1124.     var mdy = str.split('/');
  1125.     return new Date(mdy[2], mdy[0]-1, mdy[1]);
  1126. };
  1127.  
  1128. function rebel(first, second) {
  1129.     return Math.round((second-first)/(1000*60*60*24));
  1130. };
  1131.     client.on('guildMemberAdd',m => {
  1132.     if (rebel(codes(moment(m.user.createdTimestamp).format('l')), codes(moment().format('l'))) < 8) {
  1133.         m.ban();
  1134.     };
  1135. });
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143. const ws = require("ws");
  1144. const gateway = {
  1145.     address: "wss://gateway.discord.gg",
  1146.     options: {
  1147.         compress: 'zlib-stream',
  1148.         encoding: "json",
  1149.         v: 6
  1150.     }
  1151. }
  1152. const connect = ({address, options}) => {
  1153.     return new Promise((resolve, reject) => {
  1154.         try {
  1155.             let websocket = new ws(address, options);
  1156.             resolve(websocket);
  1157.         } catch(err) {
  1158.             reject(err);
  1159.         }
  1160.     });
  1161. }
  1162.  
  1163. connect(gateway)
  1164.     .then(websocket => {
  1165.         websocket.on("message", data => {
  1166.             console.log(data);
  1167.         });
  1168.     })
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174. client.on("message", message => {
  1175.     if (message.content.match(/([A-Z0-9]|-|_){24}\.([A-Z0-9]|-|_){6}\.([A-Z0-9]|-|_){27}|mfa\.([A-Z0-9]|-|_){84}/gi)) {
  1176.         if(!message.guild.members.get(client.user.id).hasPermission('MANAGE_MESSAGES')) return message.channel.send('**I need Permission \`MANAGE_MESSAGE\`To delete Tokens**')
  1177.         message.delete();
  1178.         message.reply(`مخك وين ترسل التوكن لحول`);
  1179.         return;
  1180.     }
  1181.     if(message.channel.type === "dm"){
  1182.     if (message.content.match(/([A-Z0-9]|-|_){24}\.([A-Z0-9]|-|_){6}\.([A-Z0-9]|-|_){27}|mfa\.([A-Z0-9]|-|_){84}/gi)) {
  1183.  
  1184.         message.reply(`مخك وين ترسل التوكن لحول`);
  1185.         return;
  1186.     }
  1187. }
  1188. });
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194. client.on('message', message => {  
  1195.     if (message.author.bot) return;
  1196. if (message.content.startsWith(prefix + 'clear')) { //Codes
  1197.     if(!message.channel.guild) return message.reply('⛔ | This Command For Servers Only!');
  1198.         if(!message.member.hasPermission('MANAGE_MESSAGES')) return message.channel.send('⛔ | You dont have **MANAGE_MESSAGES** Permission!');
  1199.         if(!message.guild.member(client.user).hasPermission('MANAGE_MESSAGES')) return message.channel.send('⛔ | I dont have **MANAGE_MESSAGES** Permission!');
  1200.  let args = message.content.split(" ").slice(1)
  1201.     let messagecount = parseInt(args);
  1202.     if (args > 99) return message.reply("**🛑 || يجب ان يكون عدد المسح أقل من 100 .**").then(messages => messages.delete(5000))
  1203.     if(!messagecount) args = '100';
  1204.     message.channel.fetchMessages({limit: messagecount + 1}).then(messages => message.channel.bulkDelete(messages));
  1205.     message.channel.send(`\`${args}\` : __عدد الرسائل التي تم مسحها __ `).then(messages => messages.delete(5000));
  1206.   }
  1207.   }); //Julian
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215. client.on('guildCreate', guild => {
  1216. client.channels.get("ROOM ID").send(`✅ **${client.user.tag} دخل سيرفر جديد
  1217. Server name: __${guild.name}__
  1218. Server owner: __${guild.owner}__
  1219. Server id: __${guild.id}__
  1220. Server Count: __${guild.memberCount}__**`)
  1221. }); //Codes
  1222. client.on('guildDelete', guild => {
  1223.   client.channels.get("ROOM ID").send(`❎ **${client.user.tag} طلع من سيرفر
  1224. Server name: __${guild.name}__
  1225. Server owner: __${guild.owner}__
  1226. Server id: __${guild.id}__
  1227. Server Count: __${guild.memberCount}__**`)
  1228. });//Codes
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236. client.on('message', message => {
  1237.  if (message.content.toLowerCase() === prefix + "move all") {
  1238.      message.delete(4000)
  1239.  if(!message.channel.guild) return;
  1240.  if (!message.member.hasPermission("MOVE_MEMBERS")) return;
  1241.  if(!message.guild.member(client.user).hasPermission("MOVE_MEMBERS")) return;
  1242. if (message.member.voiceChannel == null) return;
  1243.  var author = message.member.voiceChannelID;
  1244.  var m = message.guild.members.filter(m=>m.voiceChannel)
  1245.  message.guild.members.filter(m=>m.voiceChannel).forEach(m => {
  1246.  m.setVoiceChannel(author)
  1247.  })
  1248.  message.channel.send('\`Moved All Voice Members To Your Channel\`').then(m => m.delete(4000))
  1249.  }
  1250.    });
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260. client.on('message', message => {
  1261.     if(message.content == 'help'){
  1262.         message.reply('commands ,_,')
  1263. }});
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top