-
Notifications
You must be signed in to change notification settings - Fork 9
/
faketroli.js
41 lines (39 loc) · 1.58 KB
/
faketroli.js
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
const { MessageType } = require("@adiwajshing/baileys")
let axios = require("axios");
let fs = require("fs");
let handler = async(m, { conn, args, text, usedPrefix: _p }) => {
//if(args.length == 0) return m.reply(`Cara Penggunaan: Reply Foto, Ketik *${_p}faketroli* <TextMessage> | <OrderMessage> | <OrderTitle>\nContoh: *${_p}faketroli* Hai Wibu | ZEROBOT | 10k Bang?`)
let [poop, tytyd] = text.split("|")
if(!poop) return m.reply("Masukkan Teks Utama")
if(!tytyd) tytyd = "MIKEBOT"
//if(!kecil) return m.reply("Masukkan Teks Title Order!")
try{
//let q = m.quoted ? m.quoted : m
//let mime = (q.msg || q).mimetype || ''
// if (!/image\/(jpe?g|png)/.test(mime)) return m.reply("Foto Aja Om :)")
//let img = await q.download()
let img = "./src/mike.jpg"
const xixi = {
key : {
participant : '[email protected]'
},
message: {
orderMessage: {
itemCount : 1,
status: 1,
surface : 1,
message: tytyd,
orderTitle: "MIKEBOT",
thumbnail: fs.readFileSync("./src/mike.jpg"),
sellerJid: '[email protected]'
}
}
}
conn.sendMessage(m.chat, poop, MessageType.extendedText, { quoted: xixi })
}catch (e){
m.reply("```ERROR```")
console.log(e)
}
}
handler.command = /^(troly)$/i
module.exports = handler