Advertisement
n3k4a

AD code by n3k4a -

Jun 13th, 2019
898
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. client.on('message' , async message => {
  2. if(message.content.startsWith(prefix + "ads")) { //Toxic Codes
  3. await message.channel.send("`ارسال الرساله .`").then(e => { //Toxic Codes
  4. let filter = m => m.author.id === message.author.id
  5. let tests = '';
  6. let time = '';
  7. let channel = '';
  8. let chaTests = message.channel.awaitMessages(filter, { max: 1, time: 30000, errors: ['time'] })
  9. .then(collected => {
  10. tests = collected.first().content
  11. collected.first().delete()
  12. e.edit("`تكرار الرساله كل ....... دقائق`")
  13. let chaTime = message.channel.awaitMessages(filter, { max: 1, time: 30000, errors: ['time'] })//Toxic Codes
  14. .then(co => {
  15. if(isNaN(co.first().content)) return message.reply("`الوقت بالدقائق ! ارقام فقطٍ`");//Toxic Codes
  16. if(co.first().content > 1500 || co.first().content < 1) return message.channel.send("`لا اقل من دقيقه ولا اكثر من يوم`") //Toxic Codes
  17. time = co.first().content
  18. co.first().delete()
  19. e.edit("`ادخل اسم الروم`") //Toxic Codes
  20. let chaChannel = message.channel.awaitMessages(filter, { max: 1, time: 30000, errors: ['time'] }) //Toxic Codes
  21. .then(col => { //Toxic Codes
  22. channel = col.first().content
  23. col.first().delete()
  24. e.edit("`جاري اعداد المعلومات الرجاء الانتظاار...`").then(b => { //Toxic Codes
  25. setTimeout(() => {
  26. b.edit(`** تم اعداد المعلومات بنجاح .**`)
  27. },2000);
  28. })
  29. var room = message.guild.channels.find('name' , channel) //Toxic Codes
  30. if(!room) return;
  31. if (room) {
  32. setInterval(() => {
  33. room.send(tests);
  34. }, time*60000)
  35. }
  36. }) //Toxic Codes
  37. })
  38. }) //Toxic Codes
  39.  
  40. })
  41. }
  42. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement