@badzz88/baileys 8.3.0 → 8.4.1
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 +27 -27
- package/WAProto/GenerateStatics.sh +3 -0
- package/WAProto/WAProto.proto +6902 -0
- package/WAProto/fix-import.js +29 -0
- package/WAProto/fix-imports.js +85 -0
- package/WAProto/index.d.ts +79257 -0
- package/WAProto/index.js +204305 -131020
- package/engine-requirements.js +3 -4
- package/lib/Defaults/baileys-version.json +1 -1
- package/lib/Defaults/index.js +119 -136
- package/lib/Signal/Group/ciphertext-message.js +2 -5
- package/lib/Signal/Group/group-session-builder.js +7 -41
- package/lib/Signal/Group/group_cipher.js +37 -51
- package/lib/Signal/Group/index.js +12 -57
- package/lib/Signal/Group/keyhelper.js +7 -44
- package/lib/Signal/Group/sender-chain-key.js +7 -15
- package/lib/Signal/Group/sender-key-distribution-message.js +8 -11
- package/lib/Signal/Group/sender-key-message.js +9 -12
- package/lib/Signal/Group/sender-key-name.js +2 -5
- package/lib/Signal/Group/sender-key-record.js +9 -21
- package/lib/Signal/Group/sender-key-state.js +27 -42
- package/lib/Signal/Group/sender-message-key.js +4 -7
- package/lib/Signal/libsignal.js +347 -90
- package/lib/Signal/lid-mapping.js +277 -0
- package/lib/Socket/Client/index.js +3 -19
- package/lib/Socket/Client/types.js +11 -0
- package/lib/Socket/Client/websocket.js +54 -0
- package/lib/Socket/business.js +162 -43
- package/lib/Socket/chats.js +627 -404
- package/lib/Socket/communities.js +431 -0
- package/lib/Socket/community.js +392 -0
- package/lib/Socket/dugong.js +161 -8
- package/lib/Socket/groups.js +154 -160
- package/lib/Socket/index.js +11 -10
- package/lib/Socket/luxu.js +387 -0
- package/lib/Socket/messages-recv.js +1421 -615
- package/lib/Socket/messages-send.js +1150 -624
- package/lib/Socket/mex.js +42 -0
- package/lib/Socket/newsletter.js +139 -314
- package/lib/Socket/registration.js +2 -1
- package/lib/Socket/socket.js +544 -242
- package/lib/Store/index.js +10 -10
- package/lib/Store/keyed-db.js +108 -0
- package/lib/Store/make-cache-manager-store.js +43 -41
- package/lib/Store/make-in-memory-store.js +112 -341
- package/lib/Store/make-ordered-dictionary.js +14 -20
- package/lib/Store/object-repository.js +11 -6
- package/lib/Types/Auth.js +2 -2
- package/lib/Types/Bussines.js +2 -0
- package/lib/Types/Call.js +2 -2
- package/lib/Types/Chat.js +8 -4
- package/lib/Types/Contact.js +2 -2
- package/lib/Types/Events.js +2 -2
- package/lib/Types/GroupMetadata.js +2 -2
- package/lib/Types/Label.js +3 -5
- package/lib/Types/LabelAssociation.js +3 -5
- package/lib/Types/Message.js +11 -9
- package/lib/Types/Mex.js +37 -0
- package/lib/Types/Product.js +2 -2
- package/lib/Types/Signal.js +2 -2
- package/lib/Types/Socket.js +3 -2
- package/lib/Types/State.js +56 -2
- package/lib/Types/USync.js +2 -2
- package/lib/Types/index.js +15 -31
- package/lib/Utils/auth-utils.js +239 -143
- package/lib/Utils/browser-utils.js +48 -0
- package/lib/Utils/business.js +66 -69
- package/lib/Utils/chat-utils.js +396 -253
- package/lib/Utils/companion-reg-client-utils.js +35 -0
- package/lib/Utils/crypto.js +57 -90
- package/lib/Utils/decode-wa-message.js +236 -84
- package/lib/Utils/event-buffer.js +185 -77
- package/lib/Utils/generics.js +188 -283
- package/lib/Utils/history.js +93 -55
- package/lib/Utils/identity-change-handler.js +50 -0
- package/lib/Utils/index.js +23 -33
- package/lib/Utils/link-preview.js +16 -24
- package/lib/Utils/logger.js +3 -7
- package/lib/Utils/lt-hash.js +3 -46
- package/lib/Utils/make-mutex.js +24 -34
- package/lib/Utils/message-composer.js +273 -0
- package/lib/Utils/message-retry-manager.js +265 -0
- package/lib/Utils/messages-media.js +451 -482
- package/lib/Utils/messages.js +796 -359
- package/lib/Utils/noise-handler.js +145 -99
- package/lib/Utils/offline-node-processor.js +40 -0
- package/lib/Utils/pre-key-manager.js +106 -0
- package/lib/Utils/process-message.js +459 -150
- package/lib/Utils/reporting-utils.js +258 -0
- package/lib/Utils/signal.js +120 -72
- package/lib/Utils/stanza-ack.js +38 -0
- package/lib/Utils/sync-action-utils.js +49 -0
- package/lib/Utils/tc-token-utils.js +163 -0
- package/lib/Utils/use-multi-file-auth-state.js +29 -27
- package/lib/Utils/validate-connection.js +73 -99
- package/lib/WABinary/constants.js +1281 -20
- package/lib/WABinary/decode.js +52 -42
- package/lib/WABinary/encode.js +110 -155
- package/lib/WABinary/generic-utils.js +55 -49
- package/lib/WABinary/index.js +6 -21
- package/lib/WABinary/jid-utils.js +76 -40
- package/lib/WABinary/types.js +2 -2
- package/lib/WAM/BinaryInfo.js +2 -5
- package/lib/WAM/constants.js +19071 -11568
- package/lib/WAM/encode.js +17 -22
- package/lib/WAM/index.js +4 -19
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +33 -13
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +11 -14
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +9 -12
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +9 -13
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +25 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +20 -22
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +13 -8
- package/lib/WAUSync/Protocols/index.js +6 -20
- package/lib/WAUSync/USyncQuery.js +44 -35
- package/lib/WAUSync/USyncUser.js +10 -5
- package/lib/WAUSync/index.js +4 -19
- package/lib/index.js +39 -53
- package/package.json +134 -101
- package/lib/Defaults/index.d.ts +0 -53
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -9
- package/lib/Signal/Group/group-session-builder.d.ts +0 -14
- package/lib/Signal/Group/group_cipher.d.ts +0 -17
- package/lib/Signal/Group/index.d.ts +0 -11
- package/lib/Signal/Group/keyhelper.d.ts +0 -10
- package/lib/Signal/Group/queue-job.d.ts +0 -1
- package/lib/Signal/Group/sender-chain-key.d.ts +0 -13
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -16
- package/lib/Signal/Group/sender-key-message.d.ts +0 -18
- package/lib/Signal/Group/sender-key-name.d.ts +0 -17
- package/lib/Signal/Group/sender-key-record.d.ts +0 -30
- package/lib/Signal/Group/sender-key-state.d.ts +0 -38
- package/lib/Signal/Group/sender-message-key.d.ts +0 -11
- package/lib/Signal/libsignal.d.ts +0 -3
- package/lib/Socket/Client/abstract-socket-client.d.ts +0 -17
- package/lib/Socket/Client/index.d.ts +0 -3
- package/lib/Socket/Client/mobile-socket-client.d.ts +0 -13
- package/lib/Socket/Client/web-socket-client.d.ts +0 -12
- package/lib/Socket/business.d.ts +0 -171
- package/lib/Socket/chats.d.ts +0 -267
- package/lib/Socket/dugong.d.ts +0 -254
- package/lib/Socket/groups.d.ts +0 -115
- package/lib/Socket/index.d.ts +0 -173
- package/lib/Socket/messages-recv.d.ts +0 -161
- package/lib/Socket/messages-send.d.ts +0 -149
- package/lib/Socket/newsletter.d.ts +0 -134
- package/lib/Socket/registration.d.ts +0 -267
- package/lib/Socket/socket.d.ts +0 -43
- package/lib/Socket/usync.d.ts +0 -36
- package/lib/Store/index.d.ts +0 -3
- package/lib/Store/make-cache-manager-store.d.ts +0 -13
- package/lib/Store/make-in-memory-store.d.ts +0 -118
- package/lib/Store/make-ordered-dictionary.d.ts +0 -13
- package/lib/Store/object-repository.d.ts +0 -10
- package/lib/Types/Auth.d.ts +0 -110
- package/lib/Types/Call.d.ts +0 -13
- package/lib/Types/Chat.d.ts +0 -102
- package/lib/Types/Contact.d.ts +0 -19
- package/lib/Types/Events.d.ts +0 -157
- package/lib/Types/GroupMetadata.d.ts +0 -55
- package/lib/Types/Label.d.ts +0 -35
- package/lib/Types/LabelAssociation.d.ts +0 -29
- package/lib/Types/Message.d.ts +0 -273
- package/lib/Types/Newsletter.d.ts +0 -103
- package/lib/Types/Product.d.ts +0 -78
- package/lib/Types/Signal.d.ts +0 -57
- package/lib/Types/Socket.d.ts +0 -111
- package/lib/Types/State.d.ts +0 -27
- package/lib/Types/USync.d.ts +0 -25
- package/lib/Types/index.d.ts +0 -57
- package/lib/Utils/auth-utils.d.ts +0 -18
- package/lib/Utils/baileys-event-stream.d.ts +0 -16
- package/lib/Utils/business.d.ts +0 -22
- package/lib/Utils/chat-utils.d.ts +0 -71
- package/lib/Utils/crypto.d.ts +0 -41
- package/lib/Utils/decode-wa-message.d.ts +0 -19
- package/lib/Utils/event-buffer.d.ts +0 -35
- package/lib/Utils/generics.d.ts +0 -92
- package/lib/Utils/history.d.ts +0 -15
- package/lib/Utils/index.d.ts +0 -17
- package/lib/Utils/link-preview.d.ts +0 -21
- package/lib/Utils/logger.d.ts +0 -4
- package/lib/Utils/lt-hash.d.ts +0 -12
- package/lib/Utils/make-mutex.d.ts +0 -7
- package/lib/Utils/messages-media.d.ts +0 -116
- package/lib/Utils/messages.d.ts +0 -77
- package/lib/Utils/noise-handler.d.ts +0 -21
- package/lib/Utils/process-message.d.ts +0 -41
- package/lib/Utils/signal.d.ts +0 -32
- package/lib/Utils/use-multi-file-auth-state.d.ts +0 -13
- package/lib/Utils/validate-connection.d.ts +0 -11
- package/lib/WABinary/constants.d.ts +0 -30
- package/lib/WABinary/decode.d.ts +0 -7
- package/lib/WABinary/encode.d.ts +0 -3
- package/lib/WABinary/generic-utils.d.ts +0 -17
- package/lib/WABinary/index.d.ts +0 -5
- package/lib/WABinary/jid-utils.d.ts +0 -31
- package/lib/WABinary/types.d.ts +0 -18
- package/lib/WAM/BinaryInfo.d.ts +0 -17
- package/lib/WAM/constants.d.ts +0 -38
- package/lib/WAM/encode.d.ts +0 -3
- package/lib/WAM/index.d.ts +0 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -9
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -22
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -12
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -12
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -25
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -8
- package/lib/WAUSync/Protocols/index.d.ts +0 -4
- package/lib/WAUSync/USyncQuery.d.ts +0 -28
- package/lib/WAUSync/USyncUser.d.ts +0 -12
- package/lib/WAUSync/index.d.ts +0 -3
- package/lib/index.d.ts +0 -12
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# WhatsApp Baileys Badzz
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src="https://
|
|
4
|
+
<img src="https://b.top4top.io/p_3816tx02l1.jpg" 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.
|
|
@@ -57,7 +57,7 @@ Send group status with version 2
|
|
|
57
57
|
```javascript
|
|
58
58
|
await sock.sendMessage(target, {
|
|
59
59
|
groupStatusMessage: {
|
|
60
|
-
text: "
|
|
60
|
+
text: "#BADZZNE"
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
```
|
|
@@ -68,8 +68,8 @@ Send multiple images in a single album message:
|
|
|
68
68
|
```javascript
|
|
69
69
|
await sock.sendMessage(target, {
|
|
70
70
|
albumMessage: [
|
|
71
|
-
{ image: cihuy, caption: "
|
|
72
|
-
{ image: { url: "URL IMAGE" }, caption: "
|
|
71
|
+
{ image: cihuy, caption: "#BADZZNE" },
|
|
72
|
+
{ image: { url: "URL IMAGE" }, caption: "#BADZZNE" }
|
|
73
73
|
]
|
|
74
74
|
}, { quoted: m });
|
|
75
75
|
```
|
|
@@ -81,12 +81,12 @@ Create and send WhatsApp event invitations:
|
|
|
81
81
|
await sock.sendMessage(target, {
|
|
82
82
|
eventMessage: {
|
|
83
83
|
isCanceled: false,
|
|
84
|
-
name: "
|
|
85
|
-
description: "
|
|
84
|
+
name: "#BADZZNE",
|
|
85
|
+
description: "#BADZZNE",
|
|
86
86
|
location: {
|
|
87
87
|
degreesLatitude: 0,
|
|
88
88
|
degreesLongitude: 0,
|
|
89
|
-
name: "
|
|
89
|
+
name: "#BADZZNE"
|
|
90
90
|
},
|
|
91
91
|
joinLink: "https://call.whatsapp.com/video/badzzne2",
|
|
92
92
|
startTime: "1763019000",
|
|
@@ -102,14 +102,14 @@ Display poll results with vote counts:
|
|
|
102
102
|
```javascript
|
|
103
103
|
await sock.sendMessage(target, {
|
|
104
104
|
pollResultMessage: {
|
|
105
|
-
name: "
|
|
105
|
+
name: "#BADZZNE",
|
|
106
106
|
pollVotes: [
|
|
107
107
|
{
|
|
108
|
-
optionName: "
|
|
108
|
+
optionName: "#BADZZNE",
|
|
109
109
|
optionVoteCount: "112233"
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
|
-
optionName: "
|
|
112
|
+
optionName: "#BADZZNE",
|
|
113
113
|
optionVoteCount: "1"
|
|
114
114
|
}
|
|
115
115
|
]
|
|
@@ -123,14 +123,14 @@ Send basic interactive messages with copy button functionality:
|
|
|
123
123
|
```javascript
|
|
124
124
|
await sock.sendMessage(target, {
|
|
125
125
|
interactiveMessage: {
|
|
126
|
-
header: "
|
|
127
|
-
title: "
|
|
126
|
+
header: "#BADZZNE",
|
|
127
|
+
title: "#BADZZNE",
|
|
128
128
|
footer: "telegram: @badzzne2 ",
|
|
129
129
|
buttons: [
|
|
130
130
|
{
|
|
131
131
|
name: "cta_copy",
|
|
132
132
|
buttonParamsJson: JSON.stringify({
|
|
133
|
-
display_text: "
|
|
133
|
+
display_text: "#BADZZNE",
|
|
134
134
|
id: "123456789",
|
|
135
135
|
copy_code: "ABC123XYZ"
|
|
136
136
|
})
|
|
@@ -146,8 +146,8 @@ Send interactive messages with buttons, copy actions, and native flow features:
|
|
|
146
146
|
```javascript
|
|
147
147
|
await sock.sendMessage(target, {
|
|
148
148
|
interactiveMessage: {
|
|
149
|
-
header: "
|
|
150
|
-
title: "
|
|
149
|
+
header: "#BADZZNE",
|
|
150
|
+
title: "#BADZZNE",
|
|
151
151
|
footer: "telegram: @badzzne2",
|
|
152
152
|
image: { url: "https://example.com/image.jpg" },
|
|
153
153
|
nativeFlowMessage: {
|
|
@@ -155,14 +155,14 @@ await sock.sendMessage(target, {
|
|
|
155
155
|
limited_time_offer: {
|
|
156
156
|
text: "idk hummmm?",
|
|
157
157
|
url: "https://t.me/badzzne2",
|
|
158
|
-
copy_code: "
|
|
158
|
+
copy_code: "#BADZZNE",
|
|
159
159
|
expiration_time: Date.now() * 999
|
|
160
160
|
},
|
|
161
161
|
bottom_sheet: {
|
|
162
162
|
in_thread_buttons_limit: 2,
|
|
163
163
|
divider_indices: [1, 2, 3, 4, 5, 999],
|
|
164
|
-
list_title: "
|
|
165
|
-
button_title: "
|
|
164
|
+
list_title: "#BADZZNE",
|
|
165
|
+
button_title: "#BADZZNE"
|
|
166
166
|
},
|
|
167
167
|
tap_target_configuration: {
|
|
168
168
|
title: " X ",
|
|
@@ -188,7 +188,7 @@ await sock.sendMessage(target, {
|
|
|
188
188
|
{
|
|
189
189
|
name: "single_select",
|
|
190
190
|
buttonParamsJson: JSON.stringify({
|
|
191
|
-
title: "
|
|
191
|
+
title: "#BADZZNE",
|
|
192
192
|
sections: [
|
|
193
193
|
{
|
|
194
194
|
title: "title",
|
|
@@ -225,8 +225,8 @@ Send interactive messages with thumbnail image and copy button:
|
|
|
225
225
|
```javascript
|
|
226
226
|
await sock.sendMessage(target, {
|
|
227
227
|
interactiveMessage: {
|
|
228
|
-
header: "
|
|
229
|
-
title: "
|
|
228
|
+
header: "#BADZZNE",
|
|
229
|
+
title: "#BADZZNE",
|
|
230
230
|
footer: "telegram: @badzzne2",
|
|
231
231
|
image: { url: "https://example.com/image.jpg" },
|
|
232
232
|
buttons: [
|
|
@@ -278,8 +278,8 @@ Send interactive messages with document from buffer (file system) - **Note: Docu
|
|
|
278
278
|
```javascript
|
|
279
279
|
await sock.sendMessage(target, {
|
|
280
280
|
interactiveMessage: {
|
|
281
|
-
header: "
|
|
282
|
-
title: "
|
|
281
|
+
header: "#BADZZNE",
|
|
282
|
+
title: "#BADZZNE",
|
|
283
283
|
footer: "telegram: @badzzne2",
|
|
284
284
|
document: fs.readFileSync("./package.json"),
|
|
285
285
|
mimetype: "application/pdf",
|
|
@@ -291,8 +291,8 @@ await sock.sendMessage(target, {
|
|
|
291
291
|
isForwarded: false
|
|
292
292
|
},
|
|
293
293
|
externalAdReply: {
|
|
294
|
-
title: "
|
|
295
|
-
body: "
|
|
294
|
+
title: "#BADZZNE",
|
|
295
|
+
body: "#BADZZNE",
|
|
296
296
|
mediaType: 3,
|
|
297
297
|
thumbnailUrl: "https://example.com/image.jpg",
|
|
298
298
|
mediaUrl: " X ",
|
|
@@ -320,8 +320,8 @@ Send interactive messages with document from buffer (file system) without contex
|
|
|
320
320
|
```javascript
|
|
321
321
|
await sock.sendMessage(target, {
|
|
322
322
|
interactiveMessage: {
|
|
323
|
-
header: "
|
|
324
|
-
title: "
|
|
323
|
+
header: "#BADZZNE",
|
|
324
|
+
title: "#BADZZNE",
|
|
325
325
|
footer: "telegram: @badzzne2",
|
|
326
326
|
document: fs.readFileSync("./package.json"),
|
|
327
327
|
mimetype: "application/pdf",
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify --no-comments -o ./index.js ./WAProto.proto;
|
|
2
|
+
yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify ./WAProto.proto | yarn pbts --no-comments -o ./index.d.ts -;
|
|
3
|
+
node ./fix-imports.js
|