@neoxr/quote-api

1.1.1-dev • Public • Published

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
   })
})

Readme

Keywords

none

Package Sidebar

Install

npm i @neoxr/quote-api

Weekly Downloads

601

Version

1.1.1-dev

License

MIT

Unpacked Size

82.9 MB

Total Files

22

Last publish

Collaborators

  • neoxr