Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Commit

Permalink
add feature and fixed something
Browse files Browse the repository at this point in the history
  • Loading branch information
Urbaexyz committed Sep 10, 2021
1 parent 0632227 commit 73de758
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 10 deletions.
55 changes: 46 additions & 9 deletions HandleMsg.js
Original file line number Diff line number Diff line change
Expand Up @@ -1614,26 +1614,48 @@ module.exports = HandleMsg = async (urbae, message) => {
}
break
case prefix + 'playstore':
if (!isGroupMsg) return urbae.reply(from, `Perintah ini hanya bisa di gunakan dalam group!`, id)
if (args.length === 0) return urbae.reply(from, `Kirim perintah *${prefix}playstore [ Query ]*, Contoh : *${prefix}playstore Mobile Legends*`)
const keywotp = body.slice(11)
urbae.reply(from, mess.wait, id)
try {
const dataplai = await axios.get(`https://api.vhtear.com/playstore?query=${keywotp}&apikey=${vhtearkey}`)
const dataplai = await axios.get(`https://api.zeks.me/api/sgplay?apikey=${apikeyvinz}&q=${keywotp}`)
const dataplay = dataplai.data
let keluarplay = `*「 PLAYSTORE 」*\n\nHasil Pencarian : ${keywotp}*\n`
for (let i = 0; i < dataplay.result.length; i++) {
keluarplay += `\n─────────────────\n\n• *Nama* : ${dataplay.result[i].title}\n• *Developer* : ${dataplay.result[i].developer}\n• *Deskripsi* : ${dataplay.result[i].description}\n• *Paket ID* : ${dataplay.result[i].app_id}\n• *Harga* : ${dataplay.result[i].price}\n• *Link App* : https://play.google.com${dataplay.result[i].url}\n`
if (dataplay.status == false) return urbae.reply(from, 'Aplikasi yang kamu cari tidak dapat ditemukan atau mungkin Rest Api sedang error', id)
const dataresultt = dataplay.result
let keluarplay = `*「 P L A Y S T O R E 」*`
for (let i = 0; i < dataresultt.length; i++) {
keluarplay += `\n─────────────────\n\n• *Nama* : ${dataresultt[i].title}\n• *Developer* : ${dataresultt[i].developer}\n• *Id App* : ${dataresultt[i].appid}\n• *Harga* : ${dataresultt[i].price}\n• *Rating* : ${dataresultt[i].rating}\n• *Link App* : ${dataresultt[i].url}\n`
}
await urbae.sendFileFromUrl(from, dataplay.result[0].icon, `iconapk.webp`, keluarplay, id)
await urbae.sendFileFromUrl(from, dataresultt[0].thumb, ``, keluarplay, id)
} catch (err) {
console.log(err)
}
break
case prefix + 'infoapp':
case prefix + 'infoapk':
if (args.length == 0) return urbae.reply(from, `Masukkan id aplikasi\nContoh : ${prefix}infoapp com.tencent.ig`, id)
urbae.reply(from, mess.wait, id)
const idaplikasi = body.slice(9)
axios.get(`https://dapuhy-api.herokuapp.com/api/search/playstore-info?id=${idaplikasi}&apikey=${dapuhyapi}`)
.then(async (res) => {
if (res.data.status == false) return urbae.reply(from, 'id apk yang kamu cari tidak dapat ditemukan atau mungkin Rest Api sedang error', id)
await urbae.sendFileFromUrl(from, res.data.result.icon, '', `*App:* ${res.data.result.title}\n*Snippet:* ${res.data.result.snippet}\n*Version:* ${res.data.result.version}\n*Genre:* ${res.data.result.genre}\n*Price:* ${res.data.result.price}\n*Ratings:* ${res.data.result.rating}\n*User Ratings:* ${res.data.result.ratings}\n*Whatsnew:* ${res.data.result.whatsnew}\n*Desc:* ${res.data.result.description}`, id)
})
.catch(err => {
console.log(err)
urbae.reply(from, err.message, id)
})
break
case prefix + 'reportbug':
urbae.reply(from, mess.wait, id)
const reporter = body.slice(11)
await urbae.sendText(ownerNumber, `Laporan bug dari : *${pushname}*\nNomor : ${serial.replace('@c.us', '')}\n\nBug : *${reporter}*`)
const getuserpicture = await urbae.getProfilePicFromServer(sender.id)
if (getuserpicture == undefined) {
var profilepicc = errorImg
} else {
var profilepicc = getuserpicture
}
await urbae.sendFileFromUrl(ownerNumber, profilepicc, 'prof.jpg', `Laporan bug dari : *${pushname}*\nNomor : ${serial.replace('@c.us', '')}\n\nBug : *${reporter}*`, id)
urbae.reply(from, 'Laporan berhasil dikirim ke Owner Bot!', id)
break
case prefix + 'setgroupname':
Expand Down Expand Up @@ -3282,6 +3304,21 @@ module.exports = HandleMsg = async (urbae, message) => {
urbae.reply(from, `Tv yang anda cari tidak tersedia`, id)
}
break
case prefix + 'ecchi':
urbae.reply(from, mess.wait, id)
const echhiurl = await axios.get(`https://dapuhy-api.herokuapp.com/api/kartun/ecchi?apikey=${dapuhy - api}`)
const ecchidata = ecchiurl.data
const ecchires = ecchidata.result
let ecchitext = `*「 GENRE ECCHI 」*\n`
for (let i = 0; i < ecchires.length; i++) {
ecchitext = `\n─────────────────\n\n*•Judul:* ${ecchires[i].title}\n*•Status:* ${ecchires[i].status}\n*•Url:* ${ecchires[i].url}\n`
}
await urbae.sendFileFromUrl(from, ecchires[0].thumb, 'thumb.jpg', ecchitext, id)
.catch(err => {
console.log(err)
urbae.reply(from, err.message, id)
})
break
case prefix + 'lk21new':
urbae.reply(from, mess.wait, id)
try {
Expand Down Expand Up @@ -4751,12 +4788,12 @@ module.exports = HandleMsg = async (urbae, message) => {
urbae.reply(from, mess.wait, id)
axios.get(`https://dapuhy-api.herokuapp.com/api/socialmedia/igstory?username=${usernamee}&apikey=${dapuhyapi}`)
.then(async (res) => {
if (res.data.status == false) return aruga.reply(from, res.data.message, id)
if (res.data.status == false) return urbae.reply(from, res.data.message, id)
await urbae.sendFileFromUrl(from, res.data.url, '', '', id)
})
.catch(err => {
console.log(err)
aruga.reply(from, err.message, id)
urbae.reply(from, err.message, id)
})
break
case prefix + 'igstory':
Expand Down
4 changes: 3 additions & 1 deletion lib/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const help = (prefix, jame, betime, blockNumber, prem, banned, cts, waver) => {
*┃➥ Repo : github.com/Urbaeexyz/wa-bot*
*┃➥ Library : @open-wa/wa-automate*
*┃➥ Bot Name : Urbaeexyz*
*┃➥ Whatsapp Bot Ver : 2.6.0*
*┃➥ Whatsapp Bot Ver : 2.6.2*
*┃➥ Creator : Thoriq Azzikra*
*┃➥ Date : ${betime}*
*┃➥ Time : ${jame}*
Expand Down Expand Up @@ -278,6 +278,7 @@ const help = (prefix, jame, betime, blockNumber, prem, banned, cts, waver) => {
*┃➥${prefix}gabut*
*┃➥${prefix}marvel*
*┃➥${prefix}discord*
*┃➥${prefix}infoapp*
*┗━───────────────╯*
_-_-_-_-_-_-_-_-_-_-_-_-_-_
Expand Down Expand Up @@ -378,6 +379,7 @@ _-_-_-_-_-_-_-_-_-_-_-_-_-_
*┏━───────────────╮*
*┃➥${prefix}tebakanime*
*┃➥${prefix}ecchi*
*┃➥${prefix}nanimelatest*
*┃➥${prefix}nanimeget*
*┃➥${prefix}nanimesr*
Expand Down

0 comments on commit 73de758

Please sign in to comment.