-
Notifications
You must be signed in to change notification settings - Fork 9
/
hornycard.js
30 lines (28 loc) · 954 Bytes
/
hornycard.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const uploadImage = require('../lib/uploadImage')
const { sticker } = require('../lib/sticker')
const { MessageType } = require('@adiwajshing/baileys')
let handler = async (m, { conn, text }) => {
await m.reply(global.wait)
try {
let q = m.quoted ? m.quoted : m
let mime = (q.msg || q).mimetype || ''
if (!mime) throw 'Tidak ada foto'
if (!/image\/(jpe?g|png)/.test(mime)) throw `Mime ${mime} tidak support`
let img = await q.download()
let url = await uploadImage(img)
let Horny = `https://some-random-api.ml/canvas/horny?avatar=${url}`
let stiker = await sticker(null, Horny, 'Horny', '@Kokoronationz')
conn.sendMessage(m.chat, stiker, MessageType.sticker, {
quoted: m
})
} catch (e) {
m.reply('Conversion Failed')
}
}
handler.help = ['horny (caption|reply media)']
handler.tags = ['sticker']
handler.command = /^(horny)card$/i
handler.limit = true
handler.group = false
handler.register = true
module.exports = handler