Advertisement
Guest User

Untitled

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