@neoxr/quote-api
v1.1.1-dev
Published
Quote Generator by LyoSU
Downloads
41
Readme
Quote Generator
This package comes from LyoSU - Quote API which I modified slightly.
Example
const quoteApi = require('@neoxr/quote-api')
const fs = require('node:fs')
const text = "Hello World"
const username = "Alι_Aryαɴ"
const avatar = "https://telegra.ph/file/59952c903fdfb10b752b3.jpg"
const json = {
"type": "quote",
"format": "png",
"backgroundColor": "#FFFFFF",
"width": 512,
"height": 768,
"scale": 2,
"messages": [
{
"entities": [],
"avatar": true,
"from": {
"id": 1,
"name": username,
"photo": {
"url": avatar
}
},
"text": text,
"replyMessage": {}
}
]
}
quoteApi(json).then(res => {
const buffer = Buffer.from(res.image, 'base64')
fs.writeFile('Quotly.png', buffer, (err) => {
if (err) throw err
})
})