File size: 9,671 Bytes
a2b2aac |
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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
import fs from 'fs'
import fetch from 'node-fetch'
import moment from 'moment-timezone'
let handler = m => m
handler.all = async function (m) {
let name = await conn.getName(m.sender)
let pp = 'https://telegra.ph/file/fc5e41b96c7a809b150c1.png'
try {
pp = await this.profilePictureUrl(m.sender, 'image')
} catch (e) {
} finally {
//global.bg = await (await fetch(img)).buffer()
global.doc = pickRandom(["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/msword", "application/pdf"])
// Module
global.fetch = import('node-fetch')
global.bochil = import('@bochilteam/scraper')
const _uptime = process.uptime() * 1000
// Ini untuk command crator/owner
global.kontak2 = [
[owner[0], await this.getName(owner[0] + '@s.whatsapp.net'), 'ᴅᴇᴠᴇʟᴏᴩᴇʀ ʙᴏᴛ', 'no@gmail.com', true],
[owner[1], await this.getName(owner[1] + '@s.whatsapp.net'), 'ᴅᴇᴠᴇʟᴏᴩᴇʀ ʙᴏᴛ', 'rlxfly.uwu@gmail.com', true], // Kalo mau di tambah tinggal copy 1baris ini di tempel di bawahnya trs di edit dikit!
]
// ucapan ini mah
global.ucapan = ucapan()
// pesan sementara
global.ephemeral = null // 86400 = 24jam, kalo ingin di hilangkan ganti '86400' jadi 'null' atau ''
let urls = pickRandom(['https://telegra.ph/file/f72f4916858424fb0adf1.jpg','https://telegra.ph/file/f72f4916858424fb0adf1.jpg'])
// externalAdReply atau text with thumbnail. gatau bahasa Inggris? coba translate!
global.adReply = {
contextInfo: {
forwardingScore: 1,
isForwarded: true, // ini biar ada tulisannya diteruskan berkali-kali, jika ingin di hilangkan ganti true menjadi false
externalAdReply: { // Bagian ini sesuka kalian berkreasi :'v
showAdAttribution: true,
title: "R-BOT CR 2K21",
body: ` ᴹᴬᴰᴱ ᵂᴵᵀᴴ ᴮʸ ᴿᴬᴹᴬ`,
mediaType: 1,
//renderLargerThumbnail : true,
thumbnailUrl: thumbs,
sourceUrl: swb
}
}
}
global.adReplyV2 = {
contextInfo:
{ externalAdReply:
{ showAdAttribution: false,
title: me,
body: conn.user.name,
mediaType: 1,
renderLargerThumbnail : true,
thumbnailUrl: thumbs,
sourceUrl: sgc
}
}
}
global.fakeig = {
contextInfo: { externalAdReply: { showAdAttribution: true,
mediaUrl: "https://Instagram.com/rlxfly.uw",
mediaType: "VIDEO",
description: "https://Instagram.com/rlxfly.uw",
title: 'Simple Bot Esm',
body: me,
thumbnailUrl: pp,
sourceUrl: 'http://s.id/0x404'
}
} }
// Fake
global.ftroli = { key: { remoteJid: 'status@broadcast', participant: '0@s.whatsapp.net' }, message: { orderMessage: { itemCount: 9999999999999999999999999999999999999999999999999999999, status: 1, surface: 1, message: me, orderTitle: me, sellerJid: '0@s.whatsapp.net' } } }
global.fkontak = { key: { fromMe: false, participant: `0@s.whatsapp.net`, ...(m.chat ? { remoteJid: `status@broadcast` } : {}) }, message: { 'contactMessage': { 'displayName': me, 'vcard': `BEGIN:VCARD\nVERSION:3.0\nN:XL;${me},;;;\nFN:${me},\nitem1.TEL;waid=${m.sender.split('@')[0]}:${m.sender.split('@')[0]}\nitem1.X-ABLabell:Ponsel\nEND:VCARD`, 'jpegThumbnail': fs.readFileSync('./me.png'), thumbnail: fs.readFileSync('./me.png'),sendEphemeral: true}}}
global.fvn = {
key: {
fromMe: false,
participant: `0@s.whatsapp.net`, ...(m.chat ?
{ remoteJid: "17608914335-1625305606@g.us" } : {})
},
message: {
"audioMessage": {
"mimetype":"audio/ogg; codecs=opus",
"seconds": "999999999999",
"ptt": "true"
}
}
}
global.ftextt = {
key: {
fromMe: false,
participant: `0@s.whatsapp.net`, ...(m.chat ?
{ remoteJid: "17608914335-1625305606@g.us" } : {})
},
message: {
"extendedTextMessage": {
"text":me,
"title": me,
'jpegThumbnail': fs.readFileSync('./me.png')
}
}
}
global.fliveLoc = {
key:
{ fromMe: false,
participant: `0@s.whatsapp.net`, ...(m.chat ?
{ remoteJid: "status@broadcast" } : {}) },
message: { "liveLocationMessage": { "caption":"Hi","h": `${me}`, 'jpegThumbnail': fs.readFileSync('./me.png')}}
}
global.fliveLoc2 = {
key:
{ fromMe: false,
participant: `0@s.whatsapp.net`, ...(m.chat ?
{ remoteJid: "status@broadcast" } : {}) },
message: { "liveLocationMessage": { "title": "Hi There Im Using GitHub","h": me, 'jpegThumbnail': fs.readFileSync('./me.png')}}
}
global.ftoko = {
key: {
fromMe: false,
participant: `0@s.whatsapp.net`, ...(m.chat ? { remoteJid: "17608914335@s.whatsapp.net" } : {})
},
message: {
"productMessage": {
"product": {
"productImage":{
"mimetype": "image/jpeg",
"jpegThumbnail": fs.readFileSync('./me.png') //Gambarnye
},
"title": me, //Kasih namalu
"description": "Simple Bot Esm",
"currencyCode": "USD",
"priceAmount1000": "20000000",
"retailerId": "Ghost",
"productImageCount": 1
},
"businessOwnerJid": `0@s.whatsapp.net`
}
}
}
global.fdocs = {
key : {
participant : '0@s.whatsapp.net'
},
message: {
documentMessage: {
title: me,
jpegThumbnail: fs.readFileSync('./me.png')
}
}
}
global.fgclink = {
"key": {
"fromMe": false,
"participant": "0@s.whatsapp.net",
"remoteJid": "0@s.whatsapp.net"
},
"message": {
"groupInviteMessage": {
"groupJid": "17608914335-1625305606@g.us",
"inviteCode": "null",
"groupName": "Iyh",
"caption": me,
'jpegThumbnail': fs.readFileSync('./me.png')
}
}
}
global.pee = {
key: {
fromMe: false,
participant: "0@s.whatsapp.net", ...(m.chat ? { remoteJid: "" } : {})
},
'message': {
"stickerMessage": {
"url": "https://mmg.whatsapp.net/d/f/At6EVDFyEc1w_uTN5aOC6eCr-ID6LEkQYNw6btYWG75v.enc",
"fileSha256": "YEkt1kHkOx7vfb57mhnFsiu6ksRDxNzRBAxqZ5O461U=",
"fileEncSha256": "9ryK8ZNEb3k3CXA0X89UjCiaHAoovwYoX7Ml1tzDRl8=",
"mediaKey": "nY85saH7JH45mqINzocyAWSszwHqJFm0M0NvL7eyIDM=",
"mimetype": "image/webp",
"height": 40,
"width": 40,
"directPath": "/v/t62.7118-24/19433981_407048238051891_5533188357877463200_n.enc?ccb=11-4&oh=01_AVwXO525CP-5rmcfl6wgs6x9pkGaO6deOX4l6pmvZBGD-A&oe=62ECA781",
"fileLength": "99999999",
"mediaKeyTimestamp": "16572901099967",
'isAnimated': []
}}}
global.fgif = {
key: {
fromMe: false,
participant: `0@s.whatsapp.net`, ...(m.chat ?
{ remoteJid: "17608914335-1625305606@g.us" } : {})
},
message: {
"videoMessage": {
"title": me,
"h": `Hmm`,
'seconds': '999999999',
'gifPlayback': 'true',
'caption': me,
'jpegThumbnail': fs.readFileSync('./me.png')
}
}
}
//Fakes Random
let fek = [global.ftroli, global.fkontak, global.fvn, global.fvid, global.ftextt, global.fliveLoc, global.fliveLoc2, global.ftoko, global.fdocs, global.fgclink, global.fgif]
//Get Random Fake
global.fake = fek.getRandom()
}
}
export default handler
function ucapan() {
const time = moment.tz('Asia/Jakarta').format('HH')
let res = "Selamat malam 🌙"
if (time >= 4) {
res = "Selamat pagi 🌄"
}
if (time > 10) {
res = "Selamat siang ☀️"
}
if (time >= 15) {
res = "Selamat sore 🌅"
}
if (time >= 18) {
res = "Selamat malam 🌙"
}
return res
}
function pickRandom(list) {
return list[Math.floor(list.length * Math.random())]
} |