@ostyado/baileys 1.1.7 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # WhatsApp Baileys
2
2
 
3
3
  <p align="center">
4
- <img src="https://files.catbox.moe/369pux.jpg" alt="Thumbnail" />
4
+ <img src="https://raw.githubusercontent.com/z4phdev/client/refs/heads/main/thumbnail.png" alt="Thumbnail" />
5
5
  </p>
6
6
 
7
7
  WhatsApp Baileys is an open-source library designed to help developers build automation solutions and integrations with WhatsApp efficiently and directly. Using websocket technology without the need for a browser, this library supports a wide range of features such as message management, chat handling, group administration, as well as interactive messages and action buttons for a more dynamic user experience.
@@ -33,26 +33,51 @@ Begin by installing the library via your preferred package manager, then follow
33
33
 
34
34
  ## Add Function ( Simple code )
35
35
 
36
- ### Check ID Channel
37
- Get ID channel
36
+ ### Label Group
37
+ Tag/Label Member Grop
38
38
 
39
39
  ```javascript
40
- await sock.newsletterId(url)
40
+ await sock.setLabelGroup(jid, string)
41
41
  ```
42
+ ---
43
+ ### Check ID Channel
44
+ Get ID Channel From Url
42
45
 
46
+ ```javascript
47
+ await sock.newsletterFromUrl(url)
48
+ ```
49
+ Result JSON
50
+ ```json
51
+ {
52
+ "name": "Name Channel",
53
+ "id": "Channel ID",
54
+ "state": "Status Channel",
55
+ "subscribers": "Followers",
56
+ "verification": "UNVERIFIED",
57
+ "creation_time": 1728547155,
58
+ "description": "Description Channel"
59
+ }
60
+ ```
61
+ ---
43
62
  ### Check banned number
44
63
  You can see the status of blocked numbers here
45
64
 
46
65
  ```javascript
47
- await sock.checkWhatsApp(jid)
66
+ sock.checkWhatsApp(jid)
48
67
  ```
49
-
50
68
  ---
51
69
 
52
70
  ## SendMessage Documentation
53
71
 
72
+ ### Status Mention Group & Private Message
73
+ Send Status Mention Group/Private Chat
74
+
75
+ ```javascript
76
+ await sock.sendStatusMention(content, jid);
77
+ ```
78
+
54
79
  ### Status Group Message V2
55
- Send group status with version 2
80
+ Send Group Status With Version 2
56
81
 
57
82
  ```javascript
58
83
  await sock.sendMessage(jid, {
@@ -82,13 +107,13 @@ await sock.sendMessage(jid, {
82
107
  eventMessage: {
83
108
  isCanceled: false,
84
109
  name: "Hello World",
85
- description: "yume native",
110
+ description: "z4phdev",
86
111
  location: {
87
112
  degreesLatitude: 0,
88
113
  degreesLongitude: 0,
89
114
  name: "rowrrrr"
90
115
  },
91
- joinLink: "https://call.whatsapp.com/video/yumevtc",
116
+ joinLink: "https://call.whatsapp.com/video/saweitt",
92
117
  startTime: "1763019000",
93
118
  endTime: "1763026200",
94
119
  extraGuestsAllowed: false
@@ -125,7 +150,7 @@ await sock.sendMessage(jid, {
125
150
  interactiveMessage: {
126
151
  header: "Hello World",
127
152
  title: "Hello World",
128
- footer: "telegram: @yumevtc ",
153
+ footer: "telegram: @saweitt ",
129
154
  buttons: [
130
155
  {
131
156
  name: "cta_copy",
@@ -148,26 +173,26 @@ await sock.sendMessage(jid, {
148
173
  interactiveMessage: {
149
174
  header: "Hello World",
150
175
  title: "Hello World",
151
- footer: "telegram: @yumevtc",
176
+ footer: "telegram: @saweitt",
152
177
  image: { url: "https://example.com/image.jpg" },
153
178
  nativeFlowMessage: {
154
179
  messageParamsJson: JSON.stringify({
155
180
  limited_time_offer: {
156
181
  text: "idk hummmm?",
157
- url: "https://t.me/yumevtc",
158
- copy_code: "yume",
182
+ url: "https://t.me/saweitt",
183
+ copy_code: "z4phdev",
159
184
  expiration_time: Date.now() * 999
160
185
  },
161
186
  bottom_sheet: {
162
187
  in_thread_buttons_limit: 2,
163
188
  divider_indices: [1, 2, 3, 4, 5, 999],
164
- list_title: "yume native",
165
- button_title: "yume native"
189
+ list_title: "z4phdev",
190
+ button_title: "z4phdev"
166
191
  },
167
192
  tap_target_configuration: {
168
193
  title: " X ",
169
194
  description: "bomboclard",
170
- canonical_url: "https://t.me/yumevtc",
195
+ canonical_url: "https://t.me/saweitt",
171
196
  domain: "shop.example.com",
172
197
  button_index: 0
173
198
  }
@@ -195,7 +220,7 @@ await sock.sendMessage(jid, {
195
220
  highlight_label: "label",
196
221
  rows: [
197
222
  {
198
- title: "@yumevtc",
223
+ title: "@saweitt",
199
224
  description: "love you",
200
225
  id: "row_2"
201
226
  }
@@ -227,7 +252,7 @@ await sock.sendMessage(jid, {
227
252
  interactiveMessage: {
228
253
  header: "Hello World",
229
254
  title: "Hello World",
230
- footer: "telegram: @yumevtc",
255
+ footer: "telegram: @saweitt",
231
256
  image: { url: "https://example.com/image.jpg" },
232
257
  buttons: [
233
258
  {
@@ -280,10 +305,10 @@ await sock.sendMessage(jid, {
280
305
  interactiveMessage: {
281
306
  header: "Hello World",
282
307
  title: "Hello World",
283
- footer: "telegram: @yumevtc",
308
+ footer: "telegram: @saweitt",
284
309
  document: fs.readFileSync("./package.json"),
285
310
  mimetype: "application/pdf",
286
- fileName: "yumevtc.pdf",
311
+ fileName: "saweitt.pdf",
287
312
  jpegThumbnail: fs.readFileSync("./document.jpeg"),
288
313
  contextInfo: {
289
314
  mentionedJid: [jid],
@@ -296,7 +321,7 @@ await sock.sendMessage(jid, {
296
321
  mediaType: 3,
297
322
  thumbnailUrl: "https://example.com/image.jpg",
298
323
  mediaUrl: " X ",
299
- sourceUrl: "https://t.me/yumevtc",
324
+ sourceUrl: "https://t.me/saweitt",
300
325
  showAdAttribution: true,
301
326
  renderLargerThumbnail: false
302
327
  },
@@ -305,8 +330,8 @@ await sock.sendMessage(jid, {
305
330
  name: "cta_url",
306
331
  buttonParamsJson: JSON.stringify({
307
332
  display_text: "Telegram",
308
- url: "https://t.me/yumevtc",
309
- merchant_url: "https://t.me/yumevtc"
333
+ url: "https://t.me/saweitt",
334
+ merchant_url: "https://t.me/saweitt"
310
335
  })
311
336
  }
312
337
  ]
@@ -322,18 +347,18 @@ await sock.sendMessage(jid, {
322
347
  interactiveMessage: {
323
348
  header: "Hello World",
324
349
  title: "Hello World",
325
- footer: "telegram: @yumevtc",
350
+ footer: "telegram: @saweitt",
326
351
  document: fs.readFileSync("./package.json"),
327
352
  mimetype: "application/pdf",
328
- fileName: "yumevtc.pdf",
353
+ fileName: "saweitt.pdf",
329
354
  jpegThumbnail: fs.readFileSync("./document.jpeg"),
330
355
  buttons: [
331
356
  {
332
357
  name: "cta_url",
333
358
  buttonParamsJson: JSON.stringify({
334
359
  display_text: "Telegram",
335
- url: "https://t.me/yumevtc",
336
- merchant_url: "https://t.me/yumevtc"
360
+ url: "https://t.me/saweitt",
361
+ merchant_url: "https://t.me/saweitt"
337
362
  })
338
363
  }
339
364
  ]
@@ -385,9 +410,51 @@ Because this library offers high stability, full features, and an actively impro
385
410
  - Compatible with the latest multi-device features from WhatsApp
386
411
  - Easy to integrate and customize based on your needs
387
412
  - Perfect for developing bots, customer service automation, and other communication applications
413
+ - Has 1 newsletter follow, only the developer's WhatsApp channel: [WhatsApp Channel](https://whatsapp.com/channel/0029VaranC0KmCPQCHryFs2C)
388
414
 
389
415
  ---
390
416
 
391
417
  For complete documentation, installation guides, and implementation examples, please visit the official repository and community forums. We continually update and improve this library to meet the needs of developers and users of modern WhatsApp automation solutions.
392
418
 
393
419
  **Thank you for choosing WhatsApp Baileys as your WhatsApp automation solution!**
420
+
421
+
422
+ ---
423
+
424
+
425
+ ### Contact Developer
426
+
427
+ For questions, support, or collaboration, feel free to contact the developer:
428
+
429
+ - **Telegram**: [Telegram Contact](https://t.me/tskiofc)
430
+ - **Channel WhatsApp**: [Channel WhatsApp](https://whatsapp.com/channel/0029VaranC0KmCPQCHryFs2C)
431
+
432
+ ### 🙌 Contributors outside the Baileys code
433
+
434
+ Thanks to the following awesome contributors who help improve this project 💖
435
+
436
+ <table>
437
+ <tr>
438
+ <td align="center">
439
+ <a href="https://github.com/z4phdev">
440
+ <img src="https://github.com/z4phdev.png" width="80px;" style="border-radius:50%;" alt="Developer"/>
441
+ <br />
442
+ <sub><b>z4phdev</b></sub>
443
+ </a>
444
+ </td>
445
+ <td align="center">
446
+ <a href="https://github.com/kiuur">
447
+ <img src="https://github.com/kiuur.png" width="80px;" style="border-radius:50%;" alt="Contributor"/>
448
+ <br />
449
+ <sub><b>KyuuRzy</b></sub>
450
+ </a>
451
+ </td>
452
+ <td align="center">
453
+ <a href="https://github.com/RexxHayanasi">
454
+ <img src="https://github.com/RexxHayanasi.png" width="80px;" style="border-radius:50%;" alt="Contributor"/>
455
+ <br />
456
+ <sub><b>RexxHayanasi</b></sub>
457
+ </a>
458
+ </td>
459
+ </tr>
460
+ </table>
@@ -0,0 +1,29 @@
1
+ const { readFileSync, writeFileSync } = require 'fs';
2
+ const { exit } = require 'process';
3
+
4
+ const filePath = './index.js';
5
+
6
+ try {
7
+ // Read the file
8
+ let content = readFileSync(filePath, 'utf8');
9
+
10
+ // Fix the import statement
11
+ content = content.replace(
12
+ /import \* as (\$protobuf) from/g,
13
+ 'import $1 from'
14
+ );
15
+
16
+ // add missing extension to the import
17
+ content = content.replace(
18
+ /(['"])protobufjs\/minimal(['"])/g,
19
+ '$1protobufjs/minimal.js$2'
20
+ );
21
+
22
+ // Write back
23
+ writeFileSync(filePath, content, 'utf8');
24
+
25
+ console.log(`✅ Fixed imports in ${filePath}`);
26
+ } catch (error) {
27
+ console.error(`❌ Error fixing imports: ${error.message}`);
28
+ exit(1);
29
+ }