vinzzknight 1.0.2 → 1.0.3
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 +2 -116
- package/WAProto/index.js +131281 -59270
- package/lib/Defaults/index.js +7 -7
- package/lib/Socket/chats.js +19 -0
- package/lib/Socket/{luxu.d.ts → dugong.d.ts} +37 -61
- package/lib/Socket/dugong.js +484 -0
- package/lib/Socket/messages-send.js +15 -22
- package/lib/Socket/newsletter.js +69 -15
- package/lib/Socket/socket.js +15 -0
- package/lib/Utils/chat-utils.js +11 -2
- package/lib/Utils/generics.js +10 -5
- package/lib/Utils/generics.js.bak +433 -0
- package/lib/Utils/messages.js +2 -2
- package/lib/Utils/validate-connection.js +2 -0
- package/lib/Utils/validate-connection.js.bak +237 -0
- package/lib/WAUSync/index.d.ts +3 -0
- package/lib/index.js +4 -7
- package/lib/index.js.bak +39 -0
- package/package.json +16 -13
- package/WAProto/fix-import.js +0 -29
- package/lib/Socket/luxu.js +0 -620
package/README.md
CHANGED
|
@@ -1,116 +1,2 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
<img src="https://files.catbox.moe/rhm9rt.webp" width="172">
|
|
4
|
-
</p>
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Usage
|
|
9
|
-
```json
|
|
10
|
-
"depencies": {
|
|
11
|
-
"@whiskeysockets/baileys": "github:VinzzOfficial/Baileys"
|
|
12
|
-
}
|
|
13
|
-
```
|
|
14
|
-
## Import
|
|
15
|
-
```javascript
|
|
16
|
-
const {
|
|
17
|
-
default:makeWASocket,
|
|
18
|
-
// Other Options
|
|
19
|
-
} = require('@whiskeysockets/baileys');
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
# How To Connect To Whatsapp
|
|
24
|
-
## With QR Code
|
|
25
|
-
```javascript
|
|
26
|
-
const {
|
|
27
|
-
default: makeWASocket
|
|
28
|
-
} = require('@whiskeysockets/baileys');
|
|
29
|
-
|
|
30
|
-
const client = makeWASocket({
|
|
31
|
-
browser: ['Ubuntu', 'Chrome', '20.00.1'],
|
|
32
|
-
printQRInTerminal: true
|
|
33
|
-
})
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Connect With Number
|
|
37
|
-
```javascript
|
|
38
|
-
const {
|
|
39
|
-
default: makeWASocket,
|
|
40
|
-
fetchLatestWAWebVersion
|
|
41
|
-
} = require('@whiskeysockets/baileys');
|
|
42
|
-
|
|
43
|
-
const client = makeWASocket({
|
|
44
|
-
browser: ['Ubuntu', 'Chrome', '20.00.1'],
|
|
45
|
-
printQRInTerminal: false,
|
|
46
|
-
version: fetchLatestWAWebVersion()
|
|
47
|
-
// Other options
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const number = "628XXXXX";
|
|
51
|
-
const code = await client.requestPairingCode(number.trim) /* Use : (number, "YYYYYYYY") for custom-pairing */
|
|
52
|
-
|
|
53
|
-
console.log("Ur pairing code : " + code)
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
# Sending messages
|
|
57
|
-
|
|
58
|
-
## send orderMessage
|
|
59
|
-
```javascript
|
|
60
|
-
const fs = require('fs');
|
|
61
|
-
const ZeppImg = fs.readFileSync('./ZeppImage');
|
|
62
|
-
|
|
63
|
-
await client.sendMessage(m.chat, {
|
|
64
|
-
thumbnail: ZeppImg,
|
|
65
|
-
message: "Gotta get a grip",
|
|
66
|
-
orderTitle: "7eppeli-Corporation",
|
|
67
|
-
totalAmount1000: 72502,
|
|
68
|
-
totalCurrencyCode: "IDR"
|
|
69
|
-
}, { quoted:m })
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## send pollResultSnapshotMessage
|
|
73
|
-
```javascript
|
|
74
|
-
await client.sendMessage(m.chat, {
|
|
75
|
-
pollResultMessage: {
|
|
76
|
-
name: "7eppeli-Corporation",
|
|
77
|
-
options: [
|
|
78
|
-
{
|
|
79
|
-
optionName: "poll 1"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
optionName: "poll 2"
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
newsletter: {
|
|
86
|
-
newsletterName: "7eppeli | Killer Queen Information",
|
|
87
|
-
newsletterJid: "1@newsletter"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
})
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## send productMessage
|
|
94
|
-
```javascript
|
|
95
|
-
await client.relayMessage(m.chat, {
|
|
96
|
-
productMessage {
|
|
97
|
-
title: "7eppeli.pdf",
|
|
98
|
-
description: "zZZ...",
|
|
99
|
-
thumbnail: { url: "./ZeppImage" },
|
|
100
|
-
productId: "EXAMPLE_TOKEN",
|
|
101
|
-
retailerId: "EXAMPLE_RETAILER_ID",
|
|
102
|
-
url: "https://t.me/YuukeyD7eppeli",
|
|
103
|
-
body: "Nak Tido",
|
|
104
|
-
footer: "Footer",
|
|
105
|
-
buttons: [
|
|
106
|
-
{
|
|
107
|
-
name: "cta_url",
|
|
108
|
-
buttonParamsJson: "{\"display_text\":\"7eppeli-Pdf\",\"url\":\"https://t.me/YuukeyD7eppeli\"}"
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
priceAmount1000: 72502,
|
|
112
|
-
currencyCode: "IDR"
|
|
113
|
-
}
|
|
114
|
-
})
|
|
115
|
-
```
|
|
116
|
-
Follow https://t.me/TenkaWaBails kalau mau liat type message yg lain :v
|
|
1
|
+
# baileys-pro
|
|
2
|
+
Beta Version
|