amiudmodz 6.0.7 โ 6.0.8
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 +9 -181
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,12 +27,15 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
<img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" width="100%">
|
|
31
|
-
|
|
32
30
|
## <img src="https://media.giphy.com/media/iY8CRBdQXODJSCERIr/giphy.gif" width="30"> About
|
|
33
31
|
|
|
34
32
|
> **Baileys (UDMODZ Edition)** is a lightweight, high-performance WhatsApp Web API library (published as `amiudmodz`). It implements the complete WhatsApp Web socket protocol and enables developers to build custom and powerful WhatsApp bots via Node.js limitlessly. Both authentication types (Pairing Code and QR Code) are natively supported.
|
|
35
33
|
|
|
34
|
+
> [!IMPORTANT]
|
|
35
|
+
> **๐ Official Documentation & AI Assistant Website**:
|
|
36
|
+
> Visit the official documentation site at **[baileys.udmodz.site](https://baileys.udmodz.site)**!
|
|
37
|
+
> It contains detailed feature installation walkthroughs, configuration references, JID-to-LID safety guides, and a mobile-friendly **Kyrexi AI Support Assistant** to answer any questions about the engine instantly.
|
|
38
|
+
|
|
36
39
|
<div align="center">
|
|
37
40
|
|
|
38
41
|
| ๐งฉ Feature | ๐ Description |
|
|
@@ -50,194 +53,19 @@
|
|
|
50
53
|
|
|
51
54
|
## ๐ Installation & Usage
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
<summary><b>๐ฆ 1. Install using NPM</b></summary>
|
|
55
|
-
<br/>
|
|
56
|
+
To install the library, run the following command in your terminal:
|
|
56
57
|
|
|
57
58
|
```bash
|
|
58
59
|
npm install amiudmodz
|
|
59
60
|
```
|
|
60
|
-
</details>
|
|
61
|
-
|
|
62
|
-
<details>
|
|
63
|
-
<summary><b>๐ป 2. Basic Example</b></summary>
|
|
64
|
-
<br/>
|
|
65
|
-
|
|
66
|
-
```typescript
|
|
67
|
-
import makeWASocket, { useMultiFileAuthState } from 'amiudmodz'
|
|
68
|
-
|
|
69
|
-
async function connectToWhatsApp () {
|
|
70
|
-
const { state, saveCreds } = await useMultiFileAuthState('auth_info_baileys')
|
|
71
|
-
|
|
72
|
-
// Connect to WA Socket
|
|
73
|
-
const sock = makeWASocket({
|
|
74
|
-
printQRInTerminal: true,
|
|
75
|
-
auth: state
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
// Save creds when updated
|
|
79
|
-
sock.ev.on('creds.update', saveCreds)
|
|
80
|
-
|
|
81
|
-
// Receive messages
|
|
82
|
-
sock.ev.on('messages.upsert', async m => {
|
|
83
|
-
console.log(JSON.stringify(m, undefined, 2))
|
|
84
|
-
|
|
85
|
-
console.log('replying to', m.messages[0].key.remoteJid)
|
|
86
|
-
await sock.sendMessage(m.messages[0].key.remoteJid!, { text: 'Hello there!' })
|
|
87
|
-
})
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
connectToWhatsApp()
|
|
91
|
-
```
|
|
92
|
-
</details>
|
|
93
|
-
|
|
94
|
-
<img src="https://user-images.githubusercontent.com/73097560/115834477-dbab4500-a447-11eb-908a-139a6edaec5c.gif" width="100%">
|
|
95
|
-
|
|
96
|
-
## โจ New Features & Message Types
|
|
97
|
-
|
|
98
|
-
> All new message types are sent via the standard `sock.sendMessage(jid, content)` API โ no new methods to learn!
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
### ๐ค AI Icon Message
|
|
103
|
-
Show the Meta AI โฆ badge on any message.
|
|
104
|
-
|
|
105
|
-
```typescript
|
|
106
|
-
await sock.sendMessage(jid, {
|
|
107
|
-
text: "This response was generated by AI.",
|
|
108
|
-
ai: true
|
|
109
|
-
})
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
### ๐ฌ AI Disclaimer Message
|
|
115
|
-
Add an AI disclaimer label underneath the message.
|
|
116
|
-
|
|
117
|
-
```typescript
|
|
118
|
-
await sock.sendMessage(jid, {
|
|
119
|
-
text: "Here is your answer.",
|
|
120
|
-
aiDisclaimer: "Generated by AI โ always verify important info."
|
|
121
|
-
})
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
### ๐ป Code Block (AI Rich Response)
|
|
127
|
-
Render a syntax-highlighted code block in the WhatsApp AI style.
|
|
128
|
-
|
|
129
|
-
```typescript
|
|
130
|
-
await sock.sendMessage(jid, {
|
|
131
|
-
contentText: "Here's a Node.js example:",
|
|
132
|
-
code: `const os = require('os');\nconsole.log(os.platform());`,
|
|
133
|
-
language: "javascript" // optional: python, typescript, bash, etc.
|
|
134
|
-
})
|
|
135
|
-
```
|
|
136
61
|
|
|
137
|
-
|
|
62
|
+
For complete basic setup examples, custom message layouts, passkey linking walkthroughs, and troubleshooting guides, please visit our official documentation site:
|
|
138
63
|
|
|
139
|
-
|
|
140
|
-
Render a formatted table โ first row is treated as a header automatically.
|
|
141
|
-
|
|
142
|
-
```typescript
|
|
143
|
-
await sock.sendMessage(jid, {
|
|
144
|
-
contentText: "Server status overview:",
|
|
145
|
-
title: "Server Stats",
|
|
146
|
-
table: [
|
|
147
|
-
["Service", "Status", "Uptime"],
|
|
148
|
-
["API", "โ
Online", "99.9%"],
|
|
149
|
-
["DB", "โ
Online", "99.7%"],
|
|
150
|
-
["Cache", "โ ๏ธ Slow", "98.1%"]
|
|
151
|
-
]
|
|
152
|
-
// noHeading: true โ pass this to treat all rows as data rows
|
|
153
|
-
})
|
|
154
|
-
```
|
|
64
|
+
๐ **[baileys.udmodz.site](https://baileys.udmodz.site)**
|
|
155
65
|
|
|
156
66
|
---
|
|
157
67
|
|
|
158
|
-
###
|
|
159
|
-
Send multiple images or videos as a grouped album.
|
|
160
|
-
|
|
161
|
-
```typescript
|
|
162
|
-
await sock.sendMessage(jid, {
|
|
163
|
-
album: [
|
|
164
|
-
{ image: { url: 'https://example.com/photo1.jpg' }, caption: 'First photo' },
|
|
165
|
-
{ image: { url: 'https://example.com/photo2.jpg' }, caption: 'Second photo' },
|
|
166
|
-
{ video: { url: 'https://example.com/clip.mp4' }, caption: 'A clip' }
|
|
167
|
-
]
|
|
168
|
-
})
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
### ๐๏ธ Event Message
|
|
174
|
-
Send a native WhatsApp event card.
|
|
175
|
-
|
|
176
|
-
```typescript
|
|
177
|
-
await sock.sendMessage(jid, {
|
|
178
|
-
event: {
|
|
179
|
-
name: "Team Meeting ๐",
|
|
180
|
-
description: "Monthly sync-up for all members.",
|
|
181
|
-
location: "Google Meet",
|
|
182
|
-
startDate: new Date(Date.now() + 3600 * 1000), // 1 hour from now
|
|
183
|
-
endDate: new Date(Date.now() + 7200 * 1000) // optional
|
|
184
|
-
}
|
|
185
|
-
})
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
### ๐น PTV โ Round Video Note
|
|
191
|
-
Send a circular video note (like Telegram video messages).
|
|
192
|
-
|
|
193
|
-
```typescript
|
|
194
|
-
await sock.sendMessage(jid, {
|
|
195
|
-
video: { url: 'https://example.com/short-clip.mp4' },
|
|
196
|
-
ptv: true
|
|
197
|
-
})
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
### ๐ฃ Mention All Members
|
|
203
|
-
Mention every participant in a group with a single flag.
|
|
204
|
-
|
|
205
|
-
```typescript
|
|
206
|
-
await sock.sendMessage(jid, {
|
|
207
|
-
text: "Attention everyone! ๐ข",
|
|
208
|
-
mentionAll: true
|
|
209
|
-
})
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
### ๐งพ Rich Response โ Full Custom Layout
|
|
215
|
-
Compose a full multi-block AI rich response with text, table, and code mixed together.
|
|
216
|
-
|
|
217
|
-
```typescript
|
|
218
|
-
await sock.sendMessage(jid, {
|
|
219
|
-
richResponse: [
|
|
220
|
-
{ text: "Here is a pricing comparison:" },
|
|
221
|
-
{
|
|
222
|
-
table: [
|
|
223
|
-
{ isHeader: true, items: ["Plan", "Price", "Limit"] },
|
|
224
|
-
{ isHeader: false, items: ["Free", "$0", "100 msg/day"] },
|
|
225
|
-
{ isHeader: false, items: ["Pro", "$9.99", "Unlimited"] }
|
|
226
|
-
],
|
|
227
|
-
title: "Pricing Plans"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
code: [
|
|
231
|
-
{ highlightType: 1, codeContent: "npm" },
|
|
232
|
-
{ highlightType: 0, codeContent: " install amiudmodz" }
|
|
233
|
-
],
|
|
234
|
-
language: "bash"
|
|
235
|
-
}
|
|
236
|
-
]
|
|
237
|
-
})
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
---
|
|
68
|
+
### ๐ Extended Message Types Quick-Reference
|
|
241
69
|
|
|
242
70
|
<div align="center">
|
|
243
71
|
|