From 54dc3bbae847cea3a759164b47bc7c66656ebbad Mon Sep 17 00:00:00 2001 From: Urbaexyz Date: Mon, 7 Mar 2022 04:19:07 +0000 Subject: [PATCH] kisah nabi --- HandleMsg.js | 8 +++----- package.json | 5 ++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/HandleMsg.js b/HandleMsg.js index 40fe8b3..f219308 100644 --- a/HandleMsg.js +++ b/HandleMsg.js @@ -2133,11 +2133,10 @@ module.exports = HandleMsg = async (urbae, message) => { break case prefix + 'kisahnabi': if (args.length == 0) return urbae.reply(from, `Kirim perintah ${prefix}kisahnabi nama nabi\nContoh : ${prefix}kisahnabi adam`, id) - const dudo2 = body.slice(11) - axios.get(`https://kisahnabi-api-zhirrr.vercel.app/api/searchnabi?q=${dudo2}`) + apirizky.search.kisahnabi(q) .then(async (res) => { - const textnab = `Nama : *${res.data.nabi.nama}*\nLahir : *${res.data.nabi.lahir}*\nUmur : *${res.data.nabi.umur}*\nTempat : *${res.data.nabi.tempat}*\n\nKisah : ${res.data.nabi.kisah}` - urbae.reply(from, textnab, id) + const textnab = `*- Nama:* ${res.result.name}\n*- Lahir:* ${res.result.thn_kelahiran}\n*- Umur:* ${res.result.usia}\n*- Kisah:*\n\n${res.result.description}` + await urbae.reply(from, textnab, id) .catch((err) => { urbae.reply(from, 'Maaf, nama nabi yang anda masukkan salah', id) }) @@ -2450,7 +2449,6 @@ module.exports = HandleMsg = async (urbae, message) => { } else { urbae.reply(from, mess.error.St, id) } - lists break case prefix + 'fakethumb': if (isMedia && isImage || isQuotedImage) { diff --git a/package.json b/package.json index 27311f7..29a0a61 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "homepage": "https://github.com/Urbaexyz/whatsapp-bot", "dependencies": { - "@open-wa/wa-automate": "^4.31.7", + "@open-wa/wa-automate": "^4.31.12", "@phaticusthiccy/open-apis": "^1.6.0", "app-root-path": "^3.0.0", "axios": "^0.21.4", @@ -69,8 +69,7 @@ "xfarr-api": "^1.0.3", "xteam-api": "^0.0.7", "yt-search": "^2.10.3", - "ytdl-core": "^4.11.0", - "yuzzu-api": "^1.0.2" + "ytdl-core": "^4.11.0" }, "directories": { "lib": "lib"