wa-sticker-tew
v2.3.6
Published
<div align="center"> <img src="https://i.ibb.co/sHwxdFm/nightcore.jpg" alt="WATCIKER" width="500" />
Downloads
113
Maintainers
Readme
WA-STICKER-TEW
Whatsapp Sticker Creator/Formatter!
Installation
> npm i wa-sticker-tew
Usage
Importing
💜 JavaScript
const WSF = require('wa-sticker-tew')
💜 TypeScript
import * as WSF from 'wa-sticker-tew'
Raw Functions
Add Metadata to Webp
const webpWithMetadata = await WSF.setMetadata('Pack Title', 'Author', image.webp) //returns the webp buffer with metadata
Create an exif metadata file
const exif = createExif('Pack', 'Author', 'filename') //returns the filename with ".exif"
Creating Sticker
Note: The following methods need imageMagick Legacy CLI tools
to be installed in your system
Regular Sticker
const sticker = new WSF.Sticker('image.png', {})
await sticker.build()
const sticBuffer = await sticker.get()
Non-streched sticker
const image = 'https://example.com/example.png'
const sticker = new WSF.Sticker(image, { crop: false })
await sticker.build()
const sticBuffer = await sticker.get()
Non-cropped Animated sticker
const sticker = new WSF.Sticker('./image.mp4', { crop: false, animated: true })
await sticker.build()
const sticBuffer = await sticker.get()
Sticker with Pack and Author Name
const sticker = new WSF.Sticker('https://example.com/sample.mp4', { crop: false, animated: true, pack: 'Pack', author: 'AUTHOR' })
await sticker.build()
const sticBuffer = await sticker.get()
Saving/Sending
Saving to File
fs.writeFile('sticker.webp', sticBuffer)
Sending With Baileys
conn.sendMessage(jid, sticBuffer, MessageType.sticker)
Sending With Open-Wa/Wa-Automate-Nodejs
client.sendRawWebpAsSticker(jid, sticBuffer.toString('base64'))