@itsliaaa/starseal
v0.5.1
Published
A lightweight WhatsApp sticker toolkit with a fluent API.
Maintainers
Readme
🎨 @itsliaaa/starseal
☕ For donation: Saweria
📋 Table of Contents
- 📥 Installations
- 📄 Quick Start
- ⚙️ Options
- 💡 Notes
- 🖼️ Read WebP
- ⚙️ Configuration
- 📋 Requirements
- 🚀 Try the Bot
- 📣 Credits
📥 Installations
📄 Via package.json
# NPM
"dependencies": {
"@itsliaaa/starseal": "latest"
}
# GitHub
"dependencies": {
"@itsliaaa/starseal": "github:itsliaaa/starseal"
}⌨️ Via terminal
# NPM
npm i @itsliaaa/starseal@latest
# GitHub
npm i @itsliaaa/starseal@github:itsliaaa/starseal🧩 Import (ESM & CJS)
// --- ESM
import { create } from '@itsliaaa/starseal'
// --- CJS (tested and working on Node.js 24 ✅)
const { create } = require('@itsliaaa/starseal')📄 Quick Start
import { create } from '@itsliaaa/starseal'
// Accepts a Buffer, URL, or file path.
const stickerBuffer = await create(bufferOrUrl)
.packName('My Sticker Pack 🎨')
.publisherName('Lia Wynn ✨')
.toBuffer()
// Send using Baileys
// await sock.sendMessage(jid, {
// sticker: stickerBuffer
// })⚙️ Options
Starseal supports two configuration styles:
- Fluent API: chain methods for better readability.
- Object API: pass all options in a single configuration object.
📎 Fluent API
import { create } from '@itsliaaa/starcore'
const stickerBuffer = await create(bufferOrUrl)
.shape(
'round',
1.0 // Scale, but its optional
)
.id('ABCDEFG') // ID sticker but its optional
.packName('My Sticker Pack 🎨')
.publisherName('Lia Wynn ✨')
.emojis('🎨, ✨, ❤️') // String or array is supported.
.accessibilityText('This sticker was made using Starseal!')
.flags({
ai: true,
lock: false,
premium: true
})
.options({
width: 512, height: 512,
flags: 'bilinear',
format: 'yuva420p',
brightness: 0.1,
contrast: 0.05,
saturation: 0.2,
gamma: 0.03,
blur: { sigma: 5, steps: 1 }, // Add gaussian blur
// Animated WebP options
fps: 24, // Maximum frame rate
trimStart: '00:00:00', // Start timestamp
trimEnd: '00:00:05' // End timestamp
})
.toBuffer() // Or: ".toFile('./my-sticker.webp')", ".toBase64()", ".toStream()", ".toDataURL()"- ⬜ Available Shapes:
type ShapeType =
| 'cross'
| 'diamond'
| 'heart'
| 'hexagon'
| 'octagon'
| 'pentagon'
| 'round'
| 'star'
| 'triangle';📋 Object API
import { create } from '@itsliaaa/starcore'
const myOptions = {
shape: 'heart', // Or "{ type: 'heart', scale: 2.2 }"
id: 'ABCDEFG',
packName: 'My Sticker Pack 🎨',
publisherName: 'Lia Wynn ✨',
emojis: ['🎨', '✨', '❤️'],
accessibilityText: 'This sticker was made using Starseal!',
ai: false,
lock: true,
premium: false,
width: 512,
height: 512,
flags: 'bilinear',
format: 'yuva420p',
brightness: 0.1,
contrast: 0.05,
saturation: 0.2,
gamma: 0.03,
blur: 2, // Number of blur steps, or "{ sigma, steps }"
fps: 24,
trimStart: '00:00:00',
trimEnd: '00:00:05'
}
const stickerBuffer = await create(bufferOrUrl, myOptions)
.toBuffer()💡 Notes
emojisaccepts either:- A comma-separated string ('🎨, ✨, ❤️').
- And, array (['🎨', '✨', '❤️']).
.toBuffer()returns aBuffer..toFile(path)writes the sticker to disk and returns the output path..toBase64()returns abase64string..toDataURL()returns adata:URL string (data:image/webp;base64,...)..toStream()returns aReadablestream.ai: true: Marks the sticker as AI-generated, displaying an AI logo and a "Create AI Sticker" button.lock: true: Prevents other users from saving the sticker.premium: true: Marks the sticker as premium, sending it as a premium sticker and displaying a diamond logo.
🖼️ Read WebP
Reads a WebP image from a Buffer or a URL and provides access to its metadata, EXIF, and animation frames.
import { readWebP } from '@itsliaaa/starseal'
const webp = await readWebP(bufferOrUrl)
const metadata = webp.getData()
const exif = webp.getExif(false) // Parsed EXIF ("true" for RAW)
const frame_0 = webp.getFrame(0) // Parsed frame (0-based index)
const rawFrame = webp.getFrame(0, true) // RAW frame
const allFrames = webp.getAllFrames(false) // Or "true" for RAW frames⚙️ Configuration
Starseal can be configured globally before creating stickers.
import { configure } from '@itsliaaa/starseal'
import { tmpdir } from 'node:os'
configure({
ffmpegPath: 'ffmpeg',
tempPath: tmpdir(),
timeout: 30_000
})| Option | Type | Default | Description |
|--------|------|---------|-------------|
| ffmpegPath | string | 'ffmpeg' | Path to the FFmpeg executable. |
| tempPath | string | os.tmpdir() | Directory used for temporary files. |
| timeout | number | 30000 | Maximum FFmpeg execution time in milliseconds. |
📋 Requirements
To process stickers, FFmpeg must be installed and accessible from your system's PATH.
Verify your installation:
ffmpeg -versionIf FFmpeg is installed in a custom location, specify it using configure():
configure({
ffmpegPath: '/path/to/ffmpeg'
})🚀 Try the Bot
A fast, lightweight, and modular WhatsApp bot built with @itsliaaa/baileys. Perfect for managing groups, moderating chats, and adding fun with quiz games and handy tools.
A lightweight framework built on top of Baileys for WhatsApp bot development.
📣 Credits
This project is created and maintained by Lia Wynn
Please do not remove or alter the original credits, copyright notices, or attributions.

