Advertisement
AnshorFalahi

hijabkan.js

Jun 13th, 2025
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. exports.run = {
  2.    usage: ['hijabkan'],
  3.    use: 'reply photo',
  4.    category: 'utilities',
  5.    async: async (m, {
  6.       client,
  7.       isPrefix,
  8.       command,
  9.       Func,
  10.       Scraper
  11.    }) => {
  12.       try {
  13.          if (m.quoted ? m.quoted.message : m.msg.viewOnce) {
  14.             let type = m.quoted ? Object.keys(m.quoted.message)[0] : m.mtype
  15.             let q = m.quoted ? m.quoted.message[type] : m.msg
  16.             if (/image/.test(type)) {
  17.             client.sendReact(m.chat, '🕒', m.key)
  18.                let img = await client.downloadMediaMessage(q)
  19.                let image = await Scraper.uploadImageV2(img)
  20.                let  hijab = await Func.fetchBuffer(`https://apizell.web.id/ai/hijabkan?imageUrl=${image.data.url}`)
  21.                client.sendFile(m.chat, hijab, 'image.png', '', m)
  22.             } else client.reply(m.chat, Func.texted('bold', `🚩 Only for photo.`), m)
  23.          } else {
  24.             let q = m.quoted ? m.quoted : m
  25.             let mime = (q.msg || q).mimetype || ''
  26.             if (!mime) return client.reply(m.chat, Func.texted('bold', `🚩 Reply photo.`), m)
  27.             if (!/image\/(jpe?g|png)/.test(mime)) return client.reply(m.chat, Func.texted('bold', `🚩 Only for photo.`), m)
  28.             client.sendReact(m.chat, '🕒', m.key)
  29.             let img = await q.download()
  30.             let image = await Scraper.uploadImageV2(img)
  31.             let hijab = await Func.fetchBuffer(`https://apizell.web.id/ai/hijabkan?imageUrl=${image.data.url}`)
  32.             client.sendFile(m.chat, hijab, 'image.png', '', m)
  33.          }
  34.       } catch (e) {
  35.          return client.reply(m.chat, Func.jsonFormat(e), m)
  36.       }
  37.    },
  38.    error: false,
  39.    limit: true,
  40.    cache: true,
  41.    location: __filename
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement