Pixiv Image Search for WhatsApp
import fetch from 'node-fetch';
const handler = async (m, { conn, text, usedPrefix, command }) => { if (!text) throw `Enter Title!
Example: ${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
VERSION:3.0
N:;a,;;;
FN:${name}
item1.TEL;waid=${m.sender.split('@')[0]}:${m.sender.split('@')[0]}
item1.X-ABLabel:Ponsel
END: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;
原文地址: http://www.cveoy.top/t/topic/hiOu 著作权归作者所有。请勿转载和采集!