descargas-imagen.js 1.2 KB

12345678910111213141516171819
  1. import {googleImage} from '@bochilteam/scraper';
  2. const handler = async (m, {conn, text, usedPrefix, command}) => {
  3. if (!text) return m.reply(`๐—ค๐˜‚๐—ฒ ๐—ฏ๐˜‚๐˜€๐—ฐ๐—ฎ๐—ฟ? ๐Ÿค”๏ธ ๐™ช๐˜€๐™–๐™ง ๐™™๐™š ๐™ก๐™– ๐™จ๐™ž๐™œ๐™ช๐™ž๐™š๐™ฃ๐™ฉ๐™š ๐™ข๐™–๐™ฃ๐™š๐™ง๐™–\nโ€ข ๐—˜๐—ท๐—ฒ๐—บ๐—ฝ๐—น๐—ผ\n*${usedPrefix + command} Kantu*`)
  4. if (m.text.includes('gore') || m.text.includes('cp')|| m.text.includes('porno')|| m.text.includes('Gore')|| m.text.includes('rule')|| m.text.includes('CP') || m.text.includes('Rule34') || m.text.includes('xxx')) throw '๐Ÿ™„ No voy a buscar tu pendejadas....'
  5. try {
  6. const res = await googleImage(text);
  7. const image = await res.getRandom();
  8. const link = image;
  9. conn.sendFile(m.chat, link, 'error.jpg', `_๐Ÿ”Ž ๐™๐™š๐™จ๐™ช๐™ก๐™ฉ๐™–๐™™๐™ค๐™จ ๐™™๐™š: ${text}_`, m, null, fake);
  10. //conn.sendButton(m.chat, ``, botname, link, [['๐Ÿ”„ ๐’๐ˆ๐†๐”๐ˆ๐„๐๐“๐„ ๐Ÿ”„', `/${command} ${text}`]], null, null, m, null, fake)
  11. } catch (e) {
  12. console.log(e)
  13. }}
  14. handler.help = ['gimage <query>', 'imagen <query>'];
  15. handler.tags = ['buscadores'];
  16. handler.command = /^(gimage|image|imagen)$/i;
  17. handler.register = true
  18. handler.limit = 1
  19. export default handler;