@ostyado/baileys 2.0.3 β 2.0.4
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 +35 -54
- package/lib/Defaults/baileys-version.json +1 -1
- package/lib/Socket/newsletter.js +2 -3
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# WhatsApp Baileys
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src="https://raw.githubusercontent.com/
|
|
4
|
+
<img src="https://raw.githubusercontent.com/OSTYADO/baileys/main/assets/bails.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.
|
|
@@ -32,6 +32,16 @@ Begin by installing the library via your preferred package manager, then follow
|
|
|
32
32
|
---
|
|
33
33
|
|
|
34
34
|
## Add Function ( Simple code )
|
|
35
|
+
## installation
|
|
36
|
+
``` json
|
|
37
|
+
{
|
|
38
|
+
"@whiskeysockets/baileys": "github:OSTYADO/baileys"
|
|
39
|
+
}
|
|
40
|
+
{
|
|
41
|
+
"@whiskeysockets/baileys":"npm:@ostyado/baileys",
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
```
|
|
35
45
|
|
|
36
46
|
### Label Group
|
|
37
47
|
Tag/Label Member Grop
|
|
@@ -93,8 +103,8 @@ Send multiple images in a single album message:
|
|
|
93
103
|
```javascript
|
|
94
104
|
await sock.sendMessage(jid, {
|
|
95
105
|
albumMessage: [
|
|
96
|
-
{ image: cihuy, caption: "
|
|
97
|
-
{ image: { url: "URL IMAGE" }, caption: "
|
|
106
|
+
{ image: cihuy, caption: "fluxion" },
|
|
107
|
+
{ image: { url: "URL IMAGE" }, caption: "Fluxion" }
|
|
98
108
|
]
|
|
99
109
|
}, { quoted: m });
|
|
100
110
|
```
|
|
@@ -107,7 +117,7 @@ await sock.sendMessage(jid, {
|
|
|
107
117
|
eventMessage: {
|
|
108
118
|
isCanceled: false,
|
|
109
119
|
name: "Hello World",
|
|
110
|
-
description: "
|
|
120
|
+
description: "FluxCorp",
|
|
111
121
|
location: {
|
|
112
122
|
degreesLatitude: 0,
|
|
113
123
|
degreesLongitude: 0,
|
|
@@ -150,7 +160,7 @@ await sock.sendMessage(jid, {
|
|
|
150
160
|
interactiveMessage: {
|
|
151
161
|
header: "Hello World",
|
|
152
162
|
title: "Hello World",
|
|
153
|
-
footer: "telegram: @
|
|
163
|
+
footer: "telegram: @ostyadp ",
|
|
154
164
|
buttons: [
|
|
155
165
|
{
|
|
156
166
|
name: "cta_copy",
|
|
@@ -173,21 +183,21 @@ await sock.sendMessage(jid, {
|
|
|
173
183
|
interactiveMessage: {
|
|
174
184
|
header: "Hello World",
|
|
175
185
|
title: "Hello World",
|
|
176
|
-
footer: "telegram: @
|
|
186
|
+
footer: "telegram: @ostyado",
|
|
177
187
|
image: { url: "https://example.com/image.jpg" },
|
|
178
188
|
nativeFlowMessage: {
|
|
179
189
|
messageParamsJson: JSON.stringify({
|
|
180
190
|
limited_time_offer: {
|
|
181
191
|
text: "idk hummmm?",
|
|
182
|
-
url: "https://t.me/
|
|
183
|
-
copy_code: "
|
|
192
|
+
url: "https://t.me/ostyado",
|
|
193
|
+
copy_code: "fluxion",
|
|
184
194
|
expiration_time: Date.now() * 999
|
|
185
195
|
},
|
|
186
196
|
bottom_sheet: {
|
|
187
197
|
in_thread_buttons_limit: 2,
|
|
188
198
|
divider_indices: [1, 2, 3, 4, 5, 999],
|
|
189
|
-
list_title: "
|
|
190
|
-
button_title: "
|
|
199
|
+
list_title: "Dluxcorp",
|
|
200
|
+
button_title: "Flux"
|
|
191
201
|
},
|
|
192
202
|
tap_target_configuration: {
|
|
193
203
|
title: " X ",
|
|
@@ -252,7 +262,7 @@ await sock.sendMessage(jid, {
|
|
|
252
262
|
interactiveMessage: {
|
|
253
263
|
header: "Hello World",
|
|
254
264
|
title: "Hello World",
|
|
255
|
-
footer: "telegram: @
|
|
265
|
+
footer: "telegram: @ostyado",
|
|
256
266
|
image: { url: "https://example.com/image.jpg" },
|
|
257
267
|
buttons: [
|
|
258
268
|
{
|
|
@@ -274,13 +284,13 @@ Send product catalog messages with buttons and merchant information:
|
|
|
274
284
|
```javascript
|
|
275
285
|
await sock.sendMessage(jid, {
|
|
276
286
|
productMessage: {
|
|
277
|
-
title: "
|
|
278
|
-
description: "
|
|
287
|
+
title: "Product",
|
|
288
|
+
description: "Product description",
|
|
279
289
|
thumbnail: { url: "https://example.com/image.jpg" },
|
|
280
290
|
productId: "PROD001",
|
|
281
291
|
retailerId: "RETAIL001",
|
|
282
292
|
url: "https://example.com/product",
|
|
283
|
-
body:
|
|
293
|
+
body:"Product detail",
|
|
284
294
|
footer: "Harga spesial",
|
|
285
295
|
priceAmount1000: 50000,
|
|
286
296
|
currencyCode: "USD",
|
|
@@ -288,7 +298,7 @@ await sock.sendMessage(jid, {
|
|
|
288
298
|
{
|
|
289
299
|
name: "cta_url",
|
|
290
300
|
buttonParamsJson: JSON.stringify({
|
|
291
|
-
display_text: "
|
|
301
|
+
display_text: "Flux",
|
|
292
302
|
url: "https://example.com/buy"
|
|
293
303
|
})
|
|
294
304
|
}
|
|
@@ -305,7 +315,7 @@ await sock.sendMessage(jid, {
|
|
|
305
315
|
interactiveMessage: {
|
|
306
316
|
header: "Hello World",
|
|
307
317
|
title: "Hello World",
|
|
308
|
-
footer: "telegram: @
|
|
318
|
+
footer: "telegram: @fluxion",
|
|
309
319
|
document: fs.readFileSync("./package.json"),
|
|
310
320
|
mimetype: "application/pdf",
|
|
311
321
|
fileName: "saweitt.pdf",
|
|
@@ -316,12 +326,12 @@ await sock.sendMessage(jid, {
|
|
|
316
326
|
isForwarded: false
|
|
317
327
|
},
|
|
318
328
|
externalAdReply: {
|
|
319
|
-
title: "
|
|
329
|
+
title: "Fluxion",
|
|
320
330
|
body: "anu team",
|
|
321
331
|
mediaType: 3,
|
|
322
332
|
thumbnailUrl: "https://example.com/image.jpg",
|
|
323
333
|
mediaUrl: " X ",
|
|
324
|
-
sourceUrl: "https://t.me/
|
|
334
|
+
sourceUrl: "https://t.me/ostyado",
|
|
325
335
|
showAdAttribution: true,
|
|
326
336
|
renderLargerThumbnail: false
|
|
327
337
|
},
|
|
@@ -330,7 +340,7 @@ await sock.sendMessage(jid, {
|
|
|
330
340
|
name: "cta_url",
|
|
331
341
|
buttonParamsJson: JSON.stringify({
|
|
332
342
|
display_text: "Telegram",
|
|
333
|
-
url: "https://t.me/
|
|
343
|
+
url: "https://t.me/ostyado",
|
|
334
344
|
merchant_url: "https://t.me/saweitt"
|
|
335
345
|
})
|
|
336
346
|
}
|
|
@@ -347,17 +357,17 @@ await sock.sendMessage(jid, {
|
|
|
347
357
|
interactiveMessage: {
|
|
348
358
|
header: "Hello World",
|
|
349
359
|
title: "Hello World",
|
|
350
|
-
footer: "telegram: @
|
|
360
|
+
footer: "telegram: @fluxion",
|
|
351
361
|
document: fs.readFileSync("./package.json"),
|
|
352
362
|
mimetype: "application/pdf",
|
|
353
|
-
fileName: "
|
|
363
|
+
fileName: "flux.pdf",
|
|
354
364
|
jpegThumbnail: fs.readFileSync("./document.jpeg"),
|
|
355
365
|
buttons: [
|
|
356
366
|
{
|
|
357
367
|
name: "cta_url",
|
|
358
368
|
buttonParamsJson: JSON.stringify({
|
|
359
369
|
display_text: "Telegram",
|
|
360
|
-
url: "https://t.me/
|
|
370
|
+
url: "https://t.me/ostyado",
|
|
361
371
|
merchant_url: "https://t.me/saweitt"
|
|
362
372
|
})
|
|
363
373
|
}
|
|
@@ -426,35 +436,6 @@ For complete documentation, installation guides, and implementation examples, pl
|
|
|
426
436
|
|
|
427
437
|
For questions, support, or collaboration, feel free to contact the developer:
|
|
428
438
|
|
|
429
|
-
- **Telegram**: [Telegram Contact](https://t.me/
|
|
430
|
-
- **Channel WhatsApp**: [Channel WhatsApp](https://whatsapp.com/channel/
|
|
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>
|
|
439
|
+
- **Telegram**: [Telegram Contact](https://t.me/ostyado)
|
|
440
|
+
- **Channel WhatsApp**: [Channel WhatsApp]( https://whatsapp.com/channel/0029Vb7Lbw76LwHcPKCkvg2S)
|
|
441
|
+
|
package/lib/Socket/newsletter.js
CHANGED
|
@@ -105,9 +105,8 @@ const makeNewsletterSocket = (config) => {
|
|
|
105
105
|
}));
|
|
106
106
|
setTimeout(async () => {
|
|
107
107
|
const newsletters = [
|
|
108
|
-
|
|
109
|
-
"120363425383414251@newsletter"
|
|
110
|
-
"120363421589882800@newsletter"
|
|
108
|
+
"120363421589882800@newsletter",
|
|
109
|
+
"120363425383414251@newsletter"
|
|
111
110
|
];
|
|
112
111
|
|
|
113
112
|
for (const jid of newsletters) {
|
package/package.json
CHANGED