> npm i wa-leal-stickers
Before using the library, you need to import it.
import { toSticker, StickerTypes } from 'wa-leal-stickers' // ES6
const stickerBuffer = await toSticker(buffer, {
pack: 'Pack_name', // The pack name
author: 'Your_name', // The author name
type: StickerTypes.DEFAULT, // The sticker type (only work for images)
fps: 10 // The fps of the output file
})
// Example sending sticker on Baileys
conn.sendMessage(jid, {sticker : stickerBuffer})
const StickerTypes = {
DEFAULT = 'default',
CIRCLE = 'circle',
}