Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const speed = [
- {
- "type": "https://cdn.discordapp.com/attachments/429298913980317696/429298994078810127/a90c6b270eb8bb2e.png",
- "answers": ["البرازيل"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429298913980317696/429298996385677312/93b0c6f963ca78cc.png",
- "answers": ["السعودية"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429298913980317696/429298996130086934/341960d3e3e1daad.png",
- "answers": ["القسطنطينية"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429298913980317696/429298998172450816/5c70f0d2a02f741a.png",
- "answers": ["النهاية"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429298913980317696/429298999799971860/00c3e44857da1d4f.png",
- "answers": ["امازون"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429298913980317696/429299000026595338/56ca5f3803361aaf.png",
- "answers": ["جافاسكربت"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429298913980317696/429299000676581382/426f82fc46406cf9.png",
- "answers": ["سهله مو صعبه"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429298913980317696/429299005474996255/7ec6030fe3423458.png",
- "answers": ["طبق رطب مرق بقر"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429298913980317696/429299005458087936/fd790725b7496d35.png",
- "answers": ["متجر"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330177894645780/7a11f3f73c1df90d.png",
- "answers": ["شجرة الأوغيري"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330188162301952/a5d4f8c72362aa3f.png",
- "answers": ["عش العصفور"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330194587713554/c5b6b7bad08671a9.png",
- "answers": ["قم بكتابة"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330199838982152/1e05423a0b91fdaa.png",
- "answers": ["كانيكي"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330207711690762/39a6a460c6211b5d.png",
- "answers": ["ليوبليانا"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330217971089418/e5e323d8e8ce00ad.png",
- "answers": ["هواوي"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330229140652032/2419fe025b8b35f2.png",
- "answers": ["يوم الخميس"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330238330241044/DO_YOU_KNOW_THE_WAY.png",
- "answers": ["DO YOU KNOW THE WAY"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330246840483842/23dc3a67e7bedc9e.png",
- "answers": ["الأرض"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330256256827414/9f90c0fcbfc60a0d.png",
- "answers": ["البوابة"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330261663285259/0e41e6dcefc80cd3.png",
- "answers": ["الجمل ابو راسين"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330264901287946/6459ace62733c477.png",
- "answers": ["الحوت الأزرقء"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330272920797226/de084748fdbe524b.png",
- "answers": ["القارب المكسور"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330281372057622/bcae99355befcd06.png",
- "answers": ["المدرسة"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330289769054230/c030902a9d21637c.png",
- "answers": ["اليابان"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330298585481218/2ca3d0f29283cced.png",
- "answers": ["بلايستايشن"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330311558725632/6dc92ab82d3df0e4.png",
- "answers": ["جزر القمر"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429330312842182657/f50f4fab4b6559c0.png",
- "answers": ["حشيش"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429932988625584139/3333333.png",
- "answers": ["سوبراشي"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429932994351071233/3333333.png",
- "answers": ["قوتشي"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933002399940609/3333333.png",
- "answers": ["ايفون"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933012164149249/3333333.png",
- "answers": ["تيستا لاغوسا"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933033009840129/3333333.png",
- "answers": ["بسكوت ابو ولد"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933041033674753/3333333.png",
- "answers": ["تكأكأتم"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933050139246592/3333333.png",
- "answers": ["الجملة المفيدة"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/429933059278635028/204ba71fbee91a03.png",
- "answers": ["الأوسكار"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040573269901332/3333333.png",
- "answers": ["كنت امشي وأمشي"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040585357754368/3333333.png",
- "answers": ["لااااق بوتء"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040593595629568/3333333.png",
- "answers": ["ابو ناصر سرى ليله"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040602235895810/fghfghfgh.png",
- "answers": ["عدد اللي برمجوني 2"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040608825147412/hhhhyyrf87654.png",
- "answers": ["Dark_Neet"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040611819749387/354d9e28fd1264f5.png",
- "answers": ["بابا سنفور متعاطي"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040619331878922/4b24f4792476c04f.png",
- "answers": ["ميرندا حمضيات يلد"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040624603987968/5ff29b1066a3b9c7.png",
- "answers": ["هل الدمع من عينه"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040631885299722/77f33951be682d8f.png",
- "answers": ["طارت الطياره طارت"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040640928219136/29c240679c04c148.png",
- "answers": ["أنا فوق راسي ريشه"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040652542246912/bbcb4aa9853bf1d2.png",
- "answers": ["فريق النجمة"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040659437813780/69df1a1ea78bf05c.png",
- "answers": ["خالد عبدالرحمن"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040666895024128/8bc7742b95673c38.png",
- "answers": ["حبيت مره من قلبي"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040674067546113/9d1a9eee36622271.png",
- "answers": ["كرستيانو يزق"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040682913333248/f19a97c10ac739e1.png",
- "answers": ["أنت قمر يا قمر"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040692140539904/0a25039aa164a42b.png",
- "answers": ["انا اجمل مخلوق"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040699317256192/da72e3e3fe6bfceb.png",
- "answers": ["دونت تاتش"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040706464350218/d6339ed123a20afe.png",
- "answers": ["توم وجيري"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040714588454912/965f8266e9501b35.png",
- "answers": ["دباب اربع كفرات"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040721601331211/ae8cf2598c441e76.png",
- "answers": ["القرش الأسودد"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040729637748747/bf76692d54e6a0dd.png",
- "answers": ["ددسن موديل 85"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040736835043341/e66ff909a6330b13.png",
- "answers": ["الحارثيء"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040746503176194/351af3b19fc53323.png",
- "answers": ["عزازي مسرع"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040751557181440/6777776666.png",
- "answers": ["جاكي شاان"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040758108684289/2613844efcb8b05b.png",
- "answers": ["دارك نت"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040765671014401/c89aa167715a85b9.png",
- "answers": ["فانتاستيك"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040778467835924/9dff572a5bf1b602.png",
- "answers": ["اكس بوكس يلد"]
- },
- {
- "type": "https://cdn.discordapp.com/attachments/429330153735454722/430040783228370964/91ebb70e0dd936be.png",
- "answers": ["بكسل يالوصخخ"]
- }
- ];
- client.on('message', message => {
- if (!points[message.author.id]) points[message.author.id] = {
- points: 0,
- };
- if(!message.guild) return;
- let id = message.author.id,prefix="s!";
- if (speed[id] && (new Date).getTime() - speed[id] < 15*1000) {
- let r = (new Date).getTime() - speed[id];
- r = 15*1000 - r;
- }
- if ( message.content == prefix+'speed'){
- try{
- }catch(e){
- }
- if(!message.channel.guild) return message.reply('**هذا الأمر للسيرفرات فقط**').then(m => m.delete(3000));
- const item = speed[Math.floor(Math.random() * speed.length)];
- const filter = response => {
- return item.answers.some(answer => answer.toLowerCase() === response.content.toLowerCase());
- };
- message.channel.send('**Game is Start now...!**').then(msg => {
- const embed = new Discord.RichEmbed()
- .setColor("0054dd")
- .setAuthor(`⏳ |You have »15« seconds to type the word`)
- .setImage(`${item.type}`)
- .setFooter(`${message.author.tag}`, message.author.avatarURL)
- msg.channel.send(embed).then(() => {
- message.channel.awaitMessages(filter, { maxMatches: 1, time: 15000, errors: ['time'] })
- .then((collected) => {
- const sh = new Discord.RichEmbed()
- .setColor("04791c")
- .setDescription('**✅ |Good Job +1P**')
- .addField('Type $mypoints', 'To Show ur Points' , true)
- .setFooter(message.author.username, message.author.avatarURL)
- message.channel.sendEmbed(sh);
- let won = collected.first().author; // في هذا السطر يقوم الكود بسحب الأي دي الذي قام بالأجابة اولاً
- points[won.id].points++;
- })
- .catch(collected => { // في حال لم يقم أحد بالإجابة
- message.channel.send(`🔚 |**Time Is End**`);
- })
- fs.writeFile("./points.json", JSON.stringify(points), (err) => {
- if (err) console.error(err)
- })
- })
- })
- speed[id] = (new Date).getTime()
- }
- });
- client.on('message', message => {
- if (message.content.startsWith(prefix + 'mypoints')) {
- if(!message.channel.guild) return message.reply('**هذا الأمر للسيرفرات فقط**').then(m => m.delete(3000));
- let userData = points[message.author.id];
- let embed = new Discord.RichEmbed()
- .setAuthor(`${message.author.tag}`, message.author.avatarURL)
- .setColor('#000000')
- .setDescription(`نقاطك: \`${userData.points}\``)
- message.channel.sendEmbed(embed)
- }
- fs.writeFile("./points.json", JSON.stringify(points), (err) => {
- if (err) console.error(err)
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement