SHARE
TWEET

Untitled

a guest Mar 21st, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. client.on('message', message => { // هاذا للبرودكسات
  2.         var prefix = '§'; // هنا تقدر تغير البرفكس
  3.     var command = message.content.split(" ")[0];
  4.     if(command == prefix + 'bc') { // الكوماند !bc
  5.         if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.channel.send("You don`t have **MANAGE_MESSAGES** permission!");
  6.         var args = message.content.split(' ').slice(1).join(' ');
  7.         if(message.author.bot) return;
  8.         if(!args) return message.channel.send(`**➥ Useage:** ${prefix}bc كلامك`);
  9.         if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.channel.send("You don`t have **MANAGE_MESSAGES** permission!");
  10.        
  11.         let bcSure = new Discord.RichEmbed()
  12.         .setTitle(`:mailbox_with_mail: **هل انت متأكد انك تريد ارسال رسالتك الى** ${message.guild.memberCount} **عضو**`)
  13.         .setThumbnail(client.user.avatarURL)
  14.         .setColor('RANDOM')
  15.         .setDescription(`**\n:envelope: ➥ رسالتك**\n\n${args}`)
  16.         .setTimestamp()
  17.         .setFooter(message.author.tag, message.author.avatarURL)
  18.        
  19.         message.channel.send(bcSure).then(msg => {
  20.             msg.react('✅').then(() => msg.react('❎'));
  21.             message.delete();
  22.            
  23.            
  24.             let yesEmoji = (reaction, user) => reaction.emoji.name === '✅'  && user.id === message.author.id;
  25.             let noEmoji = (reaction, user) => reaction.emoji.name === '❎' && user.id === message.author.id;
  26.            
  27.             let sendBC = msg.createReactionCollector(yesEmoji);
  28.             let dontSendBC = msg.createReactionCollector(noEmoji);
  29.            
  30.             sendBC.on('collect', r => {
  31.                         message.guild.members.forEach(m => {
  32.    if(!message.member.hasPermission('ADMINISTRATOR')) return;
  33.             var bc = new Discord.RichEmbed()
  34.             .addField('» السيرفر :', `${message.guild.name}`)
  35.             .addField('» المرسل : ', `${message.author.username}#${message.author.discriminator}`)
  36.             .addField(' » الرسالة : ', args)
  37.         .addField(`Coded By`,`LioN_Dz`)
  38.             .setColor('#ff0000')
  39.             // m.send(`[${m}]`);
  40.             m.send(`${m}`,{embed: bc});
  41.         });
  42.                 message.channel.send(`:timer: **يتم الان الارسال الى** \`\`${message.guild.memberCount}\`\` **عضو**`).then(msg => msg.delete(5000));
  43.                 msg.delete();
  44.             })
  45.             dontSendBC.on('collect', r => {
  46.                 msg.delete();
  47.                 message.reply(':white_check_mark: **تم الغاء ارسال رسالتك بنجاح**').then(msg => msg.delete(5000));
  48.  
  49.        
  50.             });
  51.         })
  52.     }
  53. });
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