-
-
Save INR-L/ce2e88d9e47261c535d7bc88c51368fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { inrl , tiny, config, inrlQuita, insult , getBuffer, randomStyle, styletext, send_alive, send_menu } = require('../lib/') | |
const Config = require("../config"); | |
const {getVar}=require('../lib/database/variable'); | |
const got = require('got'); | |
inrl( | |
{ | |
pattern: ['apk'], | |
desc: 'no desc', | |
sucReact: "💯", | |
category: ["system", "all"], | |
type :'info' | |
}, | |
async (message, client, match) => { | |
const {FOOTER, PREFIX} =await getVar(); | |
let prefix =PREFIX =='false'?'':PREFIX; | |
if(!match) return message.reply('need name of apk'); | |
match = match.trim(); | |
let {body} = await got(`https://inrl-web.vercel.app/api/apk?name=${match}`),listSerch =[]; | |
body = JSON.parse(body).result; | |
for (let i =1;i<body.length;i++) { | |
listSerch.push({ | |
title: body[i].title, | |
rowId: `${prefix}getapkinfo ${body[i].title}`, | |
description: `${FOOTER}` | |
}) | |
} | |
const sections = [ | |
{ | |
title: "serch result for "+match, | |
rows: listSerch | |
} | |
] | |
const listMessage = { | |
text: "result for "+match, | |
footer: FOOTER, | |
title: '```'+`click the LIST button to viwe your result`+'```', | |
buttonText: "LIST", | |
sections | |
} | |
return await client.sendMessage(message.from, listMessage, { quoted: message }); | |
}); | |
inrl( | |
{ | |
pattern: ['getapkinfo'], | |
desc: 'no desc', | |
sucReact: "💯", | |
category: ["system", "all"], | |
type :'info' | |
}, | |
async (message, client, match) => { | |
const {FOOTER, PREFIX} =await getVar(); | |
let prefix =PREFIX =='false'?'':PREFIX; | |
match = match.trim(); | |
let {body} = await got(`https://inrl-web.vercel.app/api/apk?name=${match}`); | |
body = JSON.parse(body).result; | |
for (let i =1;i<body.length;i++) { | |
return messag.reply(JSON.stringify(body[i].title.trim())+match); | |
if(body[i].title.trim() == match){ | |
const buttons = [ | |
{buttonId: `${prefix}apkdwd ${body[i].url}`, buttonText: {displayText: 'DOWNLOAD'}, type: 1}, | |
] | |
const buttonMessage = { | |
image: {url: body[i].icon+'.jpeg'}, | |
caption: `title: ${body[i].title} \n appID : ${body[i].appId}\ndeveloper : ${body[i].developer}\nurl:${body[i].url}\npaid: ${body[i].free}`, | |
footer: FOOTER, | |
buttons: buttons, | |
headerType: 4 | |
} | |
return await client.sendMessage(messag.from, buttonMessage, {quoted:message}); | |
} | |
} | |
}); | |
inrl( | |
{ | |
pattern: ['apkdwd'], | |
desc: 'no desc', | |
sucReact: "💯", | |
category: ["system", "all"], | |
type :'info' | |
}, | |
async (message, client, match) => { | |
try { | |
return await client.sendMessage(message.from, { | |
document: { | |
url: match.trim() | |
}, | |
mimetype: 'apk', | |
fileName: "apk" | |
}, { | |
quoted: message | |
}) | |
} catch(e){ | |
message.reply(`error:-${match}`); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment