-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsts.json
61 lines (60 loc) · 1.68 KB
/
sts.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
await tehtarik.relayMessage(msg.key.remoteJid, msg.message, {
messageId: msg.key.id
})
break
}
case 'listpascabayar': {
if (!isRegistered(sender)) return await replyText(alerts.daftar)
let Pascabayar = JSON.parse(fs.readFileSync("./database/kategori/pascabayar.json"))
if (Pascabayar.length === 0) return await replyText("Produk Voucher Masih Kosong!")
let data = []
Object.keys(Voucher).forEach((p) => {
if (Voucher[p].brand) {
let dt = {
title: `📠 | ${Pascabayar[p].nama.toUpperCase()}`,
description: `Menampilkan Daftar Produk ${Pascabayar[p].nama.toUpperCase()}`,
id: `lst ${Pascabayar[p].nama}`
}
data.push(dt)
}
})
let sections = [{
title: "LIST PRODUK PASCABAYAR",
rows: data
}]
let lstt = {
title: "LIST PRODUK PASCABAYAR",
sections
}
let msg = generateWAMessageFromContent(from, {
viewOnceMessage: {
message: {
"messageContextInfo": {
"deviceListMetadata": {},
"deviceListMetadataVersion": 2
},
interactiveMessage: proto.Message.InteractiveMessage.create({
contextInfo: {
mentionedJid: [sender],
isForwarded: false
},
body: proto.Message.InteractiveMessage.Body.create({
text: `*${global.namabot}*
> Klik Tombol Dibawah Ini Untuk Menampikan Daftar Voucher
`
}),
footer: proto.Message.InteractiveMessage.Footer.create({
text: `_*${global.footer.toUpperCase()}*_`
}),
nativeFlowMessage: proto.Message.InteractiveMessage.NativeFlowMessage.create({
buttons: [
{
"name": "single_select",
"buttonParamsJson": JSON.stringify(lstt)
}
]
})
})
}
}
}, {})