Advertisement
iBeAnthonyD

speed games

Mar 8th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const speed = [
  2.     {
  3.             "type": "https://cdn.discordapp.com/attachments/429298913980317696/429298994078810127/a90c6b270eb8bb2e.png",
  4.         "answers": ["البرازيل"]
  5.     },
  6.     {
  7.             "type": "https://cdn.discordapp.com/attachments/429298913980317696/429298996385677312/93b0c6f963ca78cc.png",
  8.         "answers": ["السعودية"]
  9.     },
  10.     {
  11.             "type": "https://cdn.discordapp.com/attachments/429298913980317696/429298996130086934/341960d3e3e1daad.png",
  12.         "answers": ["القسطنطينية"]
  13.     },
  14.     {
  15.             "type": "https://cdn.discordapp.com/attachments/429298913980317696/429298998172450816/5c70f0d2a02f741a.png",
  16.         "answers": ["النهاية"]
  17.     },
  18.     {
  19.             "type": "https://cdn.discordapp.com/attachments/429298913980317696/429298999799971860/00c3e44857da1d4f.png",
  20.         "answers": ["امازون"]
  21.     },
  22.     {
  23.             "type": "https://cdn.discordapp.com/attachments/429298913980317696/429299000026595338/56ca5f3803361aaf.png",
  24.         "answers": ["جافاسكربت"]
  25.     },
  26.     {
  27.             "type": "https://cdn.discordapp.com/attachments/429298913980317696/429299000676581382/426f82fc46406cf9.png",
  28.         "answers": ["سهله مو صعبه"]
  29.     },
  30.     {
  31.             "type": "https://cdn.discordapp.com/attachments/429298913980317696/429299005474996255/7ec6030fe3423458.png",
  32.         "answers": ["طبق رطب مرق بقر"]
  33.     },
  34.     {
  35.             "type": "https://cdn.discordapp.com/attachments/429298913980317696/429299005458087936/fd790725b7496d35.png",
  36.         "answers": ["متجر"]
  37.           },
  38.     {
  39.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330177894645780/7a11f3f73c1df90d.png",
  40.         "answers": ["شجرة الأوغيري"]
  41.           },
  42.     {
  43.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330188162301952/a5d4f8c72362aa3f.png",
  44.         "answers": ["عش العصفور"]
  45.           },
  46.     {
  47.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330194587713554/c5b6b7bad08671a9.png",
  48.         "answers": ["قم بكتابة"]
  49.           },
  50.     {
  51.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330199838982152/1e05423a0b91fdaa.png",
  52.         "answers": ["كانيكي"]
  53.           },
  54.     {
  55.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330207711690762/39a6a460c6211b5d.png",
  56.         "answers": ["ليوبليانا"]
  57.           },
  58.     {
  59.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330217971089418/e5e323d8e8ce00ad.png",
  60.         "answers": ["هواوي"]
  61.           },
  62.     {
  63.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330229140652032/2419fe025b8b35f2.png",
  64.         "answers": ["يوم الخميس"]
  65.           },
  66.     {
  67.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330238330241044/DO_YOU_KNOW_THE_WAY.png",
  68.         "answers": ["DO YOU KNOW THE WAY"]
  69.           },
  70.     {
  71.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330246840483842/23dc3a67e7bedc9e.png",
  72.         "answers": ["الأرض"]
  73.           },
  74.     {
  75.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330256256827414/9f90c0fcbfc60a0d.png",
  76.         "answers": ["البوابة"]
  77.           },
  78.     {
  79.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330261663285259/0e41e6dcefc80cd3.png",
  80.         "answers": ["الجمل ابو راسين"]
  81.           },
  82.     {
  83.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330264901287946/6459ace62733c477.png",
  84.         "answers": ["الحوت الأزرقء"]
  85.           },
  86.     {
  87.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330272920797226/de084748fdbe524b.png",
  88.         "answers": ["القارب المكسور"]
  89.           },
  90.     {
  91.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330281372057622/bcae99355befcd06.png",
  92.         "answers": ["المدرسة"]
  93.           },
  94.     {
  95.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330289769054230/c030902a9d21637c.png",
  96.         "answers": ["اليابان"]
  97.           },
  98.     {
  99.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330298585481218/2ca3d0f29283cced.png",
  100.         "answers": ["بلايستايشن"]
  101.           },
  102.     {
  103.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330311558725632/6dc92ab82d3df0e4.png",
  104.         "answers": ["جزر القمر"]
  105.           },
  106.     {
  107.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330312842182657/f50f4fab4b6559c0.png",
  108.         "answers": ["حشيش"]
  109.           },
  110.     {
  111.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429932988625584139/3333333.png",
  112.         "answers": ["سوبراشي"]
  113.           },
  114.     {
  115.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429932994351071233/3333333.png",
  116.         "answers": ["قوتشي"]
  117.           },
  118.     {
  119.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933002399940609/3333333.png",
  120.         "answers": ["ايفون"]
  121.           },
  122.     {
  123.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933012164149249/3333333.png",
  124.         "answers": ["تيستا لاغوسا"]
  125.  
  126.           },
  127.     {
  128.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933033009840129/3333333.png",
  129.         "answers": ["بسكوت ابو ولد"]
  130.           },
  131.     {
  132.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933041033674753/3333333.png",
  133.         "answers": ["تكأكأتم"]
  134.           },
  135.     {
  136.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933050139246592/3333333.png",
  137.         "answers": ["الجملة المفيدة"]
  138.           },
  139.     {
  140.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933059278635028/204ba71fbee91a03.png",
  141.         "answers": ["الأوسكار"]
  142.           },
  143.     {
  144.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040573269901332/3333333.png",
  145.         "answers": ["كنت امشي وأمشي"]
  146.  
  147.           },
  148.     {
  149.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040585357754368/3333333.png",
  150.         "answers": ["لااااق بوتء"]
  151.  
  152.           },
  153.     {
  154.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040593595629568/3333333.png",
  155.         "answers": ["ابو ناصر سرى ليله"]
  156.  
  157.           },
  158.     {
  159.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040602235895810/fghfghfgh.png",
  160.         "answers": ["عدد اللي برمجوني 2"]
  161.  
  162.           },
  163.     {
  164.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040608825147412/hhhhyyrf87654.png",
  165.         "answers": ["Dark_Neet"]
  166.  
  167.           },
  168.     {
  169.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040611819749387/354d9e28fd1264f5.png",
  170.         "answers": ["بابا سنفور متعاطي"]
  171.  
  172.               },
  173.     {
  174.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040619331878922/4b24f4792476c04f.png",
  175.         "answers": ["ميرندا حمضيات يلد"]
  176.  
  177.               },
  178.     {
  179.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040624603987968/5ff29b1066a3b9c7.png",
  180.         "answers": ["هل الدمع من عينه"]
  181.  
  182.               },
  183.     {
  184.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040631885299722/77f33951be682d8f.png",
  185.         "answers": ["طارت الطياره طارت"]
  186.  
  187.               },
  188.     {
  189.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040640928219136/29c240679c04c148.png",
  190.         "answers": ["أنا فوق راسي ريشه"]
  191.  
  192.               },
  193.     {
  194.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040652542246912/bbcb4aa9853bf1d2.png",
  195.         "answers": ["فريق النجمة"]
  196.  
  197.               },
  198.     {
  199.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040659437813780/69df1a1ea78bf05c.png",
  200.         "answers": ["خالد عبدالرحمن"]
  201.  
  202.               },
  203.     {
  204.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040666895024128/8bc7742b95673c38.png",
  205.         "answers": ["حبيت مره من قلبي"]
  206.  
  207.               },
  208.     {
  209.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040674067546113/9d1a9eee36622271.png",
  210.         "answers": ["كرستيانو يزق"]
  211.  
  212.               },
  213.     {
  214.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040682913333248/f19a97c10ac739e1.png",
  215.         "answers": ["أنت قمر يا قمر"]
  216.  
  217.               },
  218.     {
  219.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040692140539904/0a25039aa164a42b.png",
  220.         "answers": ["انا اجمل مخلوق"]
  221.  
  222.               },
  223.     {
  224.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040699317256192/da72e3e3fe6bfceb.png",
  225.         "answers": ["دونت تاتش"]
  226.  
  227.               },
  228.     {
  229.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040706464350218/d6339ed123a20afe.png",
  230.         "answers": ["توم وجيري"]
  231.  
  232.               },
  233.     {
  234.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040714588454912/965f8266e9501b35.png",
  235.         "answers": ["دباب اربع كفرات"]
  236.  
  237.               },
  238.     {
  239.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040721601331211/ae8cf2598c441e76.png",
  240.         "answers": ["القرش الأسودد"]
  241.  
  242.               },
  243.     {
  244.    
  245.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040729637748747/bf76692d54e6a0dd.png",
  246.         "answers": ["ددسن موديل 85"]
  247.  
  248.     },
  249.     {
  250.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040736835043341/e66ff909a6330b13.png",
  251.         "answers": ["الحارثيء"]
  252.  
  253.     },
  254.     {
  255.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040746503176194/351af3b19fc53323.png",
  256.         "answers": ["عزازي مسرع"]
  257.  
  258.     },
  259.     {
  260.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040751557181440/6777776666.png",
  261.         "answers": ["جاكي شاان"]
  262.  
  263.     },
  264.     {
  265.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040758108684289/2613844efcb8b05b.png",
  266.         "answers": ["دارك نت"]
  267.  
  268.     },
  269.     {
  270.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040765671014401/c89aa167715a85b9.png",
  271.         "answers": ["فانتاستيك"]
  272.  
  273.     },
  274.     {
  275.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040778467835924/9dff572a5bf1b602.png",
  276.         "answers": ["اكس بوكس يلد"]
  277.  
  278.         },
  279.     {
  280.             "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040783228370964/91ebb70e0dd936be.png",
  281.         "answers": ["بكسل يالوصخخ"]
  282.  
  283.     }
  284. ];
  285.  
  286. client.on('message', message => {
  287. if (!points[message.author.id]) points[message.author.id] = {
  288.     points: 0,
  289.   };
  290.   if(!message.guild) return;
  291.     let id = message.author.id,prefix="s!";
  292.     if (speed[id] && (new Date).getTime() - speed[id] < 15*1000) {
  293.         let r = (new Date).getTime() - speed[id];
  294.         r = 15*1000 - r;
  295.     }
  296.     if ( message.content == prefix+'speed'){
  297.        
  298.         try{
  299. }catch(e){
  300.  
  301. }
  302.  
  303.     if(!message.channel.guild) return message.reply('**هذا الأمر للسيرفرات فقط**').then(m => m.delete(3000));
  304.  
  305.  
  306. const item = speed[Math.floor(Math.random() * speed.length)];
  307. const filter = response => {  
  308.     return item.answers.some(answer => answer.toLowerCase() === response.content.toLowerCase());
  309. };
  310. message.channel.send('**Game is Start now...!**').then(msg => {
  311.  
  312.  const embed = new Discord.RichEmbed()
  313.  .setColor("0054dd")
  314.      .setAuthor(`⏳ |You have »15« seconds to type the word`)
  315.           .setImage(`${item.type}`)
  316.  .setFooter(`${message.author.tag}`, message.author.avatarURL)
  317.  
  318.  
  319.          
  320. msg.channel.send(embed).then(() => {
  321.         message.channel.awaitMessages(filter, { maxMatches: 1, time: 15000, errors: ['time'] })
  322.         .then((collected) => {
  323.                   const sh = new Discord.RichEmbed()
  324.   .setColor("04791c")
  325. .setDescription('**✅ |Good Job +1P**')
  326. .addField('Type $mypoints', 'To Show ur Points' , true)
  327. .setFooter(message.author.username, message.author.avatarURL)
  328. message.channel.sendEmbed(sh);
  329.             let won = collected.first().author; // في هذا السطر يقوم الكود بسحب الأي دي الذي قام بالأجابة اولاً
  330.             points[won.id].points++;
  331.           })
  332.           .catch(collected => { // في حال لم يقم أحد بالإجابة
  333.             message.channel.send(`🔚 |**Time Is End**`);
  334.           })
  335.           fs.writeFile("./points.json", JSON.stringify(points), (err) => {
  336.     if (err) console.error(err)
  337.           })
  338.         })
  339.     })
  340.     speed[id] = (new Date).getTime()
  341. }
  342. });
  343. client.on('message', message => {
  344. if (message.content.startsWith(prefix + 'mypoints')) {
  345.     if(!message.channel.guild) return message.reply('**هذا الأمر للسيرفرات فقط**').then(m => m.delete(3000));
  346.     let userData = points[message.author.id];
  347.     let embed = new Discord.RichEmbed()
  348.     .setAuthor(`${message.author.tag}`, message.author.avatarURL)
  349.     .setColor('#000000')
  350.     .setDescription(`نقاطك: \`${userData.points}\``)
  351.     message.channel.sendEmbed(embed)
  352.   }
  353.   fs.writeFile("./points.json", JSON.stringify(points), (err) => {
  354.     if (err) console.error(err)
  355.   })
  356. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement