@ryuu-reinzz/haruka-lib 1.0.14 → 1.0.15
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 +29 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
# How to use
|
|
10
10
|
``` bash
|
|
11
|
-
npm install @ryuu-reinzz/haruka-lib@1.0.
|
|
11
|
+
npm install @ryuu-reinzz/haruka-lib@1.0.15
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
*how to use it in JavaScript:*
|
|
@@ -38,7 +38,29 @@ const conn = makeWASocket({});
|
|
|
38
38
|
haruka.addProperty(conn, store, smsg, property);
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
## 1. Send
|
|
41
|
+
## 1. Send Button
|
|
42
|
+
*Digunakan untuk mengirim button message ke WhatsApp jika baileys bawaan tidak mendukung*
|
|
43
|
+
|
|
44
|
+
``` javascript
|
|
45
|
+
conn.sendButton(m.chat, {
|
|
46
|
+
caption: "Haruka here!",
|
|
47
|
+
image: { url: global.thumbnail },
|
|
48
|
+
footer: global.ownername,
|
|
49
|
+
buttons: [
|
|
50
|
+
{
|
|
51
|
+
name: "cta_url",
|
|
52
|
+
buttonParamsJson: JSON.stringify({
|
|
53
|
+
display_text: "View Link",
|
|
54
|
+
url: global.thumbnail
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
Hasil Output:
|
|
61
|
+
<img src="https://api.ryuu-dev.offc.my.id/src/assest/Haruhime/sendButton.jpg" width="300" />
|
|
62
|
+
|
|
63
|
+
## 2. Send Order
|
|
42
64
|
*Digunakan untuk membuat tampilan pesanan profesional atau sekedar prank orderan.*
|
|
43
65
|
|
|
44
66
|
``` javascript
|
|
@@ -58,7 +80,7 @@ conn.sendOrder(m.chat, {
|
|
|
58
80
|
Hasil Output:
|
|
59
81
|
<img src="https://api.ryuu-dev.offc.my.id/src/assest/Haruhime/sendOrder.jpg" width="300" />
|
|
60
82
|
|
|
61
|
-
##
|
|
83
|
+
## 3. Send Album
|
|
62
84
|
*Cocok untuk mengirim katalog produk atau galeri foto tanpa memenuhi chat.*
|
|
63
85
|
|
|
64
86
|
``` javascript
|
|
@@ -71,7 +93,7 @@ conn.sendAlbum(m.chat, [
|
|
|
71
93
|
Hasil Output:
|
|
72
94
|
<img src="https://api.ryuu-dev.offc.my.id/src/assest/Haruhime/sendAlbum.jpg" width="300" />
|
|
73
95
|
|
|
74
|
-
##
|
|
96
|
+
## 4. Send Card (Carousel)
|
|
75
97
|
*Fitur tercanggih untuk membuat menu bot yang bisa digeser (slide) ke samping.*
|
|
76
98
|
|
|
77
99
|
``` javascript
|
|
@@ -92,7 +114,7 @@ conn.sendCard(m.chat, {
|
|
|
92
114
|
## Hasil Output:
|
|
93
115
|
<img src="https://api.ryuu-dev.offc.my.id/src/assest/Haruhime/sendCard.jpg" width="300" />
|
|
94
116
|
|
|
95
|
-
##
|
|
117
|
+
## 5. Custom Sticker
|
|
96
118
|
*Buat stiker langsung dengan identitas bot kamu sendiri.*
|
|
97
119
|
|
|
98
120
|
``` javascript
|
|
@@ -105,7 +127,7 @@ conn.sendSticker(m.chat, {
|
|
|
105
127
|
## Hasil Output:
|
|
106
128
|
<img src="https://api.ryuu-dev.offc.my.id/src/assest/Haruhime/sendSticker.jpg" width="200" />
|
|
107
129
|
|
|
108
|
-
##
|
|
130
|
+
## 6. ID Mapping (LID to PN and PN to LID)
|
|
109
131
|
*Mencari LID atau Phone Number*
|
|
110
132
|
|
|
111
133
|
``` javascript
|
|
@@ -116,4 +138,4 @@ await conn.getLidFromPN(m, "6288246552068@s.whatsapp.net");
|
|
|
116
138
|
await conn.getPNFromLid(m, "129459441135829@lid");
|
|
117
139
|
```
|
|
118
140
|
### Hasil Output:
|
|
119
|
-
<img src="https://api.ryuu-dev.offc.my.id/src/assest/Haruhime/mapping.jpg" width="300" />
|
|
141
|
+
<img src="https://api.ryuu-dev.offc.my.id/src/assest/Haruhime/mapping.jpg" width="300" />
|