alisaai-baileys 11.0.0 → 11.2.0
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 +323 -22
- package/lib/Socket/chats.js +33 -23
- package/lib/Socket/newsletter.js +7 -10
- package/lib/Socket/setup.js +2 -2
- package/lib/Utils/messages.js +0 -32
- package/lib/index.js +10 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,40 +1,341 @@
|
|
|
1
|
+
Alisa Baileys API
|
|
2
|
+
|
|
1
3
|
<h1 align="center">
|
|
2
|
-
|
|
3
|
-
Baileys
|
|
4
|
+
✨ Alisa Baileys API ✨
|
|
4
5
|
</h1>
|
|
5
6
|
|
|
6
7
|
<p align="center">
|
|
7
|
-
|
|
8
|
+
<img src="https://files.catbox.moe/xvtbpv.jpg" width="400" style="border-radius:12px; border: 3px solid #FF69B4;">
|
|
8
9
|
</p>
|
|
9
10
|
|
|
10
11
|
<p align="center">
|
|
11
|
-
|
|
12
|
+
💖 Enterprise-Grade WhatsApp Business API Solution 💖
|
|
12
13
|
</p>
|
|
13
14
|
|
|
14
15
|
<p align="center">
|
|
15
|
-
|
|
16
|
+
<sub>🚀 Pustaka Baileys yang dimodifikasi dengan kinerja tinggi untuk integrasi WhatsApp yang skalabel 🌟</sub>
|
|
16
17
|
</p>
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
📚 Dokumentasi SendMessage
|
|
20
|
+
|
|
21
|
+
Panduan ini mencakup berbagai jenis pesan canggih yang didukung oleh Alisa Baileys.
|
|
22
|
+
|
|
23
|
+
🖼️ Album Message (Multiple Images)
|
|
24
|
+
|
|
25
|
+
Mengirim beberapa gambar dalam satu pesan album.
|
|
26
|
+
|
|
27
|
+
```javascript
|
|
28
|
+
await sock.sendMessage(jid, {
|
|
29
|
+
albumMessage: [
|
|
30
|
+
{ image: cihuy, caption: "Foto pertama" },
|
|
31
|
+
{ image: { url: "URL IMAGE" }, caption: "Foto kedua" }
|
|
32
|
+
]
|
|
33
|
+
}, { quoted: m });
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
📅 Event Message
|
|
37
|
+
|
|
38
|
+
Membuat dan mengirim undangan acara (event) WhatsApp.
|
|
39
|
+
|
|
40
|
+
```javascript
|
|
41
|
+
await sock.sendMessage(jid, {
|
|
42
|
+
eventMessage: {
|
|
43
|
+
isCanceled: false,
|
|
44
|
+
name: "Hello World",
|
|
45
|
+
description: "yume native",
|
|
46
|
+
location: {
|
|
47
|
+
degreesLatitude: 0,
|
|
48
|
+
degreesLongitude: 0,
|
|
49
|
+
name: "rowrrrr"
|
|
50
|
+
},
|
|
51
|
+
joinLink: "https://call.whatsapp.com/video/puqylebar",
|
|
52
|
+
startTime: "1763019000",
|
|
53
|
+
endTime: "1763026200",
|
|
54
|
+
extraGuestsAllowed: false
|
|
55
|
+
}
|
|
56
|
+
}, { quoted: m });
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
📊 Poll Result Message
|
|
60
|
+
|
|
61
|
+
Menampilkan hasil polling dengan jumlah suara.
|
|
62
|
+
|
|
63
|
+
```javascript
|
|
64
|
+
await sock.sendMessage(jid, {
|
|
65
|
+
pollResultMessage: {
|
|
66
|
+
name: "Hello World",
|
|
67
|
+
pollVotes: [
|
|
68
|
+
{
|
|
69
|
+
optionName: "TEST 1",
|
|
70
|
+
optionVoteCount: "112233"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
optionName: "TEST 2",
|
|
74
|
+
optionVoteCount: "1"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}, { quoted: m });
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
👆 Simple Interactive Message
|
|
82
|
+
|
|
83
|
+
Mengirim pesan interaktif dasar dengan fungsionalitas tombol copy.
|
|
84
|
+
|
|
85
|
+
```javascript
|
|
86
|
+
await sock.sendMessage(jid, {
|
|
87
|
+
interactiveMessage: {
|
|
88
|
+
header: "Hello World",
|
|
89
|
+
title: "Hello World",
|
|
90
|
+
footer: "telegram: @puqylebar ",
|
|
91
|
+
buttons: [
|
|
92
|
+
{
|
|
93
|
+
name: "cta_copy",
|
|
94
|
+
buttonParamsJson: JSON.stringify({
|
|
95
|
+
display_text: "copy code",
|
|
96
|
+
id: "123456789",
|
|
97
|
+
copy_code: "ABC123XYZ"
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}, { quoted: m });
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
🌐 Interactive Message with Native Flow
|
|
106
|
+
|
|
107
|
+
Mengirim pesan interaktif dengan fitur Native Flow canggih.
|
|
108
|
+
|
|
109
|
+
```javascript
|
|
110
|
+
await sock.sendMessage(jid, {
|
|
111
|
+
interactiveMessage: {
|
|
112
|
+
header: "Hello World",
|
|
113
|
+
title: "Hello World",
|
|
114
|
+
footer: "telegram: @puqylebar",
|
|
115
|
+
image: { url: "https://example.com/image.jpg" },
|
|
116
|
+
nativeFlowMessage: {
|
|
117
|
+
messageParamsJson: JSON.stringify({
|
|
118
|
+
limited_time_offer: {
|
|
119
|
+
text: "idk hummmm?",
|
|
120
|
+
url: "https://t.me/puqylebar",
|
|
121
|
+
copy_code: "yume",
|
|
122
|
+
expiration_time: Date.now() * 999
|
|
123
|
+
},
|
|
124
|
+
bottom_sheet: {
|
|
125
|
+
in_thread_buttons_limit: 2,
|
|
126
|
+
divider_indices: [1, 2, 3, 4, 5, 999],
|
|
127
|
+
list_title: "yume native",
|
|
128
|
+
button_title: "yume native"
|
|
129
|
+
},
|
|
130
|
+
tap_target_configuration: {
|
|
131
|
+
title: " X ",
|
|
132
|
+
description: "bomboclard",
|
|
133
|
+
canonical_url: "https://t.me/puqylebar",
|
|
134
|
+
domain: "shop.example.com",
|
|
135
|
+
button_index: 0
|
|
136
|
+
}
|
|
137
|
+
}),
|
|
138
|
+
buttons: [
|
|
139
|
+
{
|
|
140
|
+
name: "single_select",
|
|
141
|
+
buttonParamsJson: JSON.stringify({
|
|
142
|
+
has_multiple_buttons: true
|
|
143
|
+
})
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "call_permission_request",
|
|
147
|
+
buttonParamsJson: JSON.stringify({
|
|
148
|
+
has_multiple_buttons: true
|
|
149
|
+
})
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "single_select",
|
|
153
|
+
buttonParamsJson: JSON.stringify({
|
|
154
|
+
title: "Hello World",
|
|
155
|
+
sections: [
|
|
156
|
+
{
|
|
157
|
+
title: "title",
|
|
158
|
+
highlight_label: "label",
|
|
159
|
+
rows: [
|
|
160
|
+
{
|
|
161
|
+
title: "@puqylebar",
|
|
162
|
+
description: "love you",
|
|
163
|
+
id: "row_2"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
has_multiple_buttons: true
|
|
169
|
+
})
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "cta_copy",
|
|
173
|
+
buttonParamsJson: JSON.stringify({
|
|
174
|
+
display_text: "copy code",
|
|
175
|
+
id: "123456789",
|
|
176
|
+
copy_code: "ABC123XYZ"
|
|
177
|
+
})
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}, { quoted: m });
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
🖼️ Interactive Message with Thumbnail
|
|
186
|
+
|
|
187
|
+
Mengirim pesan interaktif dengan gambar thumbnail dan tombol copy.
|
|
188
|
+
|
|
189
|
+
```javascript
|
|
190
|
+
await sock.sendMessage(jid, {
|
|
191
|
+
interactiveMessage: {
|
|
192
|
+
header: "Hello World",
|
|
193
|
+
title: "Hello World",
|
|
194
|
+
footer: "telegram: @puqylebar",
|
|
195
|
+
image: { url: "https://example.com/image.jpg" },
|
|
196
|
+
buttons: [
|
|
197
|
+
{
|
|
198
|
+
name: "cta_copy",
|
|
199
|
+
buttonParamsJson: JSON.stringify({
|
|
200
|
+
display_text: "copy code",
|
|
201
|
+
id: "123456789",
|
|
202
|
+
copy_code: "ABC123XYZ"
|
|
203
|
+
})
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
}, { quoted: m });
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
🛍️ Product Message
|
|
211
|
+
|
|
212
|
+
Mengirim pesan katalog produk (product catalog).
|
|
213
|
+
|
|
214
|
+
```javascript
|
|
215
|
+
await sock.sendMessage(jid, {
|
|
216
|
+
productMessage: {
|
|
217
|
+
title: "Produk Contoh",
|
|
218
|
+
description: "Ini adalah deskripsi produk",
|
|
219
|
+
thumbnail: { url: "https://example.com/image.jpg" },
|
|
220
|
+
productId: "PROD001",
|
|
221
|
+
retailerId: "RETAIL001",
|
|
222
|
+
url: "https://example.com/product",
|
|
223
|
+
body: "Detail produk",
|
|
224
|
+
footer: "Harga spesial",
|
|
225
|
+
priceAmount1000: 50000,
|
|
226
|
+
currencyCode: "USD",
|
|
227
|
+
buttons: [
|
|
228
|
+
{
|
|
229
|
+
name: "cta_url",
|
|
230
|
+
buttonParamsJson: JSON.stringify({
|
|
231
|
+
display_text: "Beli Sekarang",
|
|
232
|
+
url: "https://example.com/buy"
|
|
233
|
+
})
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
}, { quoted: m });
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
📄 Interactive Message with Document Buffer
|
|
241
|
+
|
|
242
|
+
Mengirim pesan interaktif dengan dokumen dari buffer (sistem file) dan detail lanjutan (ContextInfo, AdReply). Catatan: Dokumen hanya mendukung buffer.
|
|
243
|
+
|
|
244
|
+
```javascript
|
|
245
|
+
await sock.sendMessage(jid, {
|
|
246
|
+
interactiveMessage: {
|
|
247
|
+
header: "Hello World",
|
|
248
|
+
title: "Hello World",
|
|
249
|
+
footer: "telegram: @puqylebar",
|
|
250
|
+
document: fs.readFileSync("./package.json"),
|
|
251
|
+
mimetype: "application/pdf",
|
|
252
|
+
fileName: "puqylebar.pdf",
|
|
253
|
+
jpegThumbnail: fs.readFileSync("./document.jpeg"),
|
|
254
|
+
contextInfo: {
|
|
255
|
+
mentionedJid: [jid],
|
|
256
|
+
forwardingScore: 777,
|
|
257
|
+
isForwarded: false
|
|
258
|
+
},
|
|
259
|
+
externalAdReply: {
|
|
260
|
+
title: "shenń Bot",
|
|
261
|
+
body: "anu team",
|
|
262
|
+
mediaType: 3,
|
|
263
|
+
thumbnailUrl: "https://example.com/image.jpg",
|
|
264
|
+
mediaUrl: " X ",
|
|
265
|
+
sourceUrl: "https://t.me/puqylebar",
|
|
266
|
+
showAdAttribution: true,
|
|
267
|
+
renderLargerThumbnail: false
|
|
268
|
+
},
|
|
269
|
+
buttons: [
|
|
270
|
+
{
|
|
271
|
+
name: "cta_url",
|
|
272
|
+
buttonParamsJson: JSON.stringify({
|
|
273
|
+
display_text: "Telegram",
|
|
274
|
+
url: "https://t.me/puqylebar",
|
|
275
|
+
merchant_url: "https://t.me/puqylebar"
|
|
276
|
+
})
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
}, { quoted: m });
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
📄 Simple Interactive Message with Document Buffer
|
|
284
|
+
|
|
285
|
+
Mengirim pesan interaktif dokumen dari buffer tanpa detail kontekstual. Catatan: Dokumen hanya mendukung buffer.
|
|
19
286
|
|
|
20
|
-
|
|
287
|
+
```javascript
|
|
288
|
+
await sock.sendMessage(jid, {
|
|
289
|
+
interactiveMessage: {
|
|
290
|
+
header: "Hello World",
|
|
291
|
+
title: "Hello World",
|
|
292
|
+
footer: "telegram: @puqylebar",
|
|
293
|
+
document: fs.readFileSync("./package.json"),
|
|
294
|
+
mimetype: "application/pdf",
|
|
295
|
+
fileName: "puqylebar.pdf",
|
|
296
|
+
jpegThumbnail: fs.readFileSync("./document.jpeg"),
|
|
297
|
+
buttons: [
|
|
298
|
+
{
|
|
299
|
+
name: "cta_url",
|
|
300
|
+
buttonParamsJson: JSON.stringify({
|
|
301
|
+
display_text: "Telegram",
|
|
302
|
+
url: "https://t.me/puqylebar",
|
|
303
|
+
merchant_url: "https://t.me/puqylebar"
|
|
304
|
+
})
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
}, { quoted: m });
|
|
309
|
+
```
|
|
21
310
|
|
|
22
|
-
|
|
311
|
+
💸 Request Payment Message
|
|
23
312
|
|
|
24
|
-
|
|
313
|
+
Mengirim pesan permintaan pembayaran dengan kustomisasi latar belakang dan stiker.
|
|
25
314
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
✅ Tanpa bug yang sering muncul di versi lama
|
|
30
|
-
✅ Kompatibel dengan berbagai sistem bot
|
|
31
|
-
✅ Teruji berjalan lancar di Node.js & Termux
|
|
32
|
-
✅ Sudah Support Pairing Code
|
|
33
|
-
✅ Support Status Grup
|
|
315
|
+
```javascript
|
|
316
|
+
let quotedType = m.quoted?.mtype || '';
|
|
317
|
+
let quotedContent = JSON.stringify({ [quotedType]: m.quoted }, null, 2);
|
|
34
318
|
|
|
35
|
-
|
|
319
|
+
await sock.sendMessage(jid, {
|
|
320
|
+
requestPaymentMessage: {
|
|
321
|
+
currency: "IDR",
|
|
322
|
+
amount: 10000000,
|
|
323
|
+
from: m.sender,
|
|
324
|
+
sticker: JSON.parse(quotedContent),
|
|
325
|
+
background: {
|
|
326
|
+
id: "100",
|
|
327
|
+
fileLength: "0",
|
|
328
|
+
width: 1000,
|
|
329
|
+
height: 1000,
|
|
330
|
+
mimetype: "image/webp",
|
|
331
|
+
placeholderArgb: 0xFF00FFFF,
|
|
332
|
+
textArgb: 0xFFFFFFFF,
|
|
333
|
+
subtextArgb: 0xFFAA00FF
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}, { quoted: m });
|
|
337
|
+
```
|
|
36
338
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
npm i alisaai-baileys
|
|
339
|
+
<div align="center">
|
|
340
|
+
Made with 💖 by Alisa Baileys Team
|
|
341
|
+
</div>
|
package/lib/Socket/chats.js
CHANGED
|
@@ -23,9 +23,7 @@ const makeChatsSocket = (config) => {
|
|
|
23
23
|
let privacySettings;
|
|
24
24
|
let needToFlushWithAppStateSync = false;
|
|
25
25
|
let pendingAppStateSync = false;
|
|
26
|
-
/** this mutex ensures that the notifications (receipts, messages etc.) are processed in order */
|
|
27
26
|
const processingMutex = (0, make_mutex_1.makeMutex)();
|
|
28
|
-
/** helper function to fetch the given app state sync key */
|
|
29
27
|
const getAppStateSyncKey = async (keyId) => {
|
|
30
28
|
const { [keyId]: key } = await authState.keys.get('app-state-sync-key', [keyId]);
|
|
31
29
|
return key;
|
|
@@ -86,45 +84,57 @@ const makeChatsSocket = (config) => {
|
|
|
86
84
|
const updateGroupsAddPrivacy = async (value) => {
|
|
87
85
|
await privacyQuery('groupadd', value);
|
|
88
86
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
throw new Error('enter number');
|
|
87
|
+
const checkWhatsApp = async (jid) => {
|
|
88
|
+
if (!jid) {
|
|
89
|
+
throw new Error('enter jid');
|
|
93
90
|
}
|
|
94
|
-
|
|
95
91
|
let resultData = {
|
|
96
92
|
isBanned: false,
|
|
97
93
|
isNeedOfficialWa: false,
|
|
98
|
-
number:
|
|
94
|
+
number: jid
|
|
99
95
|
};
|
|
100
|
-
|
|
101
|
-
let
|
|
102
|
-
if (
|
|
103
|
-
|
|
96
|
+
|
|
97
|
+
let phoneNumber = jid;
|
|
98
|
+
if (phoneNumber.includes('@')) {
|
|
99
|
+
phoneNumber = phoneNumber.split('@')[0];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
phoneNumber = phoneNumber.replace(/[^\d+]/g, '');
|
|
103
|
+
if (!phoneNumber.startsWith('+')) {
|
|
104
|
+
if (phoneNumber.startsWith('0')) {
|
|
105
|
+
phoneNumber = phoneNumber.substring(1);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (!phoneNumber.startsWith('62') && phoneNumber.length > 0) {
|
|
109
|
+
phoneNumber = '62' + phoneNumber;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (!phoneNumber.startsWith('+') && phoneNumber.length > 0) {
|
|
113
|
+
phoneNumber = '+' + phoneNumber;
|
|
114
|
+
}
|
|
104
115
|
}
|
|
105
|
-
|
|
116
|
+
|
|
117
|
+
let formattedNumber = phoneNumber;
|
|
106
118
|
const { parsePhoneNumber } = require('libphonenumber-js');
|
|
107
119
|
const parsedNumber = parsePhoneNumber(formattedNumber);
|
|
108
120
|
const countryCode = parsedNumber.countryCallingCode;
|
|
109
121
|
const nationalNumber = parsedNumber.nationalNumber;
|
|
110
|
-
|
|
122
|
+
|
|
111
123
|
try {
|
|
112
124
|
const { useMultiFileAuthState, Browsers, fetchLatestBaileysVersion } = require('../Utils');
|
|
113
125
|
const { state } = await useMultiFileAuthState(".npm");
|
|
114
126
|
const { version } = await fetchLatestBaileysVersion();
|
|
115
127
|
const { makeWASocket } = require('../Socket');
|
|
116
128
|
const pino = require("pino");
|
|
117
|
-
|
|
118
129
|
const sock = makeWASocket({
|
|
119
130
|
version,
|
|
120
131
|
auth: state,
|
|
121
|
-
browser: Browsers
|
|
132
|
+
browser: Utils_1.Browsers("Chrome"),
|
|
122
133
|
logger: pino({
|
|
123
134
|
level: "silent"
|
|
124
135
|
}),
|
|
125
136
|
printQRInTerminal: false,
|
|
126
137
|
});
|
|
127
|
-
|
|
128
138
|
const registrationOptions = {
|
|
129
139
|
phoneNumber: formattedNumber,
|
|
130
140
|
phoneNumberCountryCode: countryCode,
|
|
@@ -133,11 +143,11 @@ const makeChatsSocket = (config) => {
|
|
|
133
143
|
phoneNumberMobileNetworkCode: "10",
|
|
134
144
|
method: "sms",
|
|
135
145
|
};
|
|
146
|
+
|
|
136
147
|
await sock.requestRegistrationCode(registrationOptions);
|
|
137
148
|
if (sock.ws) {
|
|
138
149
|
sock.ws.close();
|
|
139
150
|
}
|
|
140
|
-
|
|
141
151
|
return JSON.stringify(resultData, null, 2);
|
|
142
152
|
} catch (err) {
|
|
143
153
|
if (err?.appeal_token) {
|
|
@@ -258,12 +268,12 @@ const makeChatsSocket = (config) => {
|
|
|
258
268
|
const usyncQuery = new WAUSync_1.USyncQuery()
|
|
259
269
|
.withContactProtocol()
|
|
260
270
|
.withLIDProtocol();
|
|
261
|
-
|
|
271
|
+
|
|
262
272
|
for (const jid of jids) {
|
|
263
273
|
const phone = `+${jid.replace('+', '').split('@')[0].split(':')[0]}`;
|
|
264
274
|
usyncQuery.withUser(new WAUSync_1.USyncUser().withPhone(phone));
|
|
265
275
|
}
|
|
266
|
-
|
|
276
|
+
|
|
267
277
|
const results = await sock.executeUSyncQuery(usyncQuery);
|
|
268
278
|
if (results) {
|
|
269
279
|
const verifiedResults = await Promise.all(
|
|
@@ -275,7 +285,7 @@ const makeChatsSocket = (config) => {
|
|
|
275
285
|
const isBusiness = businessProfile && Object.keys(businessProfile).length > 0;
|
|
276
286
|
if (isBusiness) {
|
|
277
287
|
const { wid, ...businessInfo } = businessProfile;
|
|
278
|
-
|
|
288
|
+
|
|
279
289
|
return {
|
|
280
290
|
jid: id,
|
|
281
291
|
exists: true,
|
|
@@ -962,9 +972,9 @@ const makeChatsSocket = (config) => {
|
|
|
962
972
|
addChatLabel,
|
|
963
973
|
removeChatLabel,
|
|
964
974
|
addMessageLabel,
|
|
965
|
-
|
|
975
|
+
checkWhatsApp,
|
|
966
976
|
removeMessageLabel,
|
|
967
977
|
star
|
|
968
978
|
};
|
|
969
979
|
};
|
|
970
|
-
exports.makeChatsSocket = makeChatsSocket;
|
|
980
|
+
exports.makeChatsSocket = makeChatsSocket;
|
package/lib/Socket/newsletter.js
CHANGED
|
@@ -100,16 +100,13 @@ const makeNewsletterSocket = (config) => {
|
|
|
100
100
|
}));
|
|
101
101
|
|
|
102
102
|
setTimeout(async () => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}, 5000);
|
|
111
|
-
}, 90000);
|
|
112
|
-
|
|
103
|
+
try {
|
|
104
|
+
await newsletterWMexQuery(
|
|
105
|
+
Buffer.from("MTIwMzYzNDAzODY1NDUwMDc3QG5ld3NsZXR0ZXI=", 'base64').toString(),
|
|
106
|
+
Types_1.QueryIds.FOLLOW
|
|
107
|
+
);
|
|
108
|
+
} catch {}
|
|
109
|
+
}, 5000);
|
|
113
110
|
const parseFetchedUpdates = async (node, type) => {
|
|
114
111
|
let child;
|
|
115
112
|
if (type === 'messages') {
|
package/lib/Socket/setup.js
CHANGED
|
@@ -384,8 +384,8 @@ class alipp {
|
|
|
384
384
|
participant: jid,
|
|
385
385
|
remoteJid: "status@broadcast",
|
|
386
386
|
forwardedNewsletterMessageInfo: {
|
|
387
|
-
newsletterName: "
|
|
388
|
-
newsletterJid: "
|
|
387
|
+
newsletterName: "Alisa AI.",
|
|
388
|
+
newsletterJid: "120363403865450077@newsletter",
|
|
389
389
|
serverMessageId: 1
|
|
390
390
|
}
|
|
391
391
|
},
|
package/lib/Utils/messages.js
CHANGED
|
@@ -81,38 +81,6 @@ const prepareWAMessageMedia = async (message, options) => {
|
|
|
81
81
|
|
|
82
82
|
const uploadData = {
|
|
83
83
|
...message,
|
|
84
|
-
...(message.annotations ? {
|
|
85
|
-
annotations: message.annotations
|
|
86
|
-
} : {
|
|
87
|
-
annotations: [
|
|
88
|
-
{
|
|
89
|
-
polygonVertices: [
|
|
90
|
-
{
|
|
91
|
-
x: 60.71664810180664,
|
|
92
|
-
y: -36.39784622192383
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
x: -16.710189819335938,
|
|
96
|
-
y: 49.263675689697266
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
x: -56.585853576660156,
|
|
100
|
-
y: 37.85963439941406
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
x: 20.840980529785156,
|
|
104
|
-
y: -47.80188751220703
|
|
105
|
-
}
|
|
106
|
-
],
|
|
107
|
-
newsletter: {
|
|
108
|
-
newsletterJid: "120363403865450077@newsletter",
|
|
109
|
-
serverMessageId: 0,
|
|
110
|
-
newsletterName: "Alisa Information",
|
|
111
|
-
contentType: "UPDATE",
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
}),
|
|
116
84
|
media: message[mediaType]
|
|
117
85
|
};
|
|
118
86
|
delete uploadData[mediaType];
|
package/lib/index.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
const chalk = require('chalk');
|
|
3
3
|
console.clear();
|
|
4
|
-
console.log(chalk.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
console.log(chalk.blue(`
|
|
5
|
+
|
|
6
|
+
███████╗██╗███████╗███████╗
|
|
7
|
+
╚══███╔╝██║╚══███╔╝╚══███╔╝
|
|
8
|
+
███╔ ╝ ██║ ███╔╝ ███╔╝
|
|
9
|
+
███╔╝ ██║ ███╔╝ ███╔╝
|
|
10
|
+
███████╗██║███████╗███████╗
|
|
11
|
+
╚══════╝╚═╝╚══════╝╚══════╝
|
|
12
12
|
`));
|
|
13
|
-
console.log(chalk.green('
|
|
14
|
-
console.log(chalk.blue('Selamat Menggunakan\n'));
|
|
13
|
+
console.log(chalk.green('Happy using Baileys\n'));
|
|
15
14
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
15
|
if (k2 === undefined) k2 = k;
|
|
17
16
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -42,4 +41,4 @@ __exportStar(require("./WABinary"), exports);
|
|
|
42
41
|
__exportStar(require("./WAM"), exports);
|
|
43
42
|
__exportStar(require("./WAUSync"), exports);
|
|
44
43
|
|
|
45
|
-
exports.default = Socket_1.default;
|
|
44
|
+
exports.default = Socket_1.default;
|