ubah kode var fetch = requirenode-fetchvar handler = async m conn text usedPrefix command = if !text throw Enter Title!nnExample $usedPrefix + command loli kawai try connsendMessagemchat react
import fetch from "node-fetch";
const handler = async (m, { conn, text, usedPrefix, command }) => {
if (!text) throw Enter Title!\n\nExample: ${usedPrefix + command} loli kawai;
try {
conn.sendMessage(m.chat, { react: { text: '����', key: m.key }});
const dann = await fetch(https://api.lolhuman.xyz/api/pixiv?apikey=zycaxriu&query=${text});
const res = await dann.json();
const name = m.sender;
const fkonn = { key: { fromMe: false, participant: 0@s.whatsapp.net, ...(m.chat ? { remoteJid: '6288980870067@s.whatsapp.net' } : {}) }, message: { contactMessage: { displayName: ${await conn.getName(name)}, vcard: BEGIN:VCARD\nVERSION:3.0\nN:;a,;;;\nFN:${name}\nitem1.TEL;waid=${m.sender.split('@')[0]}:${m.sender.split('@')[0]}\nitem1.X-ABLabel:Ponsel\nEND:VCARD}}};
await conn.reply(m.chat, fkonn);
conn.sendFile(m.chat, res.result[0].image, '', res.result[0].title, m);
} catch (e) {
console.log(e);
m.reply(🐱 Failed to search ${text});
}
};
handler.command = handler.help = ['pixiv']; handler.tags = ['internet']; handler.limit = true; export default handler;
原文地址: https://www.cveoy.top/t/topic/jcyM 著作权归作者所有。请勿转载和采集!