import { sticker } from '../lib/sticker.js' import axios from 'axios'

const handler = async (m, { conn, text }) => { if (!text) return m.reply('Teksnya Mana Sayang?') if (text.length > 30) return m.reply('Maksimal 30 Teks!') let pp = await conn.profilePictureUrl(m.sender, 'image').catch(_ => 'https://i.ibb.co/3Fh9V6p/avatar-contact.png')

const obj = { 'type': 'quote', 'format': 'png', 'backgroundColor': '#FFFFFF', 'width': 512, 'height': 768, 'scale': 2, 'messages': [{ 'entities': [], 'avatar': true, 'from': { 'id': 1, 'name': m.name, 'photo': { 'url': pp } }, 'text': text, 'replyMessage': {} }] } const json = await axios.post('https://bot.lyo.su/quote/generate', obj, { headers: { 'Content-Type': 'application/json' } }) const buffer = Buffer.from(json.data.result.image, 'base64') let stiker = await sticker(buffer, false, global.packname, global.author) if (stiker) return conn.sendFile(m.chat, stiker, 'Quotly.webp', '', m) }

handler.help = ['qc'] handler.tags = ['sticker'] handler.command = /^(qc|quoted|quotly)$/i

handler.limit = true

export default handler

Quotly: Create Stickers with Text Quotes

原文地址: https://www.cveoy.top/t/topic/Dr1 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录