sauruslord-baileys 2.0.2 → 2.0.4
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 +24 -24
- package/lib/index.js +13 -17
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
<div align="center">
|
|
3
3
|
<h1>LORDSAURUS BAILEYS</h1>
|
|
4
|
-
<img src="https://cdn.
|
|
4
|
+
<img src="https://cdn.raicong.my.id/files/pyaqrf.jpg" alt="Thumbnail" width='100%' />
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
<br>
|
|
@@ -119,7 +119,7 @@ Notes
|
|
|
119
119
|
### Detect Message
|
|
120
120
|
Detect message type from incoming message object.
|
|
121
121
|
```js
|
|
122
|
-
|
|
122
|
+
saurus.detect(m)
|
|
123
123
|
// Example
|
|
124
124
|
const type = saurus.detect(m)
|
|
125
125
|
if (type === 'image') {
|
|
@@ -192,7 +192,7 @@ await saurus.sendMessage(jid, {
|
|
|
192
192
|
eventMessage: {
|
|
193
193
|
isCanceled: false,
|
|
194
194
|
name: "Hello World",
|
|
195
|
-
description: "
|
|
195
|
+
description: "saurusganteng",
|
|
196
196
|
location: {
|
|
197
197
|
degreesLatitude: 0,
|
|
198
198
|
degreesLongitude: 0,
|
|
@@ -235,7 +235,7 @@ await saurus.sendMessage(jid, {
|
|
|
235
235
|
interactiveMessage: {
|
|
236
236
|
header: "Hello World",
|
|
237
237
|
title: "Hello World",
|
|
238
|
-
footer: "
|
|
238
|
+
footer: "saurus MD",
|
|
239
239
|
buttons: [
|
|
240
240
|
{
|
|
241
241
|
name: "cta_copy",
|
|
@@ -264,20 +264,20 @@ await saurus.sendMessage(jid, {
|
|
|
264
264
|
messageParamsJson: JSON.stringify({
|
|
265
265
|
limited_time_offer: {
|
|
266
266
|
text: "idk hummmm?",
|
|
267
|
-
url: "https://
|
|
268
|
-
copy_code: "
|
|
267
|
+
url: "https://saurus.site",
|
|
268
|
+
copy_code: "saurusganteng",
|
|
269
269
|
expiration_time: Date.now() * 999
|
|
270
270
|
},
|
|
271
271
|
bottom_sheet: {
|
|
272
272
|
in_thread_buttons_limit: 2,
|
|
273
273
|
divider_indices: [1, 2, 3, 4, 5, 999],
|
|
274
|
-
list_title: "
|
|
275
|
-
button_title: "
|
|
274
|
+
list_title: "saurusganteng",
|
|
275
|
+
button_title: "saurusganteng"
|
|
276
276
|
},
|
|
277
277
|
tap_target_configuration: {
|
|
278
278
|
title: " X ",
|
|
279
279
|
description: "bomboclard",
|
|
280
|
-
canonical_url: "https://
|
|
280
|
+
canonical_url: "https://saurus.site",
|
|
281
281
|
domain: "shop.example.com",
|
|
282
282
|
button_index: 0
|
|
283
283
|
}
|
|
@@ -401,12 +401,12 @@ await saurus.sendMessage(jid, {
|
|
|
401
401
|
isForwarded: false
|
|
402
402
|
},
|
|
403
403
|
externalAdReply: {
|
|
404
|
-
title: "
|
|
405
|
-
body: "
|
|
404
|
+
title: "saurus MD",
|
|
405
|
+
body: "saurus",
|
|
406
406
|
mediaType: 3,
|
|
407
407
|
thumbnailUrl: "https://example.com/image.jpg",
|
|
408
408
|
mediaUrl: " X ",
|
|
409
|
-
sourceUrl: "https://
|
|
409
|
+
sourceUrl: "https://saurus.site",
|
|
410
410
|
showAdAttribution: true,
|
|
411
411
|
renderLargerThumbnail: false
|
|
412
412
|
},
|
|
@@ -415,8 +415,8 @@ await saurus.sendMessage(jid, {
|
|
|
415
415
|
name: "cta_url",
|
|
416
416
|
buttonParamsJson: JSON.stringify({
|
|
417
417
|
display_text: "Telegram",
|
|
418
|
-
url: "https://
|
|
419
|
-
merchant_url: "https://
|
|
418
|
+
url: "https://saurus.site",
|
|
419
|
+
merchant_url: "https://saurus.site"
|
|
420
420
|
})
|
|
421
421
|
}
|
|
422
422
|
]
|
|
@@ -432,7 +432,7 @@ await saurus.sendMessage(jid, {
|
|
|
432
432
|
interactiveMessage: {
|
|
433
433
|
header: "Hello World",
|
|
434
434
|
title: "Hello World",
|
|
435
|
-
footer: "
|
|
435
|
+
footer: "saurus MD",
|
|
436
436
|
document: fs.readFileSync("./package.json"),
|
|
437
437
|
mimetype: "application/pdf",
|
|
438
438
|
fileName: "saweitt.pdf",
|
|
@@ -442,8 +442,8 @@ await saurus.sendMessage(jid, {
|
|
|
442
442
|
name: "cta_url",
|
|
443
443
|
buttonParamsJson: JSON.stringify({
|
|
444
444
|
display_text: "Telegram",
|
|
445
|
-
url: "https://
|
|
446
|
-
merchant_url: "https://
|
|
445
|
+
url: "https://saurus.site",
|
|
446
|
+
merchant_url: "https://saurus.site"
|
|
447
447
|
})
|
|
448
448
|
}
|
|
449
449
|
]
|
|
@@ -582,31 +582,31 @@ const resized = await saurus.resize(buffer, 200, 200)
|
|
|
582
582
|
Convert media format — supports `jpeg`, `jpg`, `png`, `webp`, `mp3`, `mp4`
|
|
583
583
|
|
|
584
584
|
```javascript
|
|
585
|
-
const mp4 = await
|
|
586
|
-
const webp = await
|
|
587
|
-
const mp3 = await
|
|
585
|
+
const mp4 = await saurus.convert(buffer, { to: "mp4" })
|
|
586
|
+
const webp = await saurus.convert(buffer, { to: "webp" })
|
|
587
|
+
const mp3 = await saurus.convert(buffer, { to: "mp3" })
|
|
588
588
|
```
|
|
589
589
|
---
|
|
590
590
|
### To Sticker
|
|
591
591
|
Convert any image to WhatsApp sticker format (512x512 WebP with transparency)
|
|
592
592
|
|
|
593
593
|
```javascript
|
|
594
|
-
const sticker = await
|
|
595
|
-
const sticker = await
|
|
594
|
+
const sticker = await saurus.toSticker(buffer)
|
|
595
|
+
const sticker = await saurus.toSticker(buffer, { quality: 90 })
|
|
596
596
|
```
|
|
597
597
|
---
|
|
598
598
|
### Compress
|
|
599
599
|
Compress media with quality control — auto-detects image or video
|
|
600
600
|
|
|
601
601
|
```javascript
|
|
602
|
-
const compressed = await
|
|
602
|
+
const compressed = await saurus.compress(buffer, { quality: 50 })
|
|
603
603
|
```
|
|
604
604
|
---
|
|
605
605
|
### Metadata
|
|
606
606
|
Extract media metadata — auto-detects image (sharp) or video/audio (ffprobe)
|
|
607
607
|
|
|
608
608
|
```javascript
|
|
609
|
-
const info = await
|
|
609
|
+
const info = await saurus.metadata(buffer)
|
|
610
610
|
```
|
|
611
611
|
|
|
612
612
|
Result JSON
|
package/lib/index.js
CHANGED
|
@@ -2,23 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
const chalk = require("chalk");
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
⠱⡀⡇⡏⢷⢤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢠⣴⣧⠏
|
|
19
|
-
⠀⠐⣇⡇⣶⢀⠀⠈⣗⠖⡤⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠠⠄⠂⠀⢳⠀⣼⠀
|
|
20
|
-
⠀⠀⠘⢱⡏⠀⣰⠀⡇⠠⣇⠀⡀⠉⣗⣒⡶⠂⠀⡆⠁⠀⠀⠀⢀⠄⠚⠁⡖⣠
|
|
21
|
-
SAURUS`));
|
|
5
|
+
const c1 = "#ff0033"; // merah
|
|
6
|
+
const c2 = "#00ff99"; // hijau
|
|
7
|
+
const c3 = "#6600ff"; // ungu
|
|
8
|
+
|
|
9
|
+
console.log(chalk.hex(c2)(`
|
|
10
|
+
⡆⣐⢕⢕⢕⢕⢕⢕⢕⢕⠅⢗⢕⢕⢕⢕⢕⢕⢕⠕⠕⢕⢕⢕⢕⢕⢕⢕⢕⢕
|
|
11
|
+
⢐⢕⢕⢕⢕⢕⣕⢕⢕⠕⠁⢕⢕⢕⢕⢕⢕⢕⢕⠅${chalk.hex(c1)("⡄")}${chalk.hex(c2)("⢕⢕⢕⢕⢕⢕⢕⢕⢕")}
|
|
12
|
+
⢕⢕⢕⢕⢕⠅⢗⢕⠕${chalk.hex(c1)("⣠⠄")}${chalk.hex(c2)("⣗⢕⢕⠕⢕⢕⢕⠕")}${chalk.hex(c1)("⢠⣿")}${chalk.hex(c2)("⠐⢕⢕⢕⠑⢕⢕⠵⢕")}
|
|
13
|
+
⢕⢕⢕⢕⠁⢜⠕${chalk.hex(c1)("⢁⣴⣿⡇")}${chalk.hex(c2)("⢓⢕⢵⢐⢕⢕⠕")}${chalk.hex(c1)("⢁⣾⢿⣧")}${chalk.hex(c2)("⠑⢕⢕⠄⢑⢕⠅⢕")}
|
|
14
|
+
⢕⢕⠵⢁⠔${chalk.hex(c1)("⢁⣤⣤⣶⣶⣶")}${chalk.hex(c2)("⡐⣕⢽⠐⢕⠕")}${chalk.hex(c1)("⣡⣾⣶⣶⣶⣤")}${chalk.hex(c2)("⡁⢓⢕⠄⢑⢅⢑")}
|
|
15
|
+
⠍⣧⠄${chalk.hex(c1)("⣶⣾⣿⣿⣿⣿⣿⣿⣷")}${chalk.hex(c2)("⣔⢕⢄")}${chalk.hex(c1)("⢡⣾⣿⣿⣿⣿⣿⣿⣿⣦")}${chalk.hex(c2)("⡑⢕⢤⠱⢐")}
|
|
16
|
+
⢠⢕⠅${chalk.hex(c1)("⣾⣿⠋⢿⣿⣿⣿⠉⣿⣿⣷⣦⣶⣽⣿⣿⠈⣿⣿⣿⣿⠏⢹⣷⣷⡅")}${chalk.hex(c2)("⢐")}
|
|
17
|
+
`));
|
|
22
18
|
console.log(chalk.hex("#6f00f")("Baileys modified by: @lordsaurus\n"));
|
|
23
19
|
console.log(chalk.hex("#6f00f")("Terimakasih Sudah Menggunakan Baileys Saya"));
|
|
24
20
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sauruslord-baileys",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "WhatsApp API Modification",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"whatsapp",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"fflate": "^0.8.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@
|
|
60
|
+
"@sauruslord/eslint-config": "^2.0.0",
|
|
61
61
|
"@types/got": "^9.6.11",
|
|
62
62
|
"@types/jest": "^27.5.1",
|
|
63
63
|
"@types/node": "^16.0.0",
|