gaber-elsayed

ahrz (JS)

Feb 1st, 2020
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. var spee={};
  2. var fox="$";
  3. let pointsfox= {}
  4. const foxt = [
  5. {
  6. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055751447773195/bandicam_2019-07-16_14-38-25-841.jpg",
  7. "answers": ["البرازيل"]
  8. },
  9. {
  10. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055755080302593/bandicam_2019-07-17_17-14-28-589.jpg",
  11. "answers": ["بلجيكا"]
  12. },
  13. {
  14. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055760180576276/bandicam_2019-07-17_17-15-04-686.jpg",
  15. "answers": ["فرنسا"]
  16. },
  17. {
  18. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055761467965452/bandicam_2019-07-17_17-15-42-926.jpg",
  19. "answers": ["كرواتيا"]
  20. },
  21. {
  22. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055764542390287/bandicam_2019-07-17_17-16-28-291.jpg",
  23. "answers": ["برتغال"]
  24. },
  25. {
  26. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055766576889863/bandicam_2019-07-17_17-16-42-901.jpg",
  27. "answers": ["سنغال"]
  28. },
  29. {
  30. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055769399525394/bandicam_2019-07-17_17-16-57-102.jpg",
  31. "answers": ["سعودية"]
  32. },
  33. {
  34. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055772377350165/bandicam_2019-07-17_17-17-17-663.jpg",
  35. "answers": ["المانيا"]
  36. },
  37. {
  38. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055773421862913/bandicam_2019-07-17_17-17-37-828.jpg",
  39. "answers": ["المكسيك"]
  40. },
  41. {
  42. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055773761732619/bandicam_2019-07-17_17-17-52-326.jpg",
  43. "answers": ["ارغواي"]
  44. },
  45. {
  46. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055830451683359/bandicam_2019-07-17_17-18-00-272.jpg",
  47. "answers": ["صربيا"]
  48. },
  49. {
  50. "type": "https://cdn.discordapp.com/attachments/576512197275156502/601055832704155658/bandicam_2019-07-17_17-18-20-074.jpg",
  51. "answers": ["مصر"]
  52.  
  53. }
  54. ];
  55.  
  56. client.on('message', foxm => {
  57. if (!pointsfox[foxm.author.id]) pointsfox[foxm.author.id] = { ///By KillerFox and MEDSPORT
  58. points: 0,
  59. };
  60. if(!foxm.guild) return;
  61. let id = foxm.author.id
  62. if (spee[id] && (new Date).getTime() - spee[id] < 15*1000) { ///By KillerFox and MEDSPORT
  63. let r = (new Date).getTime() - spee[id];
  64. r = 15*1000 - r;
  65. foxm.channel.send(`**Sorry, Please Wait ${pretty(r, {verbose:true})}...**`).then(m => m.delete(5000));
  66. return;
  67. }
  68. if ( foxm.content == fox+'احزر'){
  69.  
  70. try{
  71. }catch(e){ ///By KillerFox and MEDSPORT
  72.  
  73. }
  74.  
  75. if(!foxm.channel.guild) return foxm.reply('**هذا الأمر للسيرفرات لا تستعملة بالخاص لا تكررة بعد تمام**').then(m => m.delete(3000)); ///By KillerFox and MEDSPORT
  76.  
  77.  
  78. const foxitem = foxt[Math.floor(Math.random() * foxt.length)];
  79. const foxfilter = response => {
  80. return foxitem.answers.some(answer => answer.toLowerCase() === response.content.toLowerCase());
  81. };
  82. foxm.channel.send('**بدات اللعبة**').then(msg => {
  83.  
  84. const embeda7zr = new Discord.RichEmbed()
  85. .setColor("RANDOM")
  86. .setAuthor(`اكتب اجابة صحيحة لديك 15 ثانية`)
  87. .setImage(`${foxitem.type}`)
  88. .setFooter(`${foxm.author.tag}`, foxm.author.avatarURL) ///By KillerFox and MEDSPORT
  89.  
  90.  
  91.  
  92. foxm.channel.send(embeda7zr).then(() => {
  93. foxm.channel.awaitMessages(foxfilter, { maxMatches: 1, time: 15000, errors: ['time'] })
  94. .then((collected) => {
  95. const foxyembed = new Discord.RichEmbed()
  96. .setColor("RANDOM")
  97. .setDescription('** احسنت حصلت علئ نقطة**') ///By KillerFox and MEDSPORT
  98. .setFooter(`${collected.first().author}`)
  99. foxm.channel.sendEmbed(foxyembed);
  100. let won = collected.first().author;
  101. pointsfox[won.id].points++; ///By KillerFox and MEDSPORT
  102. })
  103. .catch(collected => {
  104. foxm.channel.send(`:x: |**هلص الموقت لا تستسلم**`);
  105. })
  106. })
  107. })
  108. spee[id] = (new Date).getTime()
  109.  
  110.  
  111. }
  112. });
Advertisement
Add Comment
Please, Sign In to add comment