diff --git a/plugins/descargas-facebook.js b/plugins/descargas-facebook.js index 1e43bc0ad..87319b30b 100644 --- a/plugins/descargas-facebook.js +++ b/plugins/descargas-facebook.js @@ -20,12 +20,12 @@ if (d2ata.urls && d2ata.urls.length > 0) { r2es = `${d2ata.urls[0]?.hd || d2ata.urls[1]?.sd || ''}` } conn.sendFile(m.chat, r2es, 'error.mp4', `โœ… ${mid.smsfb}\n${wm}`, m); -await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ\n๐˜ผ๐™ฆ๐™ช๐™ž ๐™š๐™จ๐™ฉ๐™– ๐™ฉ๐™ช ๐™ซ๐™ž๐™™๐™š๐™ค ๐Ÿ’ซ`, edit: key}); +await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ`, edit: key}); } catch (err1) { try { const req = await igeh(args[0]) conn.sendMessage(m.chat, {video: {url: req.url_list}}, m) -await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ\n๐˜ผ๐™ฆ๐™ช๐™ž ๐™š๐™จ๐™ฉ๐™– ๐™ฉ๐™ช ๐™ซ๐™ž๐™™๐™š๐™ค ๐Ÿ’ซ`, edit: key}); +await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ`, edit: key}); handler.limit = 3 } catch (err1_2) { try { @@ -41,7 +41,7 @@ try { const ress = await fg.fbdl(args[0]); const urll = await ress.data[0].url; await conn.sendFile(m.chat, urll, 'error.mp4', `โœ… ๐˜ผ๐™Œ๐™๐™„ ๐™€๐™Ž๐™๐˜ผ ๐™๐™ ๐™‘๐™„๐˜ฟ๐™€๐™Š ๐˜ฟ๐™€ ๐™๐˜ผ๐˜พ๐™€๐˜ฝ๐™Š๐™Š๐™†\n${wm}`, m); -await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ\n๐˜ผ๐™ฆ๐™ช๐™ž ๐™š๐™จ๐™ฉ๐™– ๐™ฉ๐™ช ๐™ซ๐™ž๐™™๐™š๐™ค ๐Ÿ’ซ`, edit: key}); +await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ`, edit: key}); handler.limit = 3 } catch (err3) { try { @@ -49,7 +49,7 @@ const res = await fbDownloader(args[0]); for (const result of res.download) { const ur = result.url; await conn.sendFile(m.chat, ur, 'error.mp4', `โœ… ๐˜ผ๐™Œ๐™๐™„ ๐™€๐™Ž๐™๐˜ผ ๐™๐™ ๐™‘๐™„๐˜ฟ๐™€๐™Š ๐˜ฟ๐™€ ๐™๐˜ผ๐˜พ๐™€๐˜ฝ๐™Š๐™Š๐™†\n\n${wm}`, m); -await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ\n๐˜ผ๐™ฆ๐™ช๐™ž ๐™š๐™จ๐™ฉ๐™– ๐™ฉ๐™ช ๐™ซ๐™ž๐™™๐™š๐™ค ๐Ÿ’ซ`, edit: key}); +await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ`, edit: key}); handler.limit = 3 }} catch (err4) { try { @@ -57,13 +57,13 @@ const res3 = await fetch(`https://latam-api.vercel.app/api/facebookdl?apikey=nek const json = await res3.json(); const url3 = await json.video; await conn.sendFile(m.chat, url3, 'error.mp4', `โœ… ๐˜ผ๐™Œ๐™๐™„ ๐™€๐™Ž๐™๐˜ผ ๐™๐™ ๐™‘๐™„๐˜ฟ๐™€๐™Š ๐˜ฟ๐™€ ๐™๐˜ผ๐˜พ๐™€๐˜ฝ๐™Š๐™Š๐™†\n\n${wm}`, m); -await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ\n๐˜ผ๐™ฆ๐™ช๐™ž ๐™š๐™จ๐™ฉ๐™– ๐™ฉ๐™ช ๐™ซ๐™ž๐™™๐™š๐™ค ๐Ÿ’ซ`, edit: key}); +await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ`, edit: key}); handler.limit = 3 } catch (err5) { try { const {result} = await facebookdl(args[0]).catch(async (_) => await facebookdlv2(args[0])).catch(async (_) => await savefrom(args[0])); for (const {url, isVideo} of result.reverse()) await conn.sendFile(m.chat, url, `facebook.${!isVideo ? 'bin' : 'mp4'}`, `โœ… ๐˜ผ๐™Œ๐™๐™„ ๐™€๐™Ž๐™๐˜ผ ๐™๐™ ๐™‘๐™„๐˜ฟ๐™€๐™Š ๐˜ฟ๐™€ ๐™๐˜ผ๐˜พ๐™€๐˜ฝ๐™Š๐™Š๐™†\n\n${wm}`, m); -await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ\n๐˜ผ๐™ฆ๐™ช๐™ž ๐™š๐™จ๐™ฉ๐™– ๐™ฉ๐™ช ๐™ซ๐™ž๐™™๐™š๐™ค ๐Ÿ’ซ`, edit: key}); +await conn.sendMessage(m.chat, {text: `โœ… ๐˜พ๐™ค๐™ข๐™ฅ๐™ก๐™š๐™ฉ๐™–๐™™๐™ค\nโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐโ–ฐ`, edit: key}); handler.limit = 3 } catch (err6) { await conn.sendMessage(m.chat, {text: `${lenguajeGB['smsMalError3']()}#report ${lenguajeGB['smsMensError2']()} ${usedPrefix + command}\n\n${wm}`, edit: key}); diff --git a/plugins/descargas-ig.js b/plugins/descargas-ig.js index 4d3f7d048..ea60cc5a5 100644 --- a/plugins/descargas-ig.js +++ b/plugins/descargas-ig.js @@ -1,11 +1,11 @@ -import fetch from 'node-fetch' -import axios from 'axios' -import cheerio from 'cheerio' -import instagramGetUrl from 'instagram-url-direct' -import vm from 'node:vm' -import { instagram } from "@xct007/frieren-scraper"; -import { instagramdl } from '@bochilteam/scraper' -let handler = async (m, { conn, args, command, usedPrefix }) => { +import fetch from 'node-fetch'; +import axios from 'axios'; +import instagramGetUrl from 'instagram-url-direct'; +import {instagram} from '@xct007/frieren-scraper'; +import {instagramdl} from '@bochilteam/scraper'; +import instagramDl from '@sasmeee/igdl'; +import {fileTypeFromBuffer} from 'file-type'; +const handler = async (m, {conn, args, command, usedPrefix}) => { const fkontak = { "key": {"participants":"0@s.whatsapp.net", "remoteJid": "status@broadcast", "fromMe": false, "id": "Halo" }, "message": {"contactMessage": {"vcard": `BEGIN:VCARD\nVERSION:3.0\nN:Sy;Bot;;;\nFN:y\nitem1.TEL;waid=${m.sender.split('@')[0]}:${m.sender.split('@')[0]}\nitem1.X-ABLabel:Ponsel\nEND:VCARD` }}, "participant": "0@s.whatsapp.net" } if (!args[0]) return conn.reply(m.chat, `${lenguajeGB['smsAvisoMG']()}๐™„๐™ฃ๐™œ๐™ง๐™š๐™จ๐™š ๐™ช๐™ฃ ๐™š๐™ฃ๐™ก๐™–๐™˜๐™š ๐™™๐™š ๐™„๐™‚ ๐™ฅ๐™–๐™ง๐™– ๐™™๐™š๐™จ๐™˜๐™–๐™ง๐™œ๐™– ๐™จ๐™ช ๐™ซ๐™ž๐™™๐™š๐™ค ๐™ค ๐™ž๐™ข๐™–๐™œ๐™š๐™ฃ\n* *๐™€๐™Ÿ :*\n* *${usedPrefix + command} https://www.instagram.com/tv/Cd8U99IloVA/?igshid=YmMyMTA2M2Y=*`, m, {contextInfo: {externalAdReply :{ mediaUrl: null, mediaType: 1, description: null, body: wm, previewType: 0, thumbnail: img.getRandom(), sourceUrl: redes.getRandom()}}}) const { key } = await conn.sendMessage(m.chat, {text: wait}, {quoted: fkontak}); @@ -14,65 +14,65 @@ await conn.sendMessage(m.chat, {text: waitt, edit: key}); await conn.sendMessage(m.chat, {text: waittt, edit: key}); await conn.sendMessage(m.chat, {text: waitttt, edit: key}); try { -const datTa = await instagram.v1(args[0]) -if (datTa.error) return m.reply(`${datTa.message}`); -for (let urRRl of datTa) { -let shortUrRRl = await (await fetch(`https://tinyurl.com/api-create.php?url=${urRRl.url}`)).text() -let tXXxt = `โœจ *ENLACE:* ${shortUrRRl}\n\n${wm}`.trim() -conn.sendFile(m.chat, urRRl.url, 'error.mp4', tXXxt, m) -await new Promise(resolve => setTimeout(resolve, 10000)) -handler.limit = 2 -}} catch { -try { -const AA = await savefrom(args[0]) -let shortUrl222 = await (await fetch(`https://tinyurl.com/api-create.php?url=${args[0]}`)).text() -let txt222 = `โœจ *ENLACE:* ${shortUrl222}\n\n${wm}`.trim() -await conn.sendFile(m.chat, AA.url[0].url, 'error.mp4', txt222, m) -handler.limit = 2 +const img = await instagramDl(args[0]); +for (let i = 0; i < img.length; i++) { +const bufferInfo = await getBuffer(img[i].download_link); +if (bufferInfo.detectedType.mime.startsWith('image/')) { +await conn.sendMessage(m.chat, {image: {url: img[i].download_link}}, {quoted: m}); +} else if (bufferInfo.detectedType.mime.startsWith('video/')) { +await conn.sendMessage(m.chat, {video: {url: img[i].download_link }}, {quoted: m}); +handler.limit = 2 +}}} catch { +try { +const datTa = await instagram.download(args[0]); +for (const urRRl of datTa) { +const shortUrRRl = await (await fetch(`https://tinyurl.com/api-create.php?url=${args[0]}`)).text(); +const tXXxt = `โœจ *ENLACE:* ${shortUrRRl}\n\n${wm}`.trim(); +conn.sendFile(m.chat, urRRl.url, 'error.mp4', tXXxt, m); +await new Promise((resolve) => setTimeout(resolve, 10000)); +handler.limit = 2 +}} catch { +try { +const resultss = await instagramGetUrl(args[0]).url_list[0]; +const shortUrl2 = await (await fetch(`https://tinyurl.com/api-create.php?url=${args[0]}`)).text(); +const txt2 = `โœจ *ENLACE:* ${shortUrl2}\n\n${wm}`.trim(); +await conn.sendFile(m.chat, resultss, 'error.mp4', txt2, m); +handler.limit = 2 +} catch { +try { +const resultssss = await instagramdl(args[0]); +const shortUrl3 = await (await fetch(`https://tinyurl.com/api-create.php?url=${args[0]}`)).text(); +const txt4 = `โœจ *ENLACE:* ${shortUrl3}\n\n${wm}`.trim(); +for (const {url} of resultssss) await conn.sendFile(m.chat, url, 'error.mp4', txt4, m); +handler.limit = 2 } catch { -console.log('Error en el intento 1') -try { -const resultss = await instagramGetUrl(args[0]).url_list[0] -let shortUrl2 = await (await fetch(`https://tinyurl.com/api-create.php?url=${args[0]}`)).text() -let txt2 = `โœจ *ENLACE:* ${shortUrl2}\n\n${wm}`.trim() -await conn.sendFile(m.chat, resultss, 'error.mp4', txt2, m) -handler.limit = 2 -} catch { -console.log('Error en el intento 2') try { -const resultssss = await instagramdl(args[0]).catch(async _ => await instagramdlv2(args[0])).catch(async _ => await instagramdlv3(args[0])).catch(async _ => await instagramdlv4(args[0])) -let shortUrl3 = await (await fetch(`https://tinyurl.com/api-create.php?url=${r.medias[i].url}`)).text() -let txt4 = `โœจ *ENLACE:* ${shortUrl3}\n\n${wm}`.trim() -for (const { url } of resultssss) await conn.sendFile(m.chat, url, 'error.mp4', txt4, m) -handler.limit = 2 +const human = await fetch(`https://api.lolhuman.xyz/api/instagram?apikey=${lolkeysapi}&url=${args[0]}`); +const json = await human.json(); +const videoig = json.result; +const shortUrl1 = await (await fetch(`https://tinyurl.com/api-create.php?url=${args[0]}`)).text(); +const txt1 = `โœจ *ENLACE:* ${shortUrl1}\n\n${wm}`.trim(); +await conn.sendFile(m.chat, videoig, 'error.mp4', txt1, m); +handler.limit = 2 } catch { -console.log('Error en el intento 3') -try { -let human = await fetch(`https://api.lolhuman.xyz/api/instagram?apikey=${lolkeysapi}&url=${args[0]}`) -let json = await human.json() -let videoig = json.result -let shortUrl1 = await (await fetch(`https://tinyurl.com/api-create.php?url=${args[0]}`)).text() -let txt1 = `โœจ *ENLACE:* ${shortUrl1}\n\n${wm}`.trim() -await conn.sendFile(m.chat, videoig, 'error.mp4', txt1, m) -handler.limit = 2 -} catch { console.log('Error en el intento 4, sin resultados') conn.sendMessage(m.chat, {text: `${lenguajeGB['smsAvisoFG']()} ๐™€๐™๐™๐™Š๐™ ๐™‹๐™Š๐™ ๐™๐˜ผ๐™‘๐™Š๐™ ๐™‘๐™๐™€๐™‡๐™‘๐˜ผ ๐˜ผ ๐™„๐™‰๐™๐™€๐™‰๐™๐˜ผ`, edit: key}); handler.limit = 0 -}}}}}} +}}}}}}; handler.help = ['instagram '] handler.tags = ['downloader'] handler.command =/^(instagram|ig(dl)?)$/i //handler.limit = 2 handler.register = true -export default handler -async function savefrom(urlL) { -let body = new URLSearchParams({ "sf_url": encodeURI(urlL), "sf_submit": "", "new": 2, "lang": "id", "app": "", "country": "id", "os": "Windows", "browser": "Chrome", "channel": " main", "sf-nomad": 1 }); -let { data } = await axios({ "url": "https://worker.sf-tools.com/savefrom.php", "method": "POST", "data": body, "headers": { "content-type": "application/x-www-form-urlencoded", "origin": "https://id.savefrom.net", "referer": "https://id.savefrom.net/", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.74 Safari/537.36" }}); -let exec = '[]["filter"]["constructor"](b).call(a);'; -data = data.replace(exec, `\ntry {\ni++;\nif (i === 2) scriptResult = ${exec.split(".call")[0]}.toString();\nelse (\n${exec.replace(/;/, "")}\n);\n} catch {}`); -let context = { "scriptResult": "", "i": 0 }; -vm.createContext(context); -new vm.Script(data).runInContext(context); -return JSON.parse(context.scriptResult.split("window.parent.sf.videoResult.show(")?.[1].split(");")?.[0]) +export default handler; + +const getBuffer = async (url, options) => { +options = options || {}; +const res = await axios({method: 'get', url, headers: {'DNT': 1, 'Upgrade-Insecure-Request': 1}, ...options, responseType: 'arraybuffer'}); +const buffer = Buffer.from(res.data, 'binary'); +const detectedType = await fileTypeFromBuffer(buffer); +if (!detectedType || (detectedType.mime !== 'image/jpeg' && detectedType.mime !== 'image/png' && detectedType.mime !== 'video/mp4')) { +return null; } +return { buffer, detectedType }; +}; diff --git a/plugins/fun-adivinar_resp.js b/plugins/fun-adivinar_resp.js index 1449a6000..2b164e45e 100644 --- a/plugins/fun-adivinar_resp.js +++ b/plugins/fun-adivinar_resp.js @@ -30,11 +30,12 @@ handler.before = async function (m) { const json = JSON.parse(JSON.stringify(this.tebaklagu[id][1])); if (m.text.toLowerCase() == json.jawaban.toLowerCase().trim()) { global.db.data.users[m.sender].exp += this.tebaklagu[id][2]; - m.reply(`โœ…Correcto!\n+${this.tebaklagu[id][2]} XP`); + m.reply(`\`Respuesta correcta! ๐Ÿฅณ\`\n\nโ€ข *Ganarte :* ${this.tebaklagu[id][2]} XP`); + m.react(`โœ…`) clearTimeout(this.tebaklagu[id][3]); delete this.tebaklagu[id]; - } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`Casii!`); - else m.reply(`โŒIncorrecto!`); + } else if (similarity(m.text.toLowerCase(), json.jawaban.toLowerCase().trim()) >= threshold) m.reply(`Casi lo logra!`); + else m.react(`โŒ`) } return !0 } diff --git a/plugins/fun-game-math_answer.js b/plugins/fun-game-math_answer.js index 2a0b296c4..1120f6370 100644 --- a/plugins/fun-game-math_answer.js +++ b/plugins/fun-game-math_answer.js @@ -6,14 +6,14 @@ let fkontak = { "key": { "participants":"0@s.whatsapp.net", "remoteJid": "status if (!m.quoted) return if (m.quoted.sender != conn.user.jid) return if (!/^๐˜พ๐™ช๐™–๐™ก ๐™š๐™จ ๐™ง๐™š๐™จ๐™ช๐™ก๐™ฉ๐™–๐™™๐™ค ๐™™๐™š/i.test(m.quoted.text)) return -if (!(m.chat in global.math)) return conn.reply(m.chat, `${lenguajeGB['smsAvisoMG']()}๐™”๐˜ผ ๐™Ž๐™€ ๐™๐™€๐™Ž๐™‹๐™Š๐™‰๐˜ฟ๐™„๐™Š ๐™€๐™Ž๐™๐˜ผ ๐™‹๐™๐™€๐™‚๐™๐™‰๐™๐˜ผ\n๐™๐™ƒ๐™„๐™Ž ๐™Œ๐™๐™€๐™Ž๐™๐™„๐™Š๐™‰ ๐™ƒ๐˜ผ๐™Ž ๐˜ผ๐™‡๐™๐™€๐˜ผ๐˜ฟ๐™” ๐˜ฝ๐™€๐™€๐™‰ ๐˜ผ๐™‰๐™Ž๐™’๐™€๐™๐™€๐˜ฟ`, m) +if (!(m.chat in global.math)) return conn.reply(m.chat, `${lenguajeGB['smsAvisoMG']()}๐™”๐˜ผ ๐™Ž๐™€ ๐™๐™€๐™Ž๐™‹๐™Š๐™‰๐˜ฟ๐™„๐™Š ๐™€๐™Ž๐™๐˜ผ ๐™‹๐™๐™€๐™‚๐™๐™‰๐™๐˜ผ`, m) //conn.sendButton(m.chat, `${lenguajeGB['smsAvisoMG']()}๐™”๐˜ผ ๐™Ž๐™€ ๐™๐™€๐™Ž๐™‹๐™Š๐™‰๐˜ฟ๐™„๐™Š ๐™€๐™Ž๐™๐˜ผ ๐™‹๐™๐™€๐™‚๐™๐™‰๐™๐˜ผ\n๐™๐™ƒ๐™„๐™Ž ๐™Œ๐™๐™€๐™Ž๐™๐™„๐™Š๐™‰ ๐™ƒ๐˜ผ๐™Ž ๐˜ผ๐™‡๐™๐™€๐˜ผ๐˜ฟ๐™” ๐˜ฝ๐™€๐™€๐™‰ ๐˜ผ๐™‰๐™Ž๐™’๐™€๐™๐™€๐˜ฟ`, wm, null, [['๐™‘๐™ค๐™ก๐™ซ๐™š๐™ง ๐™– ๐™…๐™ช๐™œ๐™–๐™ง ๐Ÿงฎ', `/math`], ['๐™‘๐™ค๐™ก๐™ซ๐™š๐™ง ๐™–๐™ก ๐™ˆ๐™š๐™ฃ๐™ชฬ | ๐˜ฝ๐™–๐™˜๐™  ๐™ฉ๐™ค ๐™ˆ๐™š๐™ฃ๐™ช โ˜˜๏ธ', '/menu']], m) if (m.quoted.id == global.math[id][0].id) { let math = global.math[id][1] let gatacoins = global.db.data.users[m.sender].money += 500 if (m.text == math.result) { -await conn.reply(m.chat, `๐Ÿ’– ๐™๐™€๐™Ž๐™‹๐™๐™€๐™Ž๐™๐˜ผ ๐˜พ๐™Š๐™๐™๐™€๐˜พ๐™๐˜ผ\n๐™Œ๐™๐™€ ๐™‹๐™๐™Š ๐Ÿ˜Ž\nโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆ\n๐™‚๐˜ผ๐™‰๐˜ผ๐™Ž๐™๐™€ | ๐™’๐™Š๐™‰\n๐Ÿ† *_${math.bonus}_* ๐™“๐™‹\nโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆ\n๐˜ฝ๐™Š๐™‰๐™Š | ๐˜ฝ๐™Š๐™‰๐™๐™Ž\n๐ŸŽ *_$500_* ๐™‚๐™–๐™ฉ๐™–๐˜พ๐™ค๐™ž๐™ฃ๐™จ\nโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆ\n๐™Ž๐™ ๐˜ฟ๐™„๐™‰๐™€๐™๐™Š | ๐™”๐™Š๐™๐™ ๐™ˆ๐™Š๐™‰๐™€๐™”\n๐Ÿ’ต *_$${gatacoins}_* ๐™‚๐™–๐™ฉ๐™–๐˜พ๐™ค๐™ž๐™ฃ๐™จ`, fkontak, m) +await conn.reply(m.chat, `๐Ÿ’– ๐™๐™€๐™Ž๐™‹๐™๐™€๐™Ž๐™๐˜ผ ๐˜พ๐™Š๐™๐™๐™€๐˜พ๐™๐˜ผ\n๐™Œ๐™๐™€ ๐™‹๐™๐™Š ๐Ÿ˜Ž\nโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆ\n๐™‚๐˜ผ๐™‰๐˜ผ๐™Ž๐™๐™€\n๐Ÿ† *_${math.bonus}_* ๐™“๐™‹\nโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆ\n๐˜ฝ๐™Š๐™‰๐™Š\n๐ŸŽ *_$500_* ๐™‡๐™ค๐™ก๐™ž๐˜พ๐™ค๐™ž๐™ฃ๐™จ\nโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆ\n๐™Ž๐™ ๐˜ฟ๐™„๐™‰๐™€๐™๐™Š\n๐Ÿ’ต *_$${gatacoins}_* ๐™‡๐™ค๐™ก๐™ž๐˜พ๐™ค๐™ž๐™ฃ๐™จ`, fkontak, m) //conn.sendButton(m.chat, `๐Ÿ’– ๐™๐™€๐™Ž๐™‹๐™๐™€๐™Ž๐™๐˜ผ ๐˜พ๐™Š๐™๐™๐™€๐˜พ๐™๐˜ผ\n๐™Œ๐™๐™€ ๐™‹๐™๐™Š ๐Ÿ˜Ž\nโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆ\n๐™‚๐˜ผ๐™‰๐˜ผ๐™Ž๐™๐™€ | ๐™’๐™Š๐™‰\n๐Ÿ† *_${math.bonus}_* ๐™“๐™‹\nโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆ\n๐˜ฝ๐™Š๐™‰๐™Š | ๐˜ฝ๐™Š๐™‰๐™๐™Ž\n๐ŸŽ *_$500_* ๐™‚๐™–๐™ฉ๐™–๐˜พ๐™ค๐™ž๐™ฃ๐™จ\nโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆโ”ˆ\n๐™Ž๐™ ๐˜ฟ๐™„๐™‰๐™€๐™๐™Š | ๐™”๐™Š๐™๐™ ๐™ˆ๐™Š๐™‰๐™€๐™”\n๐Ÿ’ต *_$${gatacoins}_* ๐™‚๐™–๐™ฉ๐™–๐˜พ๐™ค๐™ž๐™ฃ๐™จ`, wm, null, [['๐™‘๐™ค๐™ก๐™ซ๐™š๐™ง ๐™– ๐™…๐™ช๐™œ๐™–๐™ง ๐Ÿงฎ', `/math ${math.mode}`], ['๐™ˆ๐™š๐™ฃ๐™ช ๐™…๐™ช๐™š๐™œ๐™ค๐™จ | ๐™‚๐™–๐™ข๐™š๐™จ ๐™ˆ๐™š๐™ฃ๐™ช ๐ŸŽก', `.juegosmenu`]], m) global.db.data.users[m.sender].exp += math.bonus @@ -21,11 +21,11 @@ clearTimeout(global.math[id][3]) delete global.math[id] } else { if (--global.math[id][2] == 0) { -await conn.reply(m.chat, `${lenguajeGB['smsAvisoAG']()}๐™Ž๐™€ ๐˜ผ๐˜พ๐˜ผ๐˜ฝ๐˜ผ๐™๐™Š๐™‰ ๐™๐™๐™Ž ๐™Š๐™‹๐™Š๐™๐™๐™๐™‰๐™„๐˜ฟ๐˜ผ๐˜ฟ๐™€๐™Ž\n๐™‡๐˜ผ ๐™๐™€๐™Ž๐™‹๐™๐™€๐™Ž๐™๐˜ผ ๐™€๐™Ž *${math.result}*\n\n๐™”๐™Š๐™๐™ ๐™๐™๐™๐™‰๐™Ž ๐˜ผ๐™๐™€ ๐™Š๐™‘๐™€๐™\n๐™๐™ƒ๐™€ ๐˜ผ๐™‰๐™Ž๐™’๐™€๐™ ๐™„๐™Ž *${math.result}*`, m) +await conn.reply(m.chat, `${lenguajeGB['smsAvisoAG']()}๐™Ž๐™€ ๐˜ผ๐˜พ๐˜ผ๐˜ฝ๐˜ผ๐™๐™Š๐™‰ ๐™๐™๐™Ž ๐™Š๐™‹๐™Š๐™๐™๐™๐™‰๐™„๐˜ฟ๐˜ผ๐˜ฟ๐™€๐™Ž\n๐™‡๐˜ผ ๐™๐™€๐™Ž๐™‹๐™๐™€๐™Ž๐™๐˜ผ ๐™€๐™Ž *${math.result}*`, m) //conn.sendButton(m.chat, `${lenguajeGB['smsAvisoAG']()}๐™Ž๐™€ ๐˜ผ๐˜พ๐˜ผ๐˜ฝ๐˜ผ๐™๐™Š๐™‰ ๐™๐™๐™Ž ๐™Š๐™‹๐™Š๐™๐™๐™๐™‰๐™„๐˜ฟ๐˜ผ๐˜ฟ๐™€๐™Ž\n๐™‡๐˜ผ ๐™๐™€๐™Ž๐™‹๐™๐™€๐™Ž๐™๐˜ผ ๐™€๐™Ž *${math.result}*\n\n๐™”๐™Š๐™๐™ ๐™๐™๐™๐™‰๐™Ž ๐˜ผ๐™๐™€ ๐™Š๐™‘๐™€๐™\n๐™๐™ƒ๐™€ ๐˜ผ๐™‰๐™Ž๐™’๐™€๐™ ๐™„๐™Ž *${math.result}*`, wm, null, [['๐™‘๐™ค๐™ก๐™ซ๐™š๐™ง ๐™– ๐™…๐™ช๐™œ๐™–๐™ง ๐Ÿงฎ', `/math ${math.mode}`], ['๐™๐™ค๐™ฅ๐™จ | ๐™๐™–๐™ฃ๐™ ๐™ž๐™ฃ๐™œ ๐Ÿ†', `.top`]], m) clearTimeout(global.math[id][3]) delete global.math[id] -} else conn.reply(m.chat, `${lenguajeGB['smsAvisoFG']()}๐™๐™€๐™Ž๐™‹๐™๐™€๐™Ž๐™๐˜ผ ๐™„๐™‰๐˜พ๐™Š๐™๐™๐™€๐˜พ๐™๐˜ผ!!\n๐™๐™€ ๐™Œ๐™๐™€๐˜ฟ๐˜ผ๐™‰ *${global.math[id][2]}* ๐™Š๐™‹๐™Š๐™๐™๐™๐™‰๐™„๐˜ฟ๐˜ผ๐˜ฟ๐™€๐™Ž ๐Ÿ˜ฑ\n\n๐™’๐™๐™Š๐™‰๐™‚ ๐˜ผ๐™‰๐™Ž๐™’๐™€๐™!!\n๐™„๐™ ๐™๐™„๐™๐™Ž ๐™”๐™Š๐™ *${global.math[id][2]}* ๐™๐™๐™๐™‰๐™Ž ๐Ÿคฏ`, m) +} else conn.reply(m.chat, `${lenguajeGB['smsAvisoFG']()}๐™๐™€๐™Ž๐™‹๐™๐™€๐™Ž๐™๐˜ผ ๐™„๐™‰๐˜พ๐™Š๐™๐™๐™€๐˜พ๐™๐˜ผ!!\n๐™๐™€ ๐™Œ๐™๐™€๐˜ฟ๐˜ผ๐™‰ *${global.math[id][2]}* ๐™Š๐™‹๐™Š๐™๐™๐™๐™‰๐™„๐˜ฟ๐˜ผ๐˜ฟ๐™€๐™Ž ๐Ÿ˜ฑ`, m) }}} handler.customPrefix = /^-?[0-9]+(\.[0-9]+)?$/ diff --git a/plugins/fun-game.js b/plugins/fun-game.js index 0e5ed48d7..d98b0f02e 100644 --- a/plugins/fun-game.js +++ b/plugins/fun-game.js @@ -38,8 +38,8 @@ let fa = `${mg}๐™๐™จ๐™–๐™ง ๐™™๐™š๐™ก ๐™ก๐™– ๐™จ๐™ž๐™œ๐™ช๐™ž๐™š ๐™€๐™Ÿ๐™š๐™ข๐™ฅ๐™ก๐™ค: *${usedPrefix + command} 50*`.trim() -if (!args[0]) throw fa -if (isNaN(args[0])) throw fa +if (!args[0]) return m.reply(fa) +if (isNaN(args[0])) return m.reply(fa) let apuesta = parseInt(args[0]) let users = global.db.data.users[m.sender] @@ -51,7 +51,7 @@ throw `${lenguajeGB['smsAvisoFG']()}๐๐’ ๐’‚๐’๐’„๐’‚๐’๐’›๐’‚ ๐’‘ } if (command == 'slot1') { let time = global.db.data.users[m.sender].lastslot + 60000 -if (new Date - users.lastslot < 60000) throw `*๐•๐ฎ๐ž๐ฅ๐ฏ๐š ๐ž๐ง: ${msToTime(time - new Date())} ๐๐š๐ซ๐š ๐œ๐จ๐ง๐ญ๐ข๐ง๐ฎ๐š๐ซ ๐š๐ฉ๐จ๐ฌ๐ญ๐š๐ง๐๐จ ๐ž๐ฑ๐ฉ* ๐ŸŽฐ` +if (new Date - users.lastslot < 60000) return m.reply(`*๐•๐ฎ๐ž๐ฅ๐ฏ๐š ๐ž๐ง: ${msToTime(time - new Date())} ๐๐š๐ซ๐š ๐œ๐จ๐ง๐ญ๐ข๐ง๐ฎ๐š๐ซ ๐š๐ฉ๐จ๐ฌ๐ญ๐š๐ง๐๐จ ๐ž๐ฑ๐ฉ* ๐ŸŽฐ`) users.lastslot = new Date * 1 let emojis = ["๐Ÿ’Ž", "โšก", "๐Ÿช™"]; @@ -78,33 +78,55 @@ if (c == emojis.length) c = 0; } let end; if (a == b && b == c) { -end = `โœจ *QUE PRO!! HAS GANADO +${apuesta + apuesta} EXP*` +end = `๐Ÿฅณ *QUE PRO!! HAS GANADO +${apuesta + apuesta} EXP*` users.exp += apuesta } else if (a == b || a == c || b == c) { -end = `๐Ÿ™€ *CASI!!, VUELVA A INTENTAR*\n*BONO DE +50 EXP*` +end = `๐Ÿ˜ฏ *CASI!!, VUELVA A INTENTAR*\n*BONO DE +50 EXP*` users.exp += 50 } else { end = `๐Ÿ˜ฟ *HA PERDIDO!! โŒ -${apuesta} EXP*` users.exp -= apuesta } -await delay(5000) -let s = `๐ŸŽฐ | *RANURAS* | ๐ŸŽฐ - โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ - ${x[0]} : ${y[0]} : ${z[0]} - ${x[1]} : ${y[1]} : ${z[1]} - ${x[2]} : ${y[2]} : ${z[2]} - โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ -๐ŸŽฐ | *SLOTS* | ๐ŸŽฐ -${end}` -await conn.reply(m.chat, s, m)} +var hawemod = [ +`${x[1]} : ${y[0]} : ${z[0]} +${z[0]} : ${y[1]} : ${x[1]} +${z[1]} : ${x[2]} : ${y[0]}`, +`${x[0]} : ${y[1]} : ${z[2]} +${y[1]} : ${z[2]} : ${x[1]} +${x[2]} : ${y[0]} : ${z[0]}`, +`${x[1]} : ${y[2]} : ${z[1]} +${y[0]} : ${z[0]} : ${x[2]} +${x[2]} : ${y[1]} : ${z[0]}` +] + +const maxIterations = 25; +const arrayCasuale = generaArrayCasuale(hawemod, maxIterations); + +const array = [...arrayCasuale, ]; + +let { key } = await conn.sendMessage(m.chat, { text: `๐Ÿ•น` }, { quoted: m }); + +for (let i = 0; i < maxIterations; i++) { + +await conn.sendMessage(m.chat, { text: `๐ŸŽฐ | *RANURAS* | ๐ŸŽฐ\nโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n` + `${array[i]}` + `\n โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n๐ŸŽฐ | *SLOTS* | ๐ŸŽฐ`, edit: key }, { quoted: m }); +await new Promise((resolve) => setTimeout(resolve, 1))} + +return await conn.sendMessage(m.chat, {text: ` +๐ŸŽฐ | *RANURAS* | ๐ŸŽฐ +โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ +${x[0]} : ${y[0]} : ${z[0]} +${x[1]} : ${y[1]} : ${z[1]} +${x[2]} : ${y[2]} : ${z[2]} + โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ +๐ŸŽฐ | *SLOTS* | ๐ŸŽฐ\n\n${end}`, edit: key}, {quoted: m})} if (users.money < apuesta) { -throw `${lenguajeGB['smsAvisoFG']()}๐‘ต๐’ ๐’‚๐’๐’„๐’‚๐’๐’›๐’‚ ๐’‘๐’‚๐’“๐’‚ ๐’‚๐’‘๐’๐’”๐’•๐’‚๐’“ ๐‘ณ๐’๐’๐’Š๐’„๐’๐’Š๐’๐’”, ๐’๐’† ๐’“๐’†๐’„๐’๐’Ž๐’Š๐’†๐’๐’…๐’ ๐’Š๐’๐’•๐’†๐’“๐’‚๐’„๐’•๐’–๐’‚๐’“ ๐’„๐’๐’ ๐’†๐’ ๐’ƒ๐’๐’• ๐’‘๐’‚๐’“๐’‚ ๐’๐’ƒ๐’•๐’†๐’๐’†๐’“ ๐’Ž๐’‚ฬ๐’” ๐’“๐’†๐’„๐’–๐’“๐’”๐’๐’”` +throw `${lenguajeGB['smsAvisoFG']()}๐๐จ ๐š๐ฅ๐œ๐š๐ง๐ณ๐š ๐ฉ๐š๐ซ๐š ๐š๐ฉ๐จ๐ฌ๐ญ๐š๐ซ ๐‹๐จ๐ฅ๐ข๐‚๐จ๐ข๐ง๐ฌ, ๐ฅ๐ž ๐ซ๐ž๐œ๐จ๐ฆ๐ข๐ž๐ง๐๐จ ๐ข๐ง๐ญ๐ž๐ซ๐š๐œ๐ญ๐ฎ๐š๐ซ ๐œ๐จ๐ง ๐ž๐ฅ ๐›๐จ๐ญ ๐ฉ๐š๐ซ๐š ๐จ๐›๐ญ๐ž๐ง๐ž๐ซ ๐ซ๐ž๐œ๐ฎ๐ซ๐ฌ๐จ๐ฌ` } if (command == 'slot2') { let time = global.db.data.users[m.sender].lastslot + 60000 -if (new Date - users.lastslot < 60000) throw `*๐•๐ฎ๐ž๐ฅ๐ฏ๐š ๐ž๐ง:${msToTime(time - new Date())} ๐๐š๐ซ๐š ๐œ๐จ๐ง๐ญ๐ข๐ง๐ฎ๐š๐ซ ๐š๐ฉ๐จ๐ฌ๐ญ๐š๐ง๐๐จ ๐‹๐จ๐ฅ๐ข๐‚๐จ๐ข๐ง๐ฌ* ๐ŸŽฐ` +if (new Date - users.lastslot < 60000) return m.reply(`*๐•๐ฎ๐ž๐ฅ๐ฏ๐š ๐ž๐ง:${msToTime(time - new Date())} ๐๐š๐ซ๐š ๐œ๐จ๐ง๐ญ๐ข๐ง๐ฎ๐š๐ซ ๐š๐ฉ๐จ๐ฌ๐ญ๐š๐ง๐๐จ ๐‹๐จ๐ฅ๐ข๐‚๐จ๐ข๐ง๐ฌ* ๐ŸŽฐ`) users.lastslot = new Date * 1 let emojis = ["๐Ÿช™", "๐Ÿ”ฎ", "๐Ÿงฟ"]; @@ -131,35 +153,54 @@ if (c == emojis.length) c = 0; } let end; if (a == b && b == c) { -end = `โœจ *QUE PRO!! HAS GANADO +${apuesta + apuesta} GataCoins*` +end = `๐Ÿฅณ *QUE PRO!! HAS GANADO +${apuesta + apuesta} LoliCoins*` users.money += apuesta } else if (a == b || a == c || b == c) { -end = `๐Ÿ™€ *CASI!!, VUELVA A INTENTAR*\n*BONO DE +30 LoliCoins*` +end = `๐Ÿ˜ฏ *CASI!!, VUELVA A INTENTAR*\n*BONO DE +30 LoliCoins*` users.money += 30 } else { end = `๐Ÿ˜ฟ *HA PERDIDO!! โŒ -${apuesta} LoliCoins*` users.money -= apuesta } -//users.lastslot = new Date * 1 -//return await m.reply( - // ` -await delay(5000) -let ss = ` + +var hawemod = [ +`${x[0]} : ${y[1]} : ${z[0]} +${z[0]} : ${y[0]} : ${x[1]} +${z[2]} : ${x[2]} : ${y[2]}`, +`${x[0]} : ${y[0]} : ${z[0]} +${y[1]} : ${z[1]} : ${x[1]} +${x[2]} : ${y[2]} : ${z[2]}`, +`${x[0]} : ${y[1]} : ${z[0]} +${y[1]} : ${z[0]} : ${x[1]} +${x[2]} : ${y[1]} : ${z[0]}` +] + +const maxIterations = 25; +const arrayCasuale = generaArrayCasuale(hawemod, maxIterations); + +const array = [...arrayCasuale, ]; + +let { key } = await conn.sendMessage(m.chat, { text: `๐Ÿ•น` }, { quoted: m }); + +for (let i = 1; i <= maxIterations; i++) { +await conn.sendMessage(m.chat, { text: `๐ŸŽฐ | *RANURAS* | ๐ŸŽฐ\nโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n` + `${array[i]}` + `\n โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n๐ŸŽฐ | *SLOTS* | ๐ŸŽฐ`, edit: key }, { quoted: m }); +await new Promise((resolve) => setTimeout(resolve, 50))} + +return await conn.sendMessage(m.chat, {text: ` ๐ŸŽฐ | *RANURAS* | ๐ŸŽฐ +โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ +${x[0]} : ${y[0]} : ${z[0]} +${x[1]} : ${y[1]} : ${z[1]} +${x[2]} : ${y[2]} : ${z[2]} โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ - ${x[0]} : ${y[0]} : ${z[0]} - ${x[1]} : ${y[1]} : ${z[1]} - ${x[2]} : ${y[2]} : ${z[2]} - โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ -๐ŸŽฐ | *SLOTS* | ๐ŸŽฐ\n\n${end}` -await conn.reply(m.chat, ss, m)} - +๐ŸŽฐ | *SLOTS* | ๐ŸŽฐ\n\n${end}`, edit: key}, {quoted: m})} + if (users.limit < apuesta) { throw `${lenguajeGB['smsAvisoFG']()}๐‘ต๐’ ๐’‚๐’๐’„๐’‚๐’๐’›๐’‚ ๐’‘๐’‚๐’“๐’‚ ๐’‚๐’‘๐’๐’”๐’•๐’‚๐’“ ๐‘ซ๐’Š๐’‚๐’Ž๐’‚๐’๐’•๐’†, ๐’๐’† ๐’“๐’†๐’„๐’๐’Ž๐’Š๐’†๐’๐’…๐’ ๐’Š๐’๐’•๐’†๐’“๐’‚๐’„๐’•๐’–๐’‚๐’“ ๐’„๐’๐’ ๐’†๐’ ๐’ƒ๐’๐’• ๐’‘๐’‚๐’“๐’‚ ๐’๐’ƒ๐’•๐’†๐’๐’†๐’“ ๐’Ž๐’‚ฬ๐’” ๐’“๐’†๐’„๐’–๐’“๐’”๐’๐’”` } if (command == 'slot3') { let time = global.db.data.users[m.sender].lastslot + 30000 -if (new Date - users.lastslot < 30000) throw `*๐•๐ฎ๐ž๐ฅ๐ฏ๐š ๐ž๐ง: ${msToTime(time - new Date())} ๐๐š๐ซ๐š ๐œ๐จ๐ง๐ญ๐ข๐ง๐ฎ๐š๐ซ ๐š๐ฉ๐จ๐ฌ๐ญ๐š๐ง๐๐จ ๐ƒ๐ข๐š๐ฆ๐š๐ง๐ญ๐ž* ๐ŸŽฐ` +if (new Date - users.lastslot < 30000) return m.reply(`*๐•๐ฎ๐ž๐ฅ๐ฏ๐š ๐ž๐ง: ${msToTime(time - new Date())} ๐๐š๐ซ๐š ๐œ๐จ๐ง๐ญ๐ข๐ง๐ฎ๐š๐ซ ๐š๐ฉ๐จ๐ฌ๐ญ๐š๐ง๐๐จ ๐ƒ๐ข๐š๐ฆ๐š๐ง๐ญ๐ž* ๐ŸŽฐ`) users.lastslot = new Date * 1 let emojis = ["๐Ÿช™", "๐Ÿ’ฃ", "๐Ÿ’Ž"]; @@ -186,31 +227,51 @@ if (c == emojis.length) c = 0; } let end; if (a == b && b == c) { -end = `โœจ *QUE PRO!! HAS GANADO +${apuesta + apuesta} Diamantes*` +end = `๐Ÿฅณ *QUE PRO!! HAS GANADO +${apuesta + apuesta} Diamantes*` users.limit += apuesta } else if (a == b || a == c || b == c) { end = `๐Ÿ™€ *CASI!!, VUELVA A INTENTAR*\n*BONO DE +2 Diamantes*` users.limit += 2 } else { -end = `๐Ÿ˜ฟ *HA PERDIDO!! โŒ -${apuesta} Diamantes*` +end = `๐Ÿ˜ฟ *HA PERDIDO!! โŒ -${apuesta} Diamante*` users.limit -= apuesta } -//users.lastslot = new Date * 1 -//return await m.reply( - // ` -await delay(3000) -let sss = `๐ŸŽฐ | *RANURAS* | ๐ŸŽฐ - โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ - ${x[0]} : ${y[0]} : ${z[0]} - ${x[1]} : ${y[1]} : ${z[1]} - ${x[2]} : ${y[2]} : ${z[2]} + +var hawemod = [ +`${x[0]} : ${y[1]} : ${z[0]} +${z[1]} : ${y[0]} : ${x[0]} +${z[2]} : ${x[1]} : ${y[2]}`, +`${x[0]} : ${y[1]} : ${z[0]} +${y[1]} : ${z[2]} : ${x[1]} +${x[2]} : ${y[1]} : ${z[2]}`, +`${x[0]} : ${y[0]} : ${z[1]} +${y[1]} : ${z[2]} : ${x[0]} +${x[0]} : ${y[2]} : ${z[1]}` +] + +const maxIterations = 25; +const arrayCasuale = generaArrayCasuale(hawemod, maxIterations); + +const array = [...arrayCasuale, ]; + +let { key } = await conn.sendMessage(m.chat, { text: `๐Ÿ•น` }, { quoted: m }); + +for (let i = 1; i <= maxIterations; i++) { +await conn.sendMessage(m.chat, { text: `๐ŸŽฐ | *RANURAS* | ๐ŸŽฐ\nโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n` + `${array[i]}` + `\n โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\n๐ŸŽฐ | *SLOTS* | ๐ŸŽฐ`, edit: key }, { quoted: m }); +await new Promise((resolve) => setTimeout(resolve, 50))} + +return await conn.sendMessage(m.chat, {text: ` +๐ŸŽฐ | *RANURAS* | ๐ŸŽฐ +โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ +${x[0]} : ${y[0]} : ${z[0]} +${x[1]} : ${y[1]} : ${z[1]} +${x[2]} : ${y[2]} : ${z[2]} โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ -๐ŸŽฐ | *SLOTS* | ๐ŸŽฐ\n\n${end}` -await conn.reply(m.chat, sss, m)} +๐ŸŽฐ | *SLOTS* | ๐ŸŽฐ\n\n${end}`, edit: key}, {quoted: m})} if (command == 'slot') { await conn.reply(m.chat, `*Elija en que apostarรก ${apuesta}*\n\nโšก Exp:\n${usedPrefix}slot1 ${apuesta}\n\n๐Ÿช™ Lolicoins:\n${usedPrefix}slot2 ${apuesta}\n\n๐Ÿ’Ž diamante:\n${usedPrefix}slot3 ${apuesta}`, m)} - + if (command == 'apostar') { await conn.reply(m.chat, `*Elija en que apostarรก ${apuesta}*\n\nโšกExp:\n${usedPrefix}slot1 ${apuesta}\n๐Ÿช™ Lolicoins:\n${usedPrefix}slot2 ${apuesta}\n๐Ÿ’Ž Diamante:\n${usedPrefix}slot3 ${apuesta}`, m)} } @@ -388,6 +449,14 @@ bonus, result }} +function generaArrayCasuale(array, ripetizioni) { + let risultato = []; + for (let i = 0; i < ripetizioni; i++) { + risultato = risultato.concat(array); + } + return risultato; +} + function randomInt(from, to) { if (from > to) [from, to] = [to, from] from = Math.floor(from) diff --git a/plugins/grupo-admins.js b/plugins/grupo-admins.js index 06a5d468e..8389efda7 100644 --- a/plugins/grupo-admins.js +++ b/plugins/grupo-admins.js @@ -11,7 +11,8 @@ let textoA = `โ•ญโ”โ”[ .โ‹… ๐Ÿ—ฃ๏ธ โ‹…]โ”โ”โ”โฌฃ เท† ${oi} โ•ฐโ”โ”โ”โ”โ”โ”[ *๐“ƒ .โ‹… ${vs} โ‹…]โ”โ”โ”โ”โ”โฌฃ` -let textoB = `*${listAdmin}* +let textoB = ` +*${listAdmin}* โ›” ${lenguajeGB.smsAddB4()} โ›”`.trim() await conn.sendFile(m.chat, pp, 'error.jpg', textoA + textoB, m, false, { mentions: [...groupAdmins.map(v => v.id), owner] }) diff --git a/plugins/propietario(a)-getplugin.js b/plugins/propietario(a)-getplugin.js index a24483011..86f94ec97 100644 --- a/plugins/propietario(a)-getplugin.js +++ b/plugins/propietario(a)-getplugin.js @@ -2,7 +2,7 @@ import fs from 'fs' let handler = async (m, { usedPrefix, command, text }) => { let ar = Object.keys(plugins) let ar1 = ar.map(v => v.replace('.js', '')) -if (!text) throw `*${mg}\nINGRESA EL TEXTO DEL PLUGIN\nejemplo:\n${usedPrefix + command} menu` +if (!text) throw `*Que buscar?*\nEjemplo:\n${usedPrefix + command} sticker` if (!ar1.includes(text)) return m.reply(`'${text}' tidak ditemukan!\n\n${ar1.map(v => ' ' + v).join`\n`}`) m.reply(fs.readFileSync('./plugins/' + text + '.js', 'utf-8')) } diff --git a/plugins/propietario(a)-restart.js b/plugins/propietario(a)-restart.js index cdcf3880a..dad4b2d38 100644 --- a/plugins/propietario(a)-restart.js +++ b/plugins/propietario(a)-restart.js @@ -1,15 +1,27 @@ import { spawn } from 'child_process' let handler = async (m, { conn, isROwner, text }) => { if (!process.send) throw 'Dont: node main.js\nDo: node index.js' -if (global.conn.user.jid == conn.user.jid) { -await m.reply('๐Ÿš€ Reiniciando Bot...\nPor favor espere un momento') +if (conn.user.jid == conn.user.jid) { +async function loading() { +var hawemod = ["10%", "30%", "50%", "80%", "100%" ] +let { key } = await conn.sendMessage(m.chat, {text: `*Reiniciando...*`}, {quoted: m}) +for (let i = 0; i < hawemod.length; i++) { +await new Promise(resolve => setTimeout(resolve, 1000)); +await conn.sendMessage(m.chat, {text: hawemod[i], edit: key}, {quoted: m})} +await conn.sendMessage(m.chat, {text: `๐Ÿš€ Reiniciando Bot...\nPor favor espere un momento`, edit: key}, {quoted: m}); process.send('reset') -} else throw '_eeeeeiiittsssss..._' +} +loading() +} else throw 'eh' } handler.help = ['restart'] handler.tags = ['owner'] -handler.command = /^(reiniciar|res(tart)?)$/i -handler.exp = 500 +handler.command = ['restart','reiniciar'] handler.rowner = true - export default handler +const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) + + + + + \ No newline at end of file diff --git a/plugins/rpg-berburu_cazar.js b/plugins/rpg-berburu_cazar.js index 2469043de..fb5027ebf 100644 --- a/plugins/rpg-berburu_cazar.js +++ b/plugins/rpg-berburu_cazar.js @@ -1,24 +1,38 @@ -let handler = async (m, { conn, key}) => { -let fkontak = { "key": { "participants":"0@s.whatsapp.net", "remoteJid": "status@broadcast", "fromMe": false, "id": "Halo" }, "message": { "contactMessage": { "vcard": `BEGIN:VCARD\nVERSION:3.0\nN:Sy;Bot;;;\nFN:y\nitem1.TEL;waid=${m.sender.split('@')[0]}:${m.sender.split('@')[0]}\nitem1.X-ABLabel:Ponsel\nEND:VCARD` }}, "participant": "0@s.whatsapp.net" } +let handler = async (m, { conn }) => { -let user = global.db.data.users[m.sender] + const fkontak = { + "key": { + "participants":"0@s.whatsapp.net", + "remoteJid": "status@broadcast", + "fromMe": false, + "id": "Halo" + }, + "message": { + "contactMessage": { + "vcard": `BEGIN:VCARD\nVERSION:3.0\nN:Sy;Bot;;;\nFN:y\nitem1.TEL;waid=${m.sender.split('@')[0]}:${m.sender.split('@')[0]}\nitem1.X-ABLabel:Ponsel\nEND:VCARD` + } + }, + "participant": "0@s.whatsapp.net" +} + + let user = global.db.data.users[m.sender] -let randomaku1 = `${Math.floor(Math.random() * 5)}` -let randomaku2 = `${Math.floor(Math.random() * 5)}` -let randomaku4 = `${Math.floor(Math.random() * 5)}` -let randomaku3 = `${Math.floor(Math.random() * 5)}` -let randomaku5 = `${Math.floor(Math.random() * 5)}` -let randomaku6 = `${Math.floor(Math.random() * 5)}` -let randomaku7 = `${Math.floor(Math.random() * 5)}` -let randomaku8 = `${Math.floor(Math.random() * 5)}` -let randomaku9 = `${Math.floor(Math.random() * 5)}` -let randomaku10 = `${Math.floor(Math.random() * 5)}` -let randomaku11 = `${Math.floor(Math.random() * 5)}` -let randomaku12 = `${Math.floor(Math.random() * 5)}`.trim() + let randomaku1 = `${Math.floor(Math.random() * 5)}` + let randomaku2 = `${Math.floor(Math.random() * 5)}` + let randomaku4 = `${Math.floor(Math.random() * 5)}` + let randomaku3 = `${Math.floor(Math.random() * 5)}` + let randomaku5 = `${Math.floor(Math.random() * 5)}` + let randomaku6 = `${Math.floor(Math.random() * 5)}` + let randomaku7 = `${Math.floor(Math.random() * 5)}` + let randomaku8 = `${Math.floor(Math.random() * 5)}` + let randomaku9 = `${Math.floor(Math.random() * 5)}` + let randomaku10 = `${Math.floor(Math.random() * 5)}` + let randomaku11 = `${Math.floor(Math.random() * 5)}` + let randomaku12 = `${Math.floor(Math.random() * 5)}`.trim() -let rbrb1 = (randomaku1 * 1) + let rbrb1 = (randomaku1 * 1) let rbrb2 = (randomaku2 * 1) -let rbrb3 = (randomaku3 * 1) + let rbrb3 = (randomaku3 * 1) let rbrb4 = (randomaku4 * 1) let rbrb5 = (randomaku5 * 1) let rbrb6 = (randomaku6 * 1) @@ -77,32 +91,30 @@ let hsl = `*โœง Resultados de la caza ${conn.getName(m.sender)} โœง* global.db.data.users[m.sender].babi += rbrb11 global.db.data.users[m.sender].ayam += rbrb12 -let time = global.db.data.users[m.sender].lastberburu + 2700000 //45 Minutos //2700000 +let time = global.db.data.users[m.sender].lastberburu + 2700000 //2700000 = 45 Minutos if (new Date - global.db.data.users[m.sender].lastberburu < 2700000) return conn.reply(m.chat, `๐™‹๐™Š๐™ ๐™๐˜ผ๐™‘๐™Š๐™ ๐˜ฟ๐™€๐™Ž๐˜พ๐˜ผ๐™‰๐™Ž๐˜ผ ๐™๐™‰ ๐™ˆ๐™Š๐™ˆ๐™€๐™‰๐™๐™Š ๐™‹๐˜ผ๐™๐˜ผ ๐™‡๐™๐™€๐™‚๐™Š ๐™Ž๐™€๐™‚๐™๐™„๐™ ๐˜พ๐˜ผ๐™•๐˜ผ๐™‰๐˜ฟ๐™Š\n\nโซนโซบ ๐™๐™„๐™€๐™ˆ๐™‹๐™Š ${clockString(time - new Date())}\n${wm}`, fkontak, {contextInfo: { externalAdReply :{ mediaUrl: null, mediaType: 1, description: null, body: '๐’๐ฎ๐ฉ๐ž๐ซ ๐๐จ๐ญ ๐ƒ๐ž ๐–๐ก๐š๐ญ๐ฌ๐€๐ฉ๐ฉ', previewType: 0, thumbnail: imagen4, sourceUrl: [md, yt, tiktok].getRandom()}}}) +//conn.sendButton(m.chat, `๐™‹๐™Š๐™ ๐™๐˜ผ๐™‘๐™Š๐™ ๐˜ฟ๐™€๐™Ž๐˜พ๐˜ผ๐™‰๐™Ž๐˜ผ ๐™๐™‰ ๐™ˆ๐™Š๐™ˆ๐™€๐™‰๐™๐™Š ๐™‹๐˜ผ๐™๐˜ผ ๐™‡๐™๐™€๐™‚๐™Š ๐™Ž๐™€๐™‚๐™๐™„๐™ ๐˜พ๐˜ผ๐™•๐˜ผ๐™‰๐˜ฟ๐™Š\n\n๐™‹๐™‡๐™€๐˜ผ๐™Ž๐™€ ๐™๐™€๐™Ž๐™ ๐˜ผ ๐™ˆ๐™Š๐™ˆ๐™€๐™‰๐™ ๐˜ผ๐™‰๐˜ฟ ๐™๐™ƒ๐™€๐™‰ ๐˜พ๐™Š๐™‰๐™๐™„๐™‰๐™๐™€ ๐™ƒ๐™๐™‰๐™๐™„๐™‰๐™‚`, `โซนโซบ ๐™๐™„๐™€๐™ˆ๐™‹๐™Š : ๐™๐™„๐™ˆ๐™€ ${clockString(time - new Date())}\n${wm}`, null, [['๐Ÿž๏ธ ๐˜ผ๐™ฃ๐™ž๐™ข๐™–๐™ก๐™š๐™จ ๐˜พ๐™–๐™ฅ๐™ฉ๐™ช๐™ง๐™–๐™™๐™ค๐™จ ', '.kandang'],[`๐ŸŽ’ ๐™„๐™ฃ๐™ซ๐™š๐™ฃ๐™ฉ๐™–๐™ง๐™ž๐™ค | ๐™„๐™ฃ๐™ซ๐™š๐™ฃ๐™ฉ๐™ค๐™ง๐™ฎ`, `.inventario`]], fkontak, m) + +//setTimeout(() => { +async function loading() { +var hawemod = [ +`@${m.sender.split("@s.whatsapp.net")[0]} *${['Buscando implementos de caza...','Alistando todo para la caza!!','Estableciendo Lugar de la Caza...','PREPARANDO LUGAR DE CAZA!!'].getRandom()}*`, +`@${m.sender.split("@s.whatsapp.net")[0]} ${['Looking for hunting implements...','Getting everything ready for the hunt!!','Establishing Hunting Place...','PREPARING HUNTING PLACE!!'].getRandom()}`, +`@${m.sender.split("@s.whatsapp.net")[0]} *${['Armas lista para la Caza!!','Probando Armas ๐Ÿ”ซ ๐Ÿ’ฃ ๐Ÿช“ ๐Ÿน','CARROS PARA LA CAZA!! ๐Ÿš— ๐Ÿ๏ธ ๐Ÿšœ','TIEMPO BUENO PARA LA CAZA ๐Ÿงค'].getRandom()}*`, +`@${m.sender.split("@s.whatsapp.net")[0]} *${['OBJETIVO FIJADO ๐ŸŽฏ','Carnada en Marcha ๐Ÿซ ๐Ÿ‡ ๐Ÿ–','ANIMALES DETECTADOS!! ๐Ÿ‚ ๐Ÿ… ๐Ÿ˜ ๐Ÿผ','ANIMALES DETECTADOS!! ๐Ÿ– ๐Ÿƒ ๐Ÿฎ ๐Ÿ’'].getRandom()}*` +] -setTimeout(() => { -conn.reply(m.chat, hsl, fkontak, {contextInfo: { externalAdReply :{ mediaUrl: null, mediaType: 1, description: null, title: ag, body: '๐’๐ฎ๐ฉ๐ž๐ซ ๐๐จ๐ญ ๐ƒ๐ž ๐–๐ก๐š๐ญ๐ฌ๐€๐ฉ๐ฉ', previewType: 0, thumbnail: imagen4, sourceUrl: [md, yt, tiktok].getRandom()}}}) -//conn.reply(m.chat, hsl, fkontak, m) -/*conn.sendHydrated(m.chat, hsl, wm, null, md, `๐™ถ๐™ธ๐šƒ๐™ท๐š„๐™ฑ`, null, null, [ -[null, null]], null)*/ -}, 20000) - -setTimeout(() => { -conn.reply(m.chat, `@${m.sender.split("@s.whatsapp.net")[0]} *${['OBJETIVO FIJADO ๐ŸŽฏ','Carnada en Marcha ๐Ÿซ ๐Ÿ‡ ๐Ÿ–','ANIMALES DETECTADOS!! ๐Ÿ‚ ๐Ÿ… ๐Ÿ˜ ๐Ÿผ','ANIMALES DETECTADOS!! ๐Ÿ– ๐Ÿƒ ๐Ÿฎ ๐Ÿ’'].getRandom()}*`, null, { mentions: [m.sender]})}, 18000) -//conn.sendHydrated(m.chat, `${conn.getName(m.sender)} *${['OBJETIVO FIJADO ๐ŸŽฏ','Carnada en Marcha ๐Ÿซ ๐Ÿ‡ ๐Ÿ–','ANIMALES DETECTADOS!! ๐Ÿ‚ ๐Ÿ… ๐Ÿ˜ ๐Ÿผ','ANIMALES DETECTADOS!! ๐Ÿ– ๐Ÿƒ ๐Ÿฎ ๐Ÿ’'].getRandom()}*`, wm, null, null, null, null, null, [[null, null]], null)}, 18000) +let { key } = await conn.sendMessage(m.chat, {text: `@${m.sender.split("@s.whatsapp.net")[0]} *${['Buscando implementos de caza...','Alistando todo para la caza!!','Estableciendo Lugar de la Caza...','PREPARANDO LUGAR DE CAZA!!'].getRandom()}*`, mentions: [m.sender]}, {quoted: m}) -setTimeout(() => { -conn.reply(m.chat, `@${m.sender.split("@s.whatsapp.net")[0]} *${['Armas lista para la Caza!!','Probando Armas ๐Ÿ”ซ ๐Ÿ’ฃ ๐Ÿช“ ๐Ÿน','CARROS PARA LA CAZA!! ๐Ÿš— ๐Ÿ๏ธ ๐Ÿšœ','TIEMPO BUENO PARA LA CAZA ๐Ÿงค'].getRandom()}*`, {mentions: [m.sender]})}, 15000) -//conn.sendHydrated(m.chat, `${conn.getName(m.sender)} *${['Armas lista para la Caza!!','Probando Armas ๐Ÿ”ซ ๐Ÿ’ฃ ๐Ÿช“ ๐Ÿน','CARROS PARA LA CAZA!! ๐Ÿš— ๐Ÿ๏ธ ๐Ÿšœ','TIEMPO BUENO PARA LA CAZA ๐Ÿงค'].getRandom()}*`, wm, null, null, null, null, null, [[null, null]], null)}, 15000) +for (let i = 0; i < hawemod.length; i++) { -setTimeout(() => { -conn.reply(m.chat, `@${m.sender.split("@s.whatsapp.net")[0]} *${['Looking for hunting implements...','Getting everything ready for the hunt!!','Establishing Hunting Place...','PREPARING HUNTING PLACE!!'].getRandom()}*`, {mentions: [m.sender]})}, 18000) -//conn.sendHydrated(m.chat, `${conn.getName(m.sender)} *${['Looking for hunting implements...','Getting everything ready for the hunt!!','Establishing Hunting Place...','PREPARING HUNTING PLACE!!'].getRandom()}*`, wm, null, null, null, null, null, [[null, null]], null)}, 14000) +await conn.sendMessage(m.chat, {text: hawemod[i], mentions: [m.sender], edit: key}, {quoted: m}) +await new Promise((resolve) => setTimeout(resolve, 5000))} -setTimeout(() => { -conn.reply(m.chat, `@${m.sender.split("@s.whatsapp.net")[0]} *${['Buscando implementos de caza...','Alistando todo para la caza!!','Estableciendo Lugar de la Caza...','PREPARANDO LUGAR DE CAZA!!'].getRandom()}*`, {mentions: [m.sender]})}, {edit: key}, key, 18000) -//conn.sendHydrated(m.chat, `${conn.getName(m.sender)} *${['Buscando implementos de caza...','Alistando todo para la caza!!','Estableciendo Lugar de la Caza...','PREPARANDO LUGAR DE CAZA!!'].getRandom()}*`, wm, null, null, null, null, null, [[null, null]], null)}, 0) -user.lastberburu = new Date * 1 +await conn.sendMessage(m.chat, {text: hsl, mentions: [m.sender], edit: key}, {quoted: m}) +} +loading() +user.lastberburu = new Date * 1 } handler.help = ['berburu'] handler.tags = ['rpg'] @@ -119,6 +131,7 @@ function clockString(ms) { return [h, m, s].map(v => v.toString().padStart(2, 0) ).join(':') } + /*function msToTime(duration) { var milliseconds = parseInt((duration % 1000) / 100), seconds = Math.floor((duration / 1000) % 60),