@@ -66,16 +66,16 @@ Targeting **Node.js** and **TypeScript** developers, Zaileys integrates essentia
6666
6767## 🪶 Features
6868
69- - 🛡️ ** Type-Safe** - Full TypeScript + Zod validation with autocomplete
70- - 🏓 ** Middleware** - Intercept and process events globally
71- - 🧩 ** Plugin System** - Drop-in file-based plugins
72- - 💾 ** State Management** - Built-in ` JetDB ` for data persistence with ** auto chunking**
73- - 🔔 ** Event-Driven** - Clean listeners for ` connection ` , ` messages ` , ` calls `
74- - 📢 ** Rate Limiting** - Anti-spam protection out of the box
75- - 🤖 ** Auto-Everything** - Auto-read, auto-reject calls, auto-mentions
76- - 📲 ** Multi-Device** - QR code or Pairing Code authentication
77- - 🎬 ** Built-in FFmpeg** - No external dependencies for media processing
78- - 🔘 ** Interactive Buttons** - Simple buttons, URL, copy code, call buttons, and lists
69+ - ✅ ** Type-Safe** - Full TypeScript + Zod validation with autocomplete
70+ - ✅ ** Middleware** - Intercept and process events globally
71+ - ✅ ** Plugin System** - Drop-in file-based plugins
72+ - ✅ ** State Management** - Built-in ` JetDB ` for data persistence with ** auto chunking**
73+ - ✅ ** Event-Driven** - Clean listeners for ` connection ` , ` messages ` , ` calls `
74+ - ✅ ** Rate Limiting** - Anti-spam protection out of the box
75+ - ✅ ** Auto-Everything** - Auto-read, auto-reject calls, auto-mentions
76+ - ✅ ** Multi-Device** - QR code or Pairing Code authentication
77+ - ✅ ** Built-in FFmpeg** - No external dependencies for media processing
78+ - ✅ ** Interactive Buttons** - Simple buttons, URL, copy code, call buttons, and lists
7979
8080## 🎨 Concepts & Architecture
8181
@@ -103,7 +103,7 @@ yarn add zaileys
103103
104104> ** Note** : Requires Node.js v20+ and TypeScript for best experience.
105105
106- > ** FFmpeg** : No need to install FFmpeg separately! It's already bundled with Zaileys for seamless media processing (audio, video, stickers).
106+ > ** FFmpeg** : No need to install FFmpeg separately! It's already bundled with Zaileys for seamless media processing (audio, video, stickers). You can disabled it if you want at ` Client Configuration ` .
107107
108108## 🏁 Starter Kit
109109
@@ -133,6 +133,13 @@ const wa = new Client({
133133
134134 // if you want to disable built-in ffmpeg
135135 // disableFFmpeg: true,
136+
137+ sticker: {
138+ authorName: ' your name' ,
139+ packageName: ' package name' ,
140+ quality: 80 ,
141+ shape: ' circle' , // output sticker must be circle
142+ },
136143});
137144
138145wa .on (' messages' , async (ctx ) => {
@@ -142,6 +149,77 @@ wa.on('messages', async (ctx) => {
142149});
143150```
144151
152+ <details >
153+ <summary >✨ Structure of <b >ctx</b > on event listener <code >messages</code ></summary >
154+
155+ ``` jsonc
156+ {
157+ " uniqueId" : " Z4D3FCXXXXXXXXXXXXX" ,
158+ " channelId" : " Z4D3FCXXXXXXXXXXXXX" ,
159+
160+ " chatId" : " ACAE07XXXXXXXXXXXXX" ,
161+ " chatType" : " text" ,
162+
163+ " receiverId" : " 628xxxxxxxx@s.whatsapp.net" ,
164+ " receiverName" : " Zaileys" ,
165+
166+ " roomId" : " 120xxxxxxxx@g.us" ,
167+ " roomName" : " Group Test" ,
168+ " senderLid" : " 272xxxxxxxx@lid" ,
169+
170+ " senderId" : " 628xxxxxxxx@s.whatsapp.net" ,
171+ " senderName" : " hajel" ,
172+ " senderDevice" : " android" ,
173+
174+ " timestamp" : 1766045633000 ,
175+ " text" : " World Hello! https://github.com/zeative/zaileys" ,
176+
177+ " mentions" : [" @628xxxxxxxx" , " @123xxxxxxxx" ],
178+ " links" : [" https://github.com/zeative/zaileys" ],
179+
180+ " isBot" : false ,
181+ " isFromMe" : false ,
182+ " isPrefix" : false ,
183+ " isTagMe" : false ,
184+
185+ " isStatusMention" : false ,
186+ " isGroupStatusMention" : false ,
187+ " isHideTags" : true ,
188+
189+ " isSpam" : false ,
190+ " isGroup" : true ,
191+ " isNewsletter" : false ,
192+ " isQuestion" : false ,
193+ " isStory" : false ,
194+
195+ " isViewOnce" : false ,
196+ " isEdited" : false ,
197+ " isDeleted" : false ,
198+ " isPinned" : false ,
199+ " isUnPinned" : false ,
200+
201+ " isBroadcast" : false ,
202+ " isEphemeral" : false ,
203+ " isForwarded" : false ,
204+
205+ " citation" : {
206+ " authors" : [AsyncFunction (anonymous)],
207+ " banned" : [AsyncFunction (anonymous)]
208+ },
209+
210+ " media" : {
211+ // ...
212+ // buffer promise
213+ // stream promise
214+ },
215+
216+ " message" : [Function (anonymous)],
217+ " replied" : {} // MessagesContext
218+ }
219+
220+ ````
221+ < / details>
222+
145223## 🛠️ Configuration
146224
147225The ` Client` constructor accepts a configuration object. Below are the valid options based on the library's type definitions.
@@ -174,7 +252,7 @@ These options apply to both authentication methods:
174252| :---------- | :------- | :------------------------------------------------------------------------------ |
175253| `limiter` | `object` | Rate limiting configuration. Default: `maxMessages: 20, durationMs: 10_000`. |
176254| `fakeReply` | `object` | Configuration for fake reply provider. |
177- | ` sticker ` | ` object ` | Default metadata for sticker creation (` packageName ` , ` authorName ` , ` quality ` ). |
255+ | `sticker` | `object` | Default metadata for sticker creation (`packageName`, `authorName`, `quality`, `shape` ). |
178256| `citation` | `object` | Custom citation sources. |
179257
180258## 💡 Advanced Usage
@@ -192,7 +270,7 @@ wa.use(async (ctx, next) => {
192270
193271 await next ();
194272});
195- ```
273+ ````
196274
197275### 🧩 Plugins
198276
@@ -367,6 +445,7 @@ await wa.send(ctx.roomId, {
367445// support gif and video
368446await wa.send(ctx.roomId, {
369447 sticker: 'https://example.com/sticker.mp4',
448+ shape: 'circle', // default: 'default' | 'circle' | 'rounded' | 'oval'
370449});
371450` ` `
372451
0 commit comments