wa-sticker-tew
TypeScript icon, indicating that this package has built-in type declarations

2.3.6 • Public • Published
WATCIKER

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

Package Sidebar

Install

npm i wa-sticker-tew

Weekly Downloads

2

Version

2.3.6

License

ISC

Unpacked Size

33.7 MB

Total Files

135

Last publish

Collaborators

  • tewchaynz