@fvckerss/baileys 1.0.4 → 1.0.5
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 +104 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,6 @@ Baileys ini modifan dari baileys @whiskeysockets/baileys
|
|
|
36
36
|
- Forward Message
|
|
37
37
|
- Read Receipt
|
|
38
38
|
- Presence Update
|
|
39
|
-
- Rich Response Message
|
|
40
39
|
- AI Rich Response Message
|
|
41
40
|
- Full WhatsApp Web Protocol Access
|
|
42
41
|
|
|
@@ -198,6 +197,110 @@ END:VCARD`
|
|
|
198
197
|
|
|
199
198
|
---
|
|
200
199
|
|
|
200
|
+
### ✨ Rich Code block
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
const {
|
|
204
|
+
prepareRichResponseMessage,
|
|
205
|
+
generateWAMessageFromContent
|
|
206
|
+
} = require("@fvckerss/baileys")
|
|
207
|
+
|
|
208
|
+
const rich = prepareRichResponseMessage({
|
|
209
|
+
headerText: "JavaScript Example",
|
|
210
|
+
|
|
211
|
+
contentText:
|
|
212
|
+
"Berikut contoh code sederhana",
|
|
213
|
+
|
|
214
|
+
code: `
|
|
215
|
+
async function hello() {
|
|
216
|
+
console.log("Hello World")
|
|
217
|
+
}
|
|
218
|
+
`,
|
|
219
|
+
|
|
220
|
+
language: "javascript",
|
|
221
|
+
|
|
222
|
+
footerText: "Generated by Fvckers"
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
const msg = generateWAMessageFromContent(
|
|
226
|
+
jid,
|
|
227
|
+
rich,
|
|
228
|
+
{}
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
await conn.relayMessage(
|
|
232
|
+
jid,
|
|
233
|
+
msg.message,
|
|
234
|
+
{
|
|
235
|
+
messageId: msg.key.id
|
|
236
|
+
}
|
|
237
|
+
)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
### ✨ Rich Table
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
const {
|
|
246
|
+
prepareRichResponseMessage,
|
|
247
|
+
generateWAMessageFromContent
|
|
248
|
+
} = require("@fvckerss/baileys")
|
|
249
|
+
|
|
250
|
+
const rich = prepareRichResponseMessage({
|
|
251
|
+
headerText: "Package Info",
|
|
252
|
+
|
|
253
|
+
contentText: "Data package:",
|
|
254
|
+
|
|
255
|
+
table: [
|
|
256
|
+
["Package", "Version"],
|
|
257
|
+
["Baileys", "7.0.0"],
|
|
258
|
+
["Express", "5.1.0"],
|
|
259
|
+
["Axios", "1.11.0"]
|
|
260
|
+
]
|
|
261
|
+
})
|
|
262
|
+
|
|
263
|
+
const msg = generateWAMessageFromContent(
|
|
264
|
+
jid,
|
|
265
|
+
rich,
|
|
266
|
+
{}
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
await sock.relayMessage(
|
|
270
|
+
jid,
|
|
271
|
+
msg.message,
|
|
272
|
+
{
|
|
273
|
+
messageId: msg.key.id
|
|
274
|
+
}
|
|
275
|
+
)
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
### ✨ Rich Inline Entites
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
const { prepareRichResponseMessage } = require("@fvckerss/baileys")
|
|
284
|
+
|
|
285
|
+
const msg = prepareRichResponseMessage({
|
|
286
|
+
disclaimerText: 'Inline Entities',
|
|
287
|
+
headerText: '## Check!',
|
|
288
|
+
contentText: '---',
|
|
289
|
+
links: [
|
|
290
|
+
{
|
|
291
|
+
text: `Website`,
|
|
292
|
+
title: " Portofolio",
|
|
293
|
+
url: "https://swiper.my.id"
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
footerText: '---'
|
|
297
|
+
})
|
|
298
|
+
|
|
299
|
+
await conn.relayMessage(m.chat, msg, {})
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
201
304
|
### 📋 List Message
|
|
202
305
|
|
|
203
306
|
```
|