· 5 years ago · Nov 16, 2020, 01:48 AM
1const { decryptMedia } = require('@open-wa/wa-decrypt')
2const { RemoveBgResult, removeBackgroundFromImageBase64, removeBackgroundFromImageFile } = require('remove.bg')
3const fs = require('fs-extra')
4const axios = require('axios')
5const nrc = require('node-run-cmd')
6const moment = require('moment-timezone')
7const get = require('got')
8const { exec } = require('child_process')
9const wel = JSON.parse(fs.readFileSync('./lib/welcome.json'))
10const nsfwgrp = JSON.parse(fs.readFileSync('./lib/nsfw.json'))
11const akaneko = require('akaneko')
12const fetch = require('node-fetch')
13const bent = require('bent')
14var request = require('request')
15const si = require('systeminformation');
16const downloader = require('./lib/downloader.js')
17const QrMaker = require('./lib/QrMaker.js')
18const md5 = require('md5')
19const shajs = require('simple-js-sha2-256')
20const ytdl = require('youtube-dl')
21const whois = require('whois-json')
22
23const errorurl = 'https://steamuserimages-a.akamaihd.net/ugc/954087817129084207/5B7E46EE484181A676C02DFCAD48ECB1C74BC423/?imw=512&&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false'
24const errorurl2 = 'https://steamuserimages-a.akamaihd.net/ugc/954087817129084207/5B7E46EE484181A676C02DFCAD48ECB1C74BC423/?imw=512&&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false'
25
26const color = require('./lib/color')
27const { doing } = require('./lib/translate.js')
28const { translate } = require('./lib')
29
30const msgFilter = require('./lib/msgFilter')
31const { quotemaker, wall, costom } = require('./lib/functions')
32const { help, info, infopremium, menupremium, menugrup } = require('./lib/help')
33const ban = JSON.parse(fs.readFileSync('./lib/banned.json'))
34
35const feature = require('./lib/poll');
36
37const yt = require('./lib/yt')
38const sendSticker = require('./lib/sendSticker')
39
40// API KEY
41const api_itech = 'nLnj3A-c9o74T-Z1BL83-yx6qJN-fCnfDg'
42const apiKey2 = 'zFuV88pxcIiCWuYlwg57'
43
44function sleep(ms) {
45 return new Promise(resolve => setTimeout(resolve, ms));
46}
47
48module.exports = msgHandler = async (client, message) => {
49 try {
50 const { type, id, from, t, sender, isGroupMsg, chat, chatId, caption, isMedia, mimetype, quotedMsg, mentionedJidList, author, quotedMsgObj } = message
51 let { body } = message
52 const { name } = chat
53 let { pushname, verifiedName } = sender
54 const prefix = '!'
55 body = (type === 'chat' && body.startsWith(prefix)) ? body : ((type === 'image' && caption || type === 'video' && caption) && caption.startsWith(prefix)) ? caption : ''
56 const command = body.slice(prefix.length).trim().split(/ +/).shift().toLowerCase()
57 const args = body.slice(prefix.length).trim().split(/ +/).slice(1)
58 const isCmd = body.startsWith(prefix)
59
60 const time = moment(t * 1000).format('DD/MM HH:mm:ss')
61
62 if (isCmd && msgFilter.isFiltered(from) && !isGroupMsg) return console.log(color('[SPAM!]', 'red'), color(time, 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname))
63 if (isCmd && msgFilter.isFiltered(from) && isGroupMsg) return console.log(color('[SPAM!]', 'red'), color(time, 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname), 'in', color(name))
64 if (!isCmd && !isGroupMsg) return console.log('[RECV]', color(time, 'yellow'), 'Message from', color(pushname))
65 if (!isCmd && isGroupMsg) return console.log('[RECV]', color(time, 'yellow'), 'Message from', color(pushname), 'in', color(name))
66 if (isCmd && !isGroupMsg) console.log(color('[EXEC]'), color(time, 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname))
67
68 if (isCmd && isGroupMsg) console.log(color('[EXEC]'), color(time, 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname), 'in', color(name))
69 const botNumber = await client.getHostNumber()
70 const groupId = isGroupMsg ? chat.groupMetadata.id : ''
71 const groupAdmins = isGroupMsg ? await client.getGroupAdmins(groupId) : ''
72 const isGroupAdmins = isGroupMsg ? groupAdmins.includes(sender.id) : false
73 const isBotGroupAdmins = isGroupMsg ? groupAdmins.includes(botNumber + '@c.us') : false
74 const isBanned = ban.includes(chatId)
75 const botadmins = ['6289515746253@c.us', '6281563825390@c.us'] //add the number of people that you want to the be bot admins
76 const isbotadmin = botadmins.includes(sender.id)
77 const memberPremium = JSON.parse(fs.readFileSync('./lib/memberPremium.json'))
78 const isMemberPremium = memberPremium.includes(sender.id)
79 const isnsfw = nsfwgrp.includes(chat.id)
80 const isQuotedImage = quotedMsg && quotedMsg.type === 'image'
81 global.pollfile = 'poll_Config_'+chat.id+'.json'
82 global.voterslistfile = 'poll_voters_Config_'+chat.id+'.json'
83
84
85 msgFilter.addFilter(from)
86
87 const uaOverride = 'WhatsApp/2.2029.4 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36'
88 const isUrl = new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/gi)
89 if (!isBanned) {
90 switch (command) {
91 case 'sticker':
92 case 'stiker':
93 if (isMedia) {
94 if (type == 'video') {
95 if (message.duration < 15) {
96 sendSticker.sendAnimatedSticker(message)
97 } else {
98 await client.reply(from, 'Maaf, format video belum didukung untuk dijadikan stiker!', id)
99 }
100 } else if (type == 'image') {
101 const mediaData = await decryptMedia(message)
102 const imageBase64 = `data:${mimetype};base64,${mediaData.toString('base64')}`
103 const baseImg = imageBase64.replace('video/mp4','image/gif')
104 await client.sendImageAsSticker(from, baseImg)
105 }
106 } else if (quotedMsg && quotedMsg.type == 'image') {
107 const mediaData = await decryptMedia(quotedMsg)
108 const imageBase64 = `data:${quotedMsg.mimetype};base64,${mediaData.toString('base64')}`
109 await client.sendImageAsSticker(from, imageBase64)
110 } else if (quotedMsg && quotedMsg.type == 'video') {
111 if (message.duration < 15) {
112 sendSticker.sendAnimatedSticker(message)
113 } else {
114 await client.reply(from, 'File yang diberikan terlalu besar untuk diproses!', id)
115 }
116 } else {
117 client.reply(from, 'Silahkan reply image dengan !stiker. Atau kirimkan foto dgn caption !stiker', message.id)
118 }
119 break
120 break
121 case 'donate':
122 case 'donasi':
123 client.sendLinkWithAutoPreview(from, 'https://saweria.co/donate/bangnopal', '\nDonasi dari kalian akan digunakan kembali untuk menyewa server tiap bulannya :)')
124 break
125 case 'saran':
126 const laporan = body.slice(7)
127 if (args.length == 0) return client.reply(from, 'Untuk melaporkan, memberikan saran & kritik, ketikan !saran <laporan/saranmu>', message.id)
128 client.sendText('6289515746253@c.us', `*[+]--- SARAN & LAPORAN ---[+]*\n\n_Laporan baru di Turu Bot_\n\nLaporan: *${laporan}*\n\nPengirim: ${sender.id}`, message.id).then(() => {
129 client.reply(from, 'Saran & Laporan anda berhasil dikirimkan! Terimakasih atas dukungannya ?', message.id)
130 })
131 break
132 case 'cekstatus':
133 const no_member = body.slice(11)
134 if (args.length == 0) return client.reply(from, 'Mohon isikan nomor yang ingin di cek')
135 if (isMemberPremium) {
136 client.reply(from, `*[?]---- CEK STATUS ----[?]*\n\nNomor WA: *${no_member}*\nStatus: *Premium*\n\n_Biaya upgrade Member Premium adalah 5k, dan berlaku untuk SELAMANYA_`, message.id)
137 }
138 if (!isMemberPremium) {
139 client.reply(from, `*[?]---- CEK STATUS ----[?]*\n\nNomor WA: *${no_member}*\nStatus: *Free*\n\n_Biaya upgrade Member Premium adalah 5k, dan berlaku untuk SELAMANYA_`, message.id)
140 }
141 break
142 case 'infopremium':
143 client.reply(from, infopremium.replace(undefined, pushname), message.id)
144 break
145 case 'menupremium':
146 client.reply(from, menupremium, message.id)
147 break
148 case 'ytdl':
149 if (!isMemberPremium) return client.reply(from, 'Maaf sob, fitur ini hanya tersedia khusus untuk member premium. Info selengkapnya ketik !infopremium', message.id)
150 const ytdl_url = body.slice(6)
151 if (args.length == 0) return client.reply(from, 'Untuk menggunakan fitur ini, ketikan !ytdl <link video ytb>. Contoh: !ytdl https://youtu.be/ThiCMd5kGbE', message.id)
152 await client.reply(from, '_Permintaan anda sedang diproses. Ditunggu aja gan ?_', message.id)
153 ytdl.getInfo(ytdl_url, function(err, info) {
154 if (err) throw err
155 client.sendFileFromUrl(from, info.url, 'YTDownloader.mp4', `*[?]-- TURU DOWNLOADER --[?]*\n\n*Judul:* ${info.title}\n\n*Description:* ${info.description}`, message.id)
156 })
157 break
158 case 's':
159 if (!isMemberPremium) return client.reply(from,)
160 const kata_talk = body.slice(3)
161 if (args.length == 0) return client.reply(from, 'Untuk menggunakan fitur chat simi-simi, ketikan !s <kata>. Contoh: !s Halo simi, apa kabar?', message.id)
162 const simi = await axios.get(`https://st4rz.herokuapp.com/api/simsimi?kata=${kata_talk}`)
163 if (simi.data.result != null) {
164 client.reply(from, simi.data.result, message.id)
165 } else if (simi.data.result == null) {
166 return client.reply(from, 'Maaf sob, fitur ini sudah mencapai batasnya saat ini. Max 500x perhari. Silahkan gunakan fitur lainnya ?')
167 }
168 break
169 case 'fml':
170 const fml = await axios.get(`https://api.i-tech.id/tools/fml?key=${api_itech}`)
171 client.reply(from, fml.data.result, message.id)
172 break
173 case 'fakta':
174 const fakta = await axios.get(`https://api.i-tech.id/tools/fakta?key=${api_itech}`)
175 client.reply(from, fakta.data.result, message.id)
176 break
177 case 'sha256':
178 const str_query_sha256 = body.slice(8)
179 if (args.length == 0) return client.reply(from, 'Ketikan !sha256 <query>. Contoh: !sha256 naufal', message.id)
180 const sha256 = await shajs(str_query_sha256)
181 client.reply(from, `*[+]-- TURU SHA256 ENCODER --[+]*\n\nString: *${str_query_sha256}*\nMD5 Encode:\n*${sha256}*`)
182 break
183 case 'md5':
184 const str_query = body.slice(5)
185 if (args.length == 0) return client.reply(from, 'Ketik !md5 <string>. Contoh: !md5 admin', message.id)
186 const md5_x = await md5(str_query)
187 client.reply(from, `*[+]-- TURU MD5 ENCODER --[+]*\n\nString: *${str_query}*\nMD5 Encode:\n*${md5_x}*`)
188 break
189 case 'brainly':
190 const query_brainly = body.slice(9)
191 if (args.length == 0) return client.reply(from, 'Ketik !brainly <pertanyaan>. Contoh: !brainly presiden pertama indonesia', message.id)
192 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
193 const search_brainly = await brainly(query_brainly)
194 if (search_brainly.success == true) {
195 client.reply(from, `*[+]-- TURU BRAINLY SCRAPER --[+]*\n\n\n*Pertanyaan:* ${query_brainly}}\n\n*Result 1:* ${search_brainly.data[0].pertanyaan}\n\n*Jawaban 1:* ${search_brainly.data[0].jawaban[0].text}`, message.id)
196 } else if (search_brainly.success == false) {
197 return client.reply(from, 'Maaf, tidak ada yang mau menjawab pertanyaan anda! AWOKAWOKAOWK :V', message.id)
198 }
199 break
200 case 'tiny':
201 const long_link = body.slice(6)
202 if (args.length == 0) return client.reply(from, 'Ketik !tiny <url>. Contoh: !tiny https://naufalhoster.xyz', message.id)
203 const tinyshort = await axios.get(`https://tinyurl.com/api-create.php?url=${long_link}`)
204 if (tinyshort.data == Error) return client.reply(from, 'Maaf, link yang kamu berikan tidak valid!', message.id)
205 client.reply(from, `*[+]-- TURU URL SHORTENER --[+]*\n\nNih gan url pendeknya -> ${tinyshort.data} ?`, message.id)
206 break
207 case 'bitly':
208 const link_panjang = body.slice(7)
209 if (args.length == 0) return client.reply(from, 'Ketik !short <link yang mau di short>. Contoh: !bitly https://naufalhoster.xyz', message.id)
210 const shorten = await axios.get(`https://api.i-tech.id/tools/shorturl?key=${api_itech}&link=${link_panjang}`)
211 if (shorten.data.code == "404") return client.reply(from, 'Maaf, link yang anda berikan tidak valid!', message.id)
212 client.reply(from, `*[+]-- TURU URL SHORTENER --[+]*\n\nNih gan url pendeknya -> ${shorten.data.result} ?`, message.id)
213 break
214 case 'quotemaker':
215 arg = body.trim().split('|')
216 if (arg.length >= 3) {
217 client.reply(from, 'Processing...', message.id)
218 const quotes = arg[1]
219 const author = arg[2]
220 const theme = arg[3]
221 try {
222 const resolt = await quotemaker(quotes, author, theme)
223 client.sendFile(from, resolt, 'quotesmaker.jpg','...')
224 } catch {
225 client.reply(from, 'Maaf, file tidak dapat diproses. Terjadi kegagalan dalam sistem!', message.id)
226 }
227 } else {
228 client.reply(from, 'Cara pakai: \n!quotemaker | quote | author', message.id)
229 }
230 break
231 case 'translate':
232 arg = body.trim().split(' ')
233 if (arg.length != 2) return client.reply(from, 'Wrong Format!', id)
234 if (!quotedMsg) return client.reply(from, 'Wrong Format!', id)
235 const quoteText = quotedMsg.type == 'chat' ? quotedMsg.body : quotedMsg.type == 'image' ? quotedMsg.caption : ''
236 translate(quoteText, arg[1])
237 .then((result) => client.sendText(from, result))
238 .catch(() => client.sendText(from, 'Maaf, kode bahasa yang anda masukan salah!'))
239 break
240 case 'rloli':
241 await client.reply(from, `_Permintaan anda sedang diproses. Ditunggu aja gan ?_`, message.id)
242 const rloli = await axios.get('https://st4rz.herokuapp.com/api/randomloli')
243 client.sendFileFromUrl(from, rloli.data.result, 'RandomLoli.jpg', '', message.id)
244 break
245 case 'tts':
246 var withOption = quotedMsg ? quotedMsgObj.body : args.splice(1).join(' ')
247 var tts = require('node-gtts')(args[0])
248 tts.save(process.cwd() + '/media/tts.ogg', withOption, async () => {
249 client.sendPtt(from, './media/tts.ogg', null)
250 })
251 break
252 case 'jadwaltv':
253 const channel = body.slice(11)
254 if (args.length == 0) return client.reply(from, 'Ketik !jadwaltv <channel>. Contoh: !jadwaltv RCTI', message.id)
255 const jadwalchannel = await axios.get(`https://api.haipbis.xyz/jadwaltv/${channel}`)
256 client.reply(from, jadwalchannel.data, message.id)
257 break
258 case 'waifu':
259 const waifu = await axios.get('https://st4rz.herokuapp.com/api/waifu')
260 client.sendFileFromUrl(from, waifu.data.image, 'Waifu.jpg', `Name : ${waifu.data.name}\nDescription : ${waifu.data.desc}\n\nSource : ${waifu.data.source}`, id)
261 break
262 case 'qr':
263 const str_qr = body.slice(5)
264 if (args.length == 0) return client.reply(from, 'Ketik !qr <query>/<url>. Contoh: !qr nopal ganteng', message.id)
265 QrMaker(str_qr)
266 .then(data => {
267 client.sendImage(from, data, 'qr.jpg', 'Nih gan QR Code nya ?', message.id)
268 })
269 .catch(err => {
270 console.log(err)
271 })
272 break
273 case 'cuaca':
274 const kota = body.slice(7)
275 if (args.length == 0) return client.reply(from, 'Ketik !cuaca <kota>. Contoh: !cuaca Tangerang')
276 const cuaca_url = await axios.get(`https://api.i-tech.id/tools/cuaca?key=${api_itech}&kota=${kota}`)
277 client.reply(from, `Kota: ${cuaca_url.data.tempat}\nCuaca: ${cuaca_url.data.cuaca}\nSuhu: ${cuaca_url.data.suhu}\nKelembapan: ${cuaca_url.data.kelembapan}\nKecepatan Angin: ${cuaca_url.data.angin}\nDeskripsi: ${cuaca_url.data.deskripsi}`, message.id)
278 break
279 case 'nfilm':
280 if (!isMemberPremium) return client.reply(from, 'Maaf sob, fitur ini hanya tersedia khusus member premium. Info member premium ketik !infopremium', message.id)
281 await client.reply(from, '_Permintaan anda sedang diproses. Ditunggu aja gan ?_', message.id)
282 const next_film = await axios.get('https://api.haipbis.xyz/cinema21/comingsoon')
283 const film = next_film.data
284 client.sendFileFromUrl(from, film[0].poster, 'Poster.jpg', `*Judul:* ${film[0].title}\n*Distributor:* ${film[0].distributor}\n*Genre:* ${film[0].genre}\n*Dimensi:* ${film[0].dimensi}\n*Rating:* ${film[0].rating}\n*Sinopsis:* ${film[0].sinopsis}\n\n*Producer:* ${film[0].producer}\n*Direktur:* ${film[0].director}\n*Penulis:* ${film[0].writer}\n*Cast:* ${film[0].casts}`, message.id)
285 client.sendFileFromUrl(from, film[1].poster, 'Poster.jpg', `*Judul:* ${film[1].title}\n*Distributor:* ${film[1].distributor}\n*Genre:* ${film[1].genre}\n*Dimensi:* ${film[1].dimensi}\n*Rating:* ${film[1].rating}\n*Sinopsis:* ${film[1].sinopsis}\n\n*Producer:* ${film[1].producer}\n*Direktur:* ${film[1].director}\n*Penulis:* ${film[1].writer}\n*Cast:* ${film[1].casts}`, message.id)
286 break
287 case 'randomhentai':
288 client.reply(from, 'Maaf, fitur tsb sedang dalam maintenance', message.id)
289 break
290 case 'nsfw':
291 client.reply(from, 'Maaf, fitur tsb sedang dalam maintenance', message.id)
292 break
293 case 'tulis':
294 const txt_tulisan = body.slice(7)
295 if (args.length == 0) return client.reply(from, 'Ketik !tulis <text>. Contoh: !tulis Nopal Ganteng', message.id)
296 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
297 const tulis = await axios.get(`http://salism3.pythonanywhere.com/write?text=${txt_tulisan}`)
298 client.sendFileFromUrl(from, tulis.data.images[0], 'Tulisan.jpg', 'Nih gan tulisannya ?', message.id)
299 break
300 case 'lirik':
301 const liriklagu = body.slice(7)
302 if (args.length == 0) return client.reply(from, 'Ketik !lirik <judul lagu>. Contoh: !lirik Celengan Rindu', message.id)
303 const lirik = await axios.get(`https://api.i-tech.id/tools/lirik?key=${api_itech}&query=${liriklagu}`)
304 client.reply(from, lirik.data.result, message.id)
305 break
306 case 'chord':
307 const judul = body.slice(7)
308 if (args.length == 0) return client.reply(from, 'Ketik !chord <judul lagu>. Contoh !chord Celengan Rindu', message.id)
309 const chord = await axios.get(`https://api.i-tech.id/tools/chord?key=${api_itech}&query=${judul}`)
310 if (chord.data.result != null) {
311 client.reply(from, chord.data.result, message.id)
312 } else if (chord.data.result == null) {
313 return client.reply(from, 'Maaf, chord lagu yang kamu minta tidak dapat ditemukan! Coba gunakan kata kunci yang lain', message.id)
314 }
315 break
316 case 'igstalk':
317 const username_ig = body.slice(9)
318 if (args.length == 0) return client.reply(from, 'Ketik !igstalk <username ig>. Contoh !igstalk naufal_al.fattah', message.id)
319 const ig_stalk = await axios.get(`https://st4rz.herokuapp.com/api/stalk?username=${username_ig}`)
320 await client.reply(from, '_Permintaan anda sedang diproses. Ditunggu aja gan ?_', message.id)
321 if (ig_stalk.data.status == 200) {
322 client.sendFileFromUrl(from, ig_stalk.data.Profile_pic, 'IGProfile.jpg', `*[+]-- INSTAGRAM STALKER --[+]*\n\n*Username:* ${username_ig}\n*FullName:* ${ig_stalk.data.Name}\n*Followers:* ${ig_stalk.data.Jumlah_Followers}\n*Following:* ${ig_stalk.data.Jumlah_Following}\n*Total Post:* ${ig_stalk.data.Jumlah_Post}\n*Bio:* ${ig_stalk.data.Biodata}`)
323 } else if (ig_stalk.data.status == false) {
324 client.sendFile(from, './media/images/ig_404.jpg', '404.jpg', 'Maaf, username yang kamu cari tidak dapat ditemukan!', message.id)
325 }
326 break
327 case 'igdl':
328 if (args.length == 0) return client.reply(from, 'Ketik !igdl <link post ig>', message.id)
329 const link_ig = body.slice(6)
330 const ig_valid = link_ig.match(/(https:\/\/www.instagram.com)/gi)
331 if (!ig_valid) return client.sendImage(from, './media/images/404.jpg', '404.jpeg', 'Maaf link yang kamu berikan tidak valid !', message.id)
332 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
333 const get_post_ig = await axios.get(`https://api.i-tech.id/dl/igdl?key=${api_itech}&link=${link_ig}`)
334 if (get_post_ig.data.code == "404") await client.sendImage(from, './media/images/404.jpg', '404.jpg', 'Maaf, link yang kamu berikan tidak dapat ditemukan [404]', message.id)
335 if (get_post_ig.data.result[0].type == "image") {
336 await client.sendFileFromUrl(from, get_post_ig.data.result[0].url, 'IGdownloader.jpg', 'Nih gan fotonya ?', message.id)
337 } else if (get_post_ig.data.result[0].type == "video") {
338 await client.sendFileFromUrl(from, get_post_ig.data.result[0].url, 'IGDownloader.mp4', 'Nih gan videonya ?', message.id)
339 }
340 break
341 case 'jadwaltvnow':
342 const jadwaltv = await axios.get('https://api.haipbis.xyz/jadwaltvnow')
343 client.reply(from, jadwaltv.data.jadwalTV, message.id)
344 break
345 case 'wiki':
346 const wiki_query = body.slice(6)
347 if (args.length == 0) return client.reply(from, 'Ketik !wiki <query>. Contoh: !wiki whatsapp', message.id)
348 const wiki = await axios.get(`https://st4rz.herokuapp.com/api/wiki?q=${wiki_query}`)
349 if (wiki.data.status == 200) {
350 client.reply(from, wiki.data.result, message.id1)
351 } else {
352 return client.reply(from, 'Maaf, query yang anda cari tidak dapat ditemukan di WikiPedia!', message.id)
353 }
354 break
355 case 'ssweb':
356 const link_ss = body.slice(7)
357 if (args.length == 0) return client.reply(from, 'Ketik !ssweb <link>. Contoh !ssweb google.com', message.id)
358 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
359 const ssweb = await axios.get(`https://screenshotapi.net/api/v1/screenshot?token=IKIVN67SKQPRW7NDBOHKUC0MBQETJ8HH&url=${link_ss}&fresh=true`)
360 client.sendFileFromUrl(from, ssweb.data.screenshot, 'ScreenshotWebsite.jpg', 'Nih gan screenshotnya', message.id)
361 break
362 case 'artinama':
363 const nama_lengkap = body.slice(10)
364 if (args.length == 0) return client.reply(from, 'Ketik !artinama <nama lengkap>. Contoh: !artinama Muhammad Naufal Al Fattah', message.id)
365 const arti = await axios.get(`https://api.i-tech.id/tools/arti?key=${api_itech}&nama=${nama_lengkap}`)
366 client.reply(from, `Nama: *${nama_lengkap}*\n\nArti Nama: ${arti.data.arti}`, message.id)
367 break
368 case 'fbmp4':
369 if(!isMemberPremium) return client.reply(from, 'Maaf gan, fitur ini khusus bagi Member Premium! Upgrade ke member premium seharga 5k sekarang juga!', message.id)
370 const link_fb = body.slice(7)
371 const fb_valid = link_fb.match(/(https:\/\/www.facebook.com)/gi)
372 if (args.length == 0) return client.reply(from, 'Ketik !fbmp4 <link>. Contoh !fbmp4 https://www.facebook.com/EpochTimesTrending/videos/310155606660409, kemudian tunggu sekitar 30 detik (paling lama)', message.id)
373 if (!fb_valid) return client.reply(from, 'Maaf, link yang kamu berikan tidak valid!', message.id)
374 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
375 const fbmp4 = await axios.get(`https://api.i-tech.id/dl/fb?key=${api_itech}&link=${link_fb}`)
376 if (fbmp4.data.code == "404") return client.sendFile(from, './media/images/404.jpg', '404.jpg', 'Maaf, url yang kamu berikan tidak dapat ditemukan! Code: [404]', message.id)
377 client.sendFileFromUrl(from, fbmp4.data.link, 'FacebookDownloader.mp4', `${fbmp4.data.title}`, message.id)
378 break
379 case 'ytmp4':
380 if (args.length == 0) return client.reply(from, 'Ketik !ytmp4 <link yt>. Contoh: !ytmp4 https://www.youtube.com/watch?v=rz-NuNWxHck', message.id)
381 const link_yt = body.slice(7)
382 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
383 const ytmp4 = await axios.get(`https://api.i-tech.id/dl/yt?key=${api_itech}&link=${link_yt}`)
384 if (ytmp4.data.code == "200") {
385 client.sendFileFromUrl(from, ytmp4.data.url_video, 'YtDownloader.mp4', `*Judul:* ${ytmp4.data.title}\n\n*Durasi:* ${ytmp4.data.duration}`, message.id)
386 } else if (ytmp4.data.code = "404") {
387 client.sendFile(from, './media/images/404.jpg', '404.jpg', 'Maaf url yang kamu berikan tidak dapat ditemukan!', message.id)
388 }
389 break
390 case 'js':
391 const zona_kota = body.slice(4)
392 if (args.length == 0) return client.reply(from, 'Ketik !js <kota>. Contoh: !js Tangerang', message.id)
393 const js = await axios.get(`https://api.i-tech.id/tools/sholat?key=${api_itech}&kota=${zona_kota}`)
394 client.reply(from, `Kota: ${js.data.kota}\n\nTerbit: ${js.data.terbit}\nImsak: ${js.data.imsak}\nSubuh: ${js.data.subuh}\nDhuha: ${js.data.dhuha}\nDzuhur: ${js.data.dzuhur}\nAshar: ${js.data.ashar}\nMaghrib: ${js.data.maghrib}\nIsya: ${js.data.isya}\n\nCatatan: ${js.data.note}`, message.id)
395 break
396 case 'botstatus':
397 case 'botstat':
398 case 'botstats':
399 const loadedMsg = await client.getAmountOfLoadedMessages()
400 const chatIds = await client.getAllChatIds()
401 const groups = await client.getAllGroups()
402 const battery = await client.getBatteryLevel()
403 const plugged = await client.getIsPlugged()
404 const info_cpu = await si.cpu()
405 const info_os = await si.osInfo()
406 const info_uptime = await si.time()
407 const info_currentLoad = await si.currentLoad()
408 const info_currentLoad2 = info_currentLoad.currentload
409 const info_currentCpu = info_currentLoad2.toFixed(2)
410 const info_disk = await si.mem()
411 const disk_fixed = info_disk.used * 0.000000001
412 const disk_control = disk_fixed.toFixed(2)
413 client.reply(from, `*[+]-- STATUS TURU BOT --[+}*\n\n- *Total Chats:* ${loadedMsg} pesan\n- *Total Groups:* ${groups.length}\n- *Personal Chats:* ${chatIds.length - groups.length}\n- *Total Chats:* ${chatIds.length}\n- *Battery:* ${battery}%\n- *Status Mengisi Daya:* ${plugged}\n\n*[+]-- SISTEM INFORMATION --[+]*\n\n*Uptime:* ${info_uptime.uptime} Seconds\n*Load System:* ${info_currentCpu}%\n*Ram Usage:* ${disk_control} GB\n*Max Network Speed:* 10 Gbps\n*OS System:* ${info_os.distro}\n*Processor:* ${info_cpu.manufacturer} ${info_cpu.brand}\n*Total Core:* ${info_cpu.cores} core\n*Max CPU Speed:* ${info_cpu.speedmax} GHz`, message.id)
414 break
415 case 'tulis2':
416 if (!isMemberPremium) return client.reply(from, 'Maaf sob, fitur ini hanya tersedia untuk member premium. Info selengkapnya ketik !infopremium', message.id)
417 const text_tulis = body.slice(8)
418 if (args.length == 0) return client.reply(from, 'Untuk menggunakan fitur ini, ketikan !tulis2 <text>. Contoh: !tulis2 nopal ganteng')
419 await client.reply(from, '_Permintaan anda sedang diproses. Ditunggu aja gan ?_', message.id)
420 const nulis2 = await axios.get(`https://mhankbarbar.herokuapp.com/nulis?text=${text_tulis}&apiKey=${apiKey2}`)
421 client.sendFileFromUrl(from, nulis2.data.result, 'Tulisan2.jpg', 'Nih gan tulisannya ?', message.id)
422 break
423 case 'twtstalk':
424 if (!isMemberPremium) return client.reply(from, 'Maaf sob, fitur ini hanya tersedia khusus untuk member premium. Info selengkapnya ketik !infopremium', message.id)
425 const username_twt = body.slice(10)
426 if (args.length == 0) return client.reply(from, 'Untuk menggunakan fitur ini, ketikan !twtstalk <username twitter>. Contoh: !twtstalk cnnindonesia', message.id)
427 await client.reply(from, '_Permintaan anda sedang diproses. Ditunggu aja gan ?_', message.id)
428 const twt_stalker = await axios.get(`https://mhankbarbar.herokuapp.com/api/twstalk?username=${username_twt}&apiKey=${apiKey2}`)
429 if (twt_stalker.data.status == 200) {
430 client.sendFileFromUrl(from, twt_stalker.data.profile_pic, 'TwitterStalker.jpg', `*[+]-- TWITTER STALKER --[+]*\n\n*Name:* ${twt_stalker.data.full_name}\n*Username:* @${twt_stalker.data.name}\n*User ID:* ${twt_stalker.data.id}\n*Followers:* ${twt_stalker.data.followers_count}\n*Total Status:* ${twt_stalker.data.status_count}`, message.id)
431 } else if (twt_stalker.data.status == false) {
432 client.sendFile(from, './media/images/twt_404.png', '404.png', 'Maaf, username yang kamu cari tidak dapat ditemukan!', message.id)
433 }
434 break
435 case 'ptl1':
436 var items = ["ullzang girl", "cewe cantik", "russian girl", "asian girl", "hijab cantik", "korean girl"];
437 var cewe = items[Math.floor(Math.random() * items.length)];
438 var url_ptl1 = "https://api.fdci.se/rep.php?gambar=" + cewe;
439 axios.get(url_ptl1).then((result) => {
440 var b_ptl1 = JSON.parse(JSON.stringify(result.data));
441 var cewek = b_ptl1[Math.floor(Math.random() * b_ptl1.length)];
442 client.sendFileFromUrl(from, cewek, 'ptl1.jpg', '', message.id)
443 })
444 break
445 case 'randomhentai2':
446 client.reply(from, 'Maaf, fitur tsb sedang dalam maintenance', message.id)
447 break
448 case 'randomanime':
449 const api_anime = await axios.get(`https://api.i-tech.id/anim/anime?key=${api_itech}`)
450 await client.sendFileFromUrl(from, api_anime.data.result, 'randomanime.jpg', '', message.id)
451 break
452 case 'pantun':
453 const pantun_pakboy = await axios.get(`https://api.i-tech.id/tools/pantun?key=${api_itech}`)
454 client.reply(from, pantun_pakboy.data.result, message.id)
455 break
456 case 'quotes':
457 const quotes_url = await axios.get('https://api.terhambar.com/qts/')
458 client.reply(from, quotes_url.data.quotes, message.id)
459 break
460 case 'husbando':
461 const diti = fs.readFileSync('./lib/husbu.json')
462 const ditiJsin = JSON.parse(diti)
463 const rindIndix = Math.floor(Math.random() * ditiJsin.length)
464 const rindKiy = ditiJsin[rindIndix]
465 client.sendFileFromUrl(from, rindKiy.image, 'Husbando.jpg', rindKiy.teks, id)
466 break
467 case 'ttp':
468 const ttp_text = body.slice(5)
469 if (args.length == 0) return client.reply(from, 'Untuk menggunakan fitur ini, silahkan ketikan !ttp <text>. Contoh: !ttp Turu Bot')
470 const ttp_maker = await axios.get(`https://st4rz.herokuapp.com/api/ttp?kata=${ttp_text}`)
471 client.sendImageAsSticker(from, ttp_maker.data.result)
472 break
473 case 'infogempa':
474 await client.reply(from, '_Mengambil data terbaru. Mohon menunggu.....?_', message.id)
475 const infogempa = await axios.get('https://st4rz.herokuapp.com/api/infogempa')
476 const gempa = infogempa.data
477 client.sendFileFromUrl(from, gempa.map, 'Gempa.jpg', `*[+]-- INFO GEMPA --[+]*\n\n*Waktu:* ${gempa.waktu}\n*Lokasi:* ${gempa.lokasi}\n*Koordinat:* ${gempa.koordinat}\n*Magnitudo:* ${gempa.magnitude}\n*Kedalaman:* ${gempa.kedalaman}\n*Potensi:* ${gempa.potensi}`)
478 break
479 case 'list':
480 const kal = new Date()
481 const arrhari = ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]
482 const arrbulan = ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]
483 const hari = kal.getDay()
484 const tanggal = kal.getDate()
485 const bulan = kal.getMonth()
486 const tahun = kal.getFullYear()
487 const data_siswa = fs.readFileSync('./lib/absensi.txt')
488 client.reply(from, `*[+]-- DATA ABSENSI SISWA --[+]*\nTanggal: ${arrhari[hari]} ${tanggal}, ${arrbulan[bulan]} ${tahun}\n${data_siswa}`, message.id)
489 break
490 case 'absen':
491 const nama_siswa = body.slice(7)
492 if (args.length == 0) return client.reply(from, 'Mohon masukan nama siswa!', message.id)
493 fs.appendFile('./lib/absensi.txt', `\n${nama_siswa}`)
494 client.reply(from, 'Sukses, kamu berhasil absen hari ini ?', message.id)
495 break
496 case 'resetlist':
497 if (!isbotadmin) return client.reply(from, 'Maaf, fitur tersebut hanya dapat diakses oleh orang-orang tertentu saja [403]', message.id)
498 fs.writeFileSync('./lib/absensi.txt', '')
499 await client.reply(from, 'Sukses, list absensi siswa berhasil direset ?', message.id)
500 break
501 case 'broadcast':
502 if (!isMemberPremium) return client.reply(from, 'Maaf gan, fitur ini khusus bagi Member Premium! Upgrade ke member premium seharga 5k sekarang juga!', message.id)
503 let msg = body.slice(11)
504 const chatz = await client.getAllChatIds()
505 for (let ids of chatz) {
506 var cvk = await client.getChatById(ids)
507 if (!cvk.isReadOnly) client.sendText(ids, `*[+]-- BROADCAST --[+]*\n${msg}`)
508 }
509 client.reply(from, 'Broadcast Success!', message.id)
510 break
511 case 'adzan':
512 if (args.length == 0) return client.reply(from, 'Mohon masukan nama sholat. contoh: Subuh', message.id)
513 const js_sholat = body.slice(7)
514 if (!isbotadmin) return client.reply(from, '403!', message.id)
515 const chats = await client.getAllChatIds()
516 for (let chataz of chats) {
517 var cvg = await client.getChatById(chataz)
518 if (!cvg.isReadOnly) {
519 if (js_sholat == 'Subuh') {
520 client.sendImage(chataz, './media/images/adzan.jpg', 'adzan.jpg', `Saatnya Adzan *${js_sholat}* untuk wilayah Jakarta dan sekitarnya`)
521 client.sendPtt(chataz, './media/AdzanSubuh.mp3')
522 console.log('ADZAN SUSKSES [SUBUH]')
523 } else {
524 client.sendImage(chataz, './media/images/adzan.jpg', 'adzan.jpg', `Saatnya Adzan *${js_sholat}* untuk wilayah Jakarta dan sekitarnya`, message.id)
525 client.sendPtt(chataz, './media/Adzan.mp3')
526 console.log(`ADZAN SUKSES [${js_sholat}]`)
527 }
528 }
529 }
530 client.reply(from, 'Adzan sukses!', message.id)
531 break
532 case 'user':
533 if (!isMemberPremium) return
534 const username = body.slice(6)
535 const result = await axios.get(`https://api.jikan.moe/v3/user/${username}`)
536 const jikan = result.data
537
538var Data = `?️ Username: ${jikan.username}
539
540?️ User ID: ${jikan.user_id}
541
542❤️ Gender: ${jikan.gender}
543
544?️ Location: ${jikan.location}
545
546?️ Joined: ${jikan.joined}
547
548⭐️ Anime Stats ⭐️
549
550Days Watched: ${jikan.anime_stats.days_watched}
551
552Mean Score: ${jikan.anime_stats.mean_score}
553
554Currently Watching: ${jikan.anime_stats.watching}
555
556Completed: ${jikan.anime_stats.completed}
557
558On Hold: ${jikan.anime_stats.on_hold}
559
560Dropped: ${jikan.anime_stats.dropped}
561
562Plan to Watch: ${jikan.anime_stats.plan_to_watch}
563
564?️ Manga Stats ?️
565
566Days Read: ${jikan.manga_stats.days_read}
567
568Mean Score: ${jikan.manga_stats.mean_score}
569
570Currently Reading: ${jikan.manga_stats.reading}
571
572Completed: ${jikan.manga_stats.completed}
573
574On Hold: ${jikan.manga_stats.on_hold}
575
576Dropped: ${jikan.manga_stats.dropped}
577
578Plan to Read: ${jikan.manga_stats.plan_to_read}`
579 await client.sendFileFromUrl(from, `${jikan.image_url}`,`user.png`, Data)
580 break
581 case 'ban':
582 if(!isbotadmin) return client.reply(from, 'Hanya admin dan owner bot yang dapat menggunakan fitur in!', message.id)
583 for (let i = 0; i < mentionedJidList.length; i++) {
584 ban.push(mentionedJidList[i])
585 fs.writeFileSync('./lib/banned.json', JSON.stringify(ban))
586 client.reply(from, 'Target berhasil dibanned!', message.id)
587 }
588 break
589 case 'covid':
590 arg = body.trim().split(' ')
591 console.log(...arg[1])
592 var slicedArgs = Array.prototype.slice.call(arg, 1);
593 console.log(slicedArgs)
594 const country = await slicedArgs.join(' ')
595 console.log(country)
596 const response2 = await axios.get('https://coronavirus-19-api.herokuapp.com/countries/' + country + '/')
597 const { cases, todayCases, deaths, todayDeaths, active } = response2.data
598 await client.sendText(from, '?️Covid Info -' + country + ' ?️\n\n✨️Total Kasus: ' + `${cases}` + '\n?️Kasus Hari Ini: ' + `${todayCases}` + '\n☣️Total Meninggal: ' + `${deaths}` + '\n☢️Meninggal Hari Ini: ' + `${todayDeaths}` + '\n⛩️Kasus Aktif: ' + `${active}` + '.')
599 break
600 case 'getall':
601 if (!isGroupMsg) return client.reply(from, 'Maaf sob, fitur ini hanya dapat digunakan di dalam grup!', message.id)
602 const groupMem = await client.getGroupMembers(groupId)
603 let hehe = `${body.slice(6)} - ${pushname} \n`
604 for (let i = 0; i < groupMem.length; i++) {
605 hehe += '✨️'
606 hehe += ` @${groupMem[i].id.replace(/@c.us/g, '')}\n`
607 }
608 hehe += '----------------------'
609 await client.sendTextWithMentions(from, hehe)
610 break
611 case 'act':
612 arg = body.trim().split(' ')
613 if (!isbotadmin) return client.reply(from, 'Maaf, hanya admin bot yang dapat menggunakan fitur ini!', id)
614 if (arg[1] == 'welcome') {
615 wel.push(chat.id)
616 fs.writeFileSync('./lib/welcome.json', JSON.stringify(wel))
617 client.reply(from, `Welcome sekarang diaktifkan di grup *${name}*`, message.id)
618 } else if (arg[1] == 'nsfw') {
619 nsfwgrp.push(chat.id)
620 fs.writeFileSync('./lib/nsfw.json', JSON.stringify(nsfwgrp))
621 client.reply(from, `NSFW sekarang diaktifkan di grup *${name}*`, message.id)
622 }
623 break
624 case 'deact':
625 arg = body.trim().split(' ')
626 if (!isbotadmin) return client.reply(from, 'Maaf, hanya admin grup yang dapat menggunakan fitur tersebut!', id)
627 if (arg[1] == 'welcome') {
628 let inx = ban.indexOf(from)
629 wel.splice(inx, 1)
630 fs.writeFileSync('./lib/welcome.json', JSON.stringify(wel))
631 client.reply(from, `Welcome sudah dinonaktifkan di grup *${name}*`, message.id)
632 } else if (arg[1] == 'nsfw') {
633 let inx = ban.indexOf(from)
634 nsfwgrp.splice(inx, 1)
635 fs.writeFileSync('./lib/nsfw.json', JSON.stringify(nsfwgrp))
636 client.reply(from, `NSFW sudah dinonaktifkan di grup *${name}*`, message.id)
637 }
638 break
639 case 'kickall':
640 const isGroupOwner = sender.id === chat.groupMetadata.owner
641 if(!isGroupOwner) return client.reply(from, 'Maaf, hanya owner grup yang dapat menggunakan fitur ini!', message.id)
642 if (!isGroupMsg) return client.reply(from, 'Maaf, fitur tersebut hanya dapat digunakan di dalam grup!', message.id)
643 if(!isBotGroupAdmins) return client.reply(from, 'Bot harus dijadikan admin untuk menggunakan ditur ini!', message.id)
644 const allMem = await client.getGroupMembers(from)
645 console.log(isGroupAdmins)
646 for (let i = 0; i < allMem.length; i++) {
647 if (groupAdmins.includes(allMem[i].id)) return
648 await client.removeParticipant(groupId, allMem[i].id)
649 }
650 client.reply(from, 'Done!', message.id)
651 break
652 case 'clearall':
653 if (!isbotadmin) return client.reply(from, 'Owner bot only', message.id)
654 const allChatz = await client.getAllChats()
655 for (let dchat of allChatz) {
656 await client.deleteChat(dchat.id)
657 }
658 client.reply(from, 'Done', message.id)
659 break
660 case 'unban':
661 if(!isbotadmin) return client.reply(from, 'Hanya admin dan owner bot yang dapat menggunakan fitur ini!', message.id)
662 let inx = ban.indexOf(mentionedJidList[0])
663 ban.splice(inx, 1)
664 fs.writeFileSync('./lib/banned.json', JSON.stringify(ban))
665 client.reply(from, 'Target berhasil diuunbanned!', message.id)
666 break
667 case 'kick':
668 if(!isGroupMsg) return client.reply(from, '...', message.id)
669 if(!isGroupAdmins) return client.reply(from, 'Maaf, hanya admin grup yang dapat menggunakan fitur ini!', message.id)
670 if(!isBotGroupAdmins) return client.reply(from, 'Bot harus dijadikan admin untuk menggunakan fitur ini!', message.id)
671 if(mentionedJidList.length === 0) return client.reply(from, 'Wrong format', message.id)
672 await client.sendText(from, `Request Accepted! issued:\n${mentionedJidList.join('\n')}`)
673 for (let i = 0; i < mentionedJidList.length; i++) {
674 if (groupAdmins.includes(mentionedJidList[i])) return await client.reply(from, '....', message.id)
675 await client.removeParticipant(groupId, mentionedJidList[i])
676 }
677 break
678 case 'add':
679 const no_calon = body.slice(5)
680 if (!isGroupMsg) return client.reply(from, 'Maaf sob, fitur ini hanya dapat digunakan di dalam grup!', message.id)
681 if (!isBotGroupAdmins) return client.reply(from,'Maaf sob, bot perlu dijadikan admin grup untuk menjalankan fitu in!', message.id)
682 if (!isGroupAdmins) return client.reply(from, 'Maaf sob, hanya admin grup yang dapat menggunakan fitur ini!', message.id)
683 if (args.length == 0) return client.reply(from, 'Format nomor harus 62xxxx!', message.id)
684 await client.reply(from, 'Sukses gan, user tersebut berhasil dimasukan kedalam grup!', message.id)
685 client.addParticipant(groupId, `${no_calon}@c.us`)
686 break
687 case 'delete':
688 if (!quotedMsg) return client.reply(from, 'Wrong Format!', id)
689 if (!quotedMsgObj.fromMe) return client.reply(from, 'Wrong Format!', id)
690 client.deleteMessage(quotedMsgObj.chatId, quotedMsgObj.id, false)
691 break
692 case 'leave':
693 if(!isGroupMsg) return client.reply(from, '...', message.id)
694 if(!isGroupAdmins) return client.reply(from, 'Maaf, hanya admin grup yang dapat menggunakan fitur ini!', message.id)
695 await client.sendText(from,'Sayonara').then(() => client.leaveGroup(groupId))
696 break
697 case 'promote':
698 if(!isGroupMsg) return client.reply(from, '.', message.id)
699 if(!isGroupAdmins) return client.reply(from, 'Maaf, hanya admin grup yang dapat menggunakan fitur ini!', message.id)
700 if(!isBotGroupAdmins) return client.reply(from, 'Bot harus dijadikan admin untuk menggunakan fitur ini sob!', message.id)
701 if (mentionedJidList.length === 0) return await client.reply(from, 'Wrong format!', message.id)
702 if (mentionedJidList.length >= 2) return await client.reply(from, 'One user at a time', message.id)
703 if (groupAdmins.includes(mentionedJidList[0])) return await client.reply(from, 'User ini memang sudah menjadi admin', message.id)
704 await client.promoteParticipant(groupId, mentionedJidList[0])
705 await client.sendTextWithMentions(from, `@${mentionedJidList[0].replace('@c.us', '')} sekarang admin`)
706 break
707 case 'demote':
708 if(!isGroupAdmins) return client.reply(from, 'Maaf, hanya admin grup yang dapat menggunakan fitur ini!', message.id)
709 if(!isBotGroupAdmins) return client.reply(from, 'Bot harus dijadikan admin untuk menggunakan fitur ini sob!', message.id)
710 if (mentionedJidList.length === 0) return client.reply(from, 'Wrong Format', message.id)
711 if (mentionedJidList.length >= 2) return await client.reply(from, 'One user at a time', message.id)
712 if (!groupAdmins.includes(mentionedJidList[0])) return await client.reply(from, 'User ini memang bukan admin', message.id)
713 await client.demoteParticipant(groupId, mentionedJidList[0])
714 await client.sendTextWithMentions(from, `Maaf, @${mentionedJidList[0].replace('@c.us', '')} anda sekarang bukan admin lagi AWOAKAOWKAWOK :V`)
715 break
716 case 'botjoin':
717 if (!isMemberPremium) return client.reply(from, 'Maaf sob, fitur ini hanya tersedia khusus untuk member premium. Info selengkapnya ketik !infopremium', message.id)
718 if (args.length == 0) return client.reply(from, 'Wrong Format', message.id)
719 const link_invite = body.slice(6)
720 const minMem = 5
721 const isLink = link_invite.match(/(https:\/\/chat.whatsapp.com)/gi)
722 const check = await client.inviteInfo(link_invite)
723 if (!isLink) return client.reply(from, 'mana linknya anjirr?', message.id)
724 if (check.size < minMem) return client.reply(from, 'Minimal member grup adalah 5 orang!', message.id)
725 await client.joinGroupViaLink(link_invite).then( async () => {
726 await client.reply(from, '*Sukses gan* ✨️', message.id)
727 }).catch(error => {
728 client.reply(from, 'An error occured ?️', message.id)
729 })
730 break
731 case 'groupinfo' :
732 if (!isGroupMsg) return client.reply(from, '.', message.id)
733 var totalMem = chat.groupMetadata.participants.length
734 var desc = chat.groupMetadata.desc
735 var groupname = name
736 var welgrp = wel.includes(chat.id)
737 var ngrp = nsfwgrp.includes(chat.id)
738 var grouppic = await client.getProfilePicFromServer(chat.id)
739 if (grouppic == undefined) {
740 var pfp = errorurl
741 } else {
742 var pfp = grouppic
743 }
744 await client.sendFileFromUrl(from, pfp, 'group.png', `
745*[+]-- GROUP INFO --[+]*
746
747*Nama Grup: ${groupname}*
748
749*Total Anggota: ${totalMem} Users*
750
751*Deskripsi Grup*
752
753${desc}`)
754 break
755 case 'sauce':
756 if (!isMemberPremium) return
757 if (isMedia) {
758 const mediaData = await decryptMedia(message)
759 const imageBase64 = `data:${mimetype};base64,${mediaData.toString('base64')}`
760 try {
761 const raw = await fetch("https://trace.moe/api/search", {
762 method: "POST",
763 body: JSON.stringify({ image: imageBase64 }),
764 headers: { "Content-Type": "application/json" }
765 })
766 const parsedResult = await raw.json()
767 const { anime, episode, title_english } = parsedResult.docs[0]
768 const content = `*Anime Found!* \n⛩️ *Japanese Title:* ${anime} \n✨️ *English Title:* ${title_english} \n?️ *Source Episode:* ${episode} `
769 await client.sendImage(from, imageBase64, 'sauce.png', content, id)
770 console.log("Sent!")
771 } catch (err) {
772 await client.sendFileFromUrl(from, errorurl, 'error.png', '?️ An Error Occured', id)
773 }
774 } else if (quotedMsg && quotedMsg.type == 'image') {
775 const mediaData = await decryptMedia(quotedMsg)
776 const imageBase64 = `data:${quotedMsg.mimetype};base64,${mediaData.toString('base64')}`
777 try {
778 const raw = await fetch("https://trace.moe/api/search", {
779 method: "POST",
780 body: JSON.stringify({ image: imageBase64 }),
781 headers: { "Content-Type": "application/json" }
782 })
783 const parsedResult = await raw.json()
784 const { anime, episode, title_english } = parsedResult.docs[0]
785 const content = `*Anime Found!* \n⛩️ *Japanese Title:* ${anime} \n✨️ *English Title: ${title_english} \n?️ *Source Episode:* ${episode} `
786 await client.sendImage(from, imageBase64, 'sauce.png', content, id)
787 console.log("Sent!")
788 } catch (err) {
789 throw new Error(err.message)
790 await client.sendFileFromUrl(from, errorurl, 'error.png', '?️ An Error Occured', id)
791 }
792 }
793 break
794 case 'sr':
795 if (!isMemberPremium) return
796 arg = body.trim().split(' ')
797 const sr = arg[1]
798 try {
799 const response1 = await axios.get('https://meme-api.herokuapp.com/gimme/' + sr + '/');
800 const {
801 postLink,
802 title,
803 subreddit,
804 url,
805 nsfw,
806 spoiler
807 } = response1.data
808
809
810
811 if (nsfw == true) {
812 if ((isGroupMsg) && (isnsfw)) {
813 await client.sendFileFromUrl(from, `${url}`, 'Reddit.jpg', `${title}` + '\n\nPostlink:' + `${postLink}`)
814 } else if ((isGroupMsg) && (!isnsfw)) {
815 await client.reply(from, `NSFW belum diaktifkan di grup *${name}*`, id)
816 }
817 } else {
818 await client.sendFileFromUrl(from, `${url}`, 'Reddit.jpg', `${title}` + '\n\nPostlink:' + `${postLink}`)
819 }
820 } catch(err) {
821 await client.reply(from, 'There is no such subreddit, Baka!', id)
822 }
823 break
824 case 'cgc':
825 arg = body.trim().split(' ')
826 const gcname = arg[1]
827 client.createGroup(gcname, mentionedJidList)
828 client.sendText(from, 'Group Created ✨️')
829 break
830 case 'anime':
831 const keyword = message.body.replace('#anime', '')
832 try {
833 const data = await fetch(
834 `https://api.jikan.moe/v3/search/anime?q=${keyword}`
835 )
836 const parsed = await data.json()
837 if (!parsed) {
838 await client.sendFile(from, './lib/media/images/404.jpeg', '404.jpeg', 'Maaf, anime yang kamu cari tidak dapat ditemukan', message.id)
839 return null
840 }
841 const { title, synopsis, episodes, url, rated, score, image_url } = parsed.results[0]
842 const content = `*Anime Found!*
843✨️ *Title:* ${title}
844
845?️ *Episodes:* ${episodes}
846
847?️ *Rating:* ${rated}
848
849❤️ *Score:* ${score}
850
851?️ *Synopsis:* ${synopsis}
852
853?️ *URL*: ${url}`
854
855 const image = await bent("buffer")(image_url)
856 const base64 = `data:image/jpg;base64,${image.toString("base64")}`
857 client.sendImage(from, base64, title, content)
858 } catch (err) {
859 console.error(err.message)
860 await client.sendFile(from, './lib/media/images/404.jpeg', '404.jpeg', 'Maaf, anime yang kamu cari tidak dapat ditemukan', message.id)
861 }
862 break
863 case 'animeneko':
864 client.sendFileFromUrl(from, akaneko.neko(), 'neko.jpg', 'Neko *Nyaa*~')
865 break
866 case 'doggo':
867 const list = ["https://cdn.shibe.online/shibes/247d0ac978c9de9d9b66d72dbdc65f2dac64781d.jpg","https://cdn.shibe.online/shibes/1cf322acb7d74308995b04ea5eae7b520e0eae76.jpg","https://cdn.shibe.online/shibes/1ce955c3e49ae437dab68c09cf45297d68773adf.jpg","https://cdn.shibe.online/shibes/ec02bee661a797518d37098ab9ad0c02da0b05c3.jpg","https://cdn.shibe.online/shibes/1e6102253b51fbc116b887e3d3cde7b5c5083542.jpg","https://cdn.shibe.online/shibes/f0c07a7205d95577861eee382b4c8899ac620351.jpg","https://cdn.shibe.online/shibes/3eaf3b7427e2d375f09fc883f94fa8a6d4178a0a.jpg","https://cdn.shibe.online/shibes/c8b9fcfde23aee8d179c4c6f34d34fa41dfaffbf.jpg","https://cdn.shibe.online/shibes/55f298bc16017ed0aeae952031f0972b31c959cb.jpg","https://cdn.shibe.online/shibes/2d5dfe2b0170d5de6c8bc8a24b8ad72449fbf6f6.jpg","https://cdn.shibe.online/shibes/e9437de45e7cddd7d6c13299255e06f0f1d40918.jpg","https://cdn.shibe.online/shibes/6c32141a0d5d089971d99e51fd74207ff10751e7.jpg","https://cdn.shibe.online/shibes/028056c9f23ff40bc749a95cc7da7a4bb734e908.jpg","https://cdn.shibe.online/shibes/4fb0c8b74dbc7653e75ec1da597f0e7ac95fe788.jpg","https://cdn.shibe.online/shibes/125563d2ab4e520aaf27214483e765db9147dcb3.jpg","https://cdn.shibe.online/shibes/ea5258fad62cebe1fedcd8ec95776d6a9447698c.jpg","https://cdn.shibe.online/shibes/5ef2c83c2917e2f944910cb4a9a9b441d135f875.jpg","https://cdn.shibe.online/shibes/6d124364f02944300ae4f927b181733390edf64e.jpg","https://cdn.shibe.online/shibes/92213f0c406787acd4be252edb5e27c7e4f7a430.jpg","https://cdn.shibe.online/shibes/40fda0fd3d329be0d92dd7e436faa80db13c5017.jpg","https://cdn.shibe.online/shibes/e5c085fc427528fee7d4c3935ff4cd79af834a82.jpg","https://cdn.shibe.online/shibes/f83fa32c0da893163321b5cccab024172ddbade1.jpg","https://cdn.shibe.online/shibes/4aa2459b7f411919bf8df1991fa114e47b802957.jpg","https://cdn.shibe.online/shibes/2ef54e174f13e6aa21bb8be3c7aec2fdac6a442f.jpg","https://cdn.shibe.online/shibes/fa97547e670f23440608f333f8ec382a75ba5d94.jpg","https://cdn.shibe.online/shibes/fb1b7150ed8eb4ffa3b0e61ba47546dd6ee7d0dc.jpg","https://cdn.shibe.online/shibes/abf9fb41d914140a75d8bf8e05e4049e0a966c68.jpg","https://cdn.shibe.online/shibes/f63e3abe54c71cc0d0c567ebe8bce198589ae145.jpg","https://cdn.shibe.online/shibes/4c27b7b2395a5d051b00691cc4195ef286abf9e1.jpg","https://cdn.shibe.online/shibes/00df02e302eac0676bb03f41f4adf2b32418bac8.jpg","https://cdn.shibe.online/shibes/4deaac9baec39e8a93889a84257338ebb89eca50.jpg","https://cdn.shibe.online/shibes/199f8513d34901b0b20a33758e6ee2d768634ebb.jpg","https://cdn.shibe.online/shibes/f3efbf7a77e5797a72997869e8e2eaa9efcdceb5.jpg","https://cdn.shibe.online/shibes/39a20ccc9cdc17ea27f08643b019734453016e68.jpg","https://cdn.shibe.online/shibes/e67dea458b62cf3daa4b1e2b53a25405760af478.jpg","https://cdn.shibe.online/shibes/0a892f6554c18c8bcdab4ef7adec1387c76c6812.jpg","https://cdn.shibe.online/shibes/1b479987674c9b503f32e96e3a6aeca350a07ade.jpg","https://cdn.shibe.online/shibes/0c80fc00d82e09d593669d7cce9e273024ba7db9.jpg","https://cdn.shibe.online/shibes/bbc066183e87457b3143f71121fc9eebc40bf054.jpg","https://cdn.shibe.online/shibes/0932bf77f115057c7308ef70c3de1de7f8e7c646.jpg","https://cdn.shibe.online/shibes/9c87e6bb0f3dc938ce4c453eee176f24636440e0.jpg","https://cdn.shibe.online/shibes/0af1bcb0b13edf5e9b773e34e54dfceec8fa5849.jpg","https://cdn.shibe.online/shibes/32cf3f6eac4673d2e00f7360753c3f48ed53c650.jpg","https://cdn.shibe.online/shibes/af94d8eeb0f06a0fa06f090f404e3bbe86967949.jpg","https://cdn.shibe.online/shibes/4b55e826553b173c04c6f17aca8b0d2042d309fb.jpg","https://cdn.shibe.online/shibes/a0e53593393b6c724956f9abe0abb112f7506b7b.jpg","https://cdn.shibe.online/shibes/7eba25846f69b01ec04de1cae9fed4b45c203e87.jpg","https://cdn.shibe.online/shibes/fec6620d74bcb17b210e2cedca72547a332030d0.jpg","https://cdn.shibe.online/shibes/26cf6be03456a2609963d8fcf52cc3746fcb222c.jpg","https://cdn.shibe.online/shibes/c41b5da03ad74b08b7919afc6caf2dd345b3e591.jpg","https://cdn.shibe.online/shibes/7a9997f817ccdabac11d1f51fac563242658d654.jpg","https://cdn.shibe.online/shibes/7221241bad7da783c3c4d84cfedbeb21b9e4deea.jpg","https://cdn.shibe.online/shibes/283829584e6425421059c57d001c91b9dc86f33b.jpg","https://cdn.shibe.online/shibes/5145c9d3c3603c9e626585cce8cffdfcac081b31.jpg","https://cdn.shibe.online/shibes/b359c891e39994af83cf45738b28e499cb8ffe74.jpg","https://cdn.shibe.online/shibes/0b77f74a5d9afaa4b5094b28a6f3ee60efcb3874.jpg","https://cdn.shibe.online/shibes/adccfdf7d4d3332186c62ed8eb254a49b889c6f9.jpg","https://cdn.shibe.online/shibes/3aac69180f777512d5dabd33b09f531b7a845331.jpg","https://cdn.shibe.online/shibes/1d25e4f592db83039585fa480676687861498db8.jpg","https://cdn.shibe.online/shibes/d8349a2436420cf5a89a0010e91bf8dfbdd9d1cc.jpg","https://cdn.shibe.online/shibes/eb465ef1906dccd215e7a243b146c19e1af66c67.jpg","https://cdn.shibe.online/shibes/3d14e3c32863195869e7a8ba22229f457780008b.jpg","https://cdn.shibe.online/shibes/79cedc1a08302056f9819f39dcdf8eb4209551a3.jpg","https://cdn.shibe.online/shibes/4440aa827f88c04baa9c946f72fc688a34173581.jpg","https://cdn.shibe.online/shibes/94ea4a2d4b9cb852e9c1ff599f6a4acfa41a0c55.jpg","https://cdn.shibe.online/shibes/f4478196e441aef0ada61bbebe96ac9a573b2e5d.jpg","https://cdn.shibe.online/shibes/96d4db7c073526a35c626fc7518800586fd4ce67.jpg","https://cdn.shibe.online/shibes/196f3ed10ee98557328c7b5db98ac4a539224927.jpg","https://cdn.shibe.online/shibes/d12b07349029ca015d555849bcbd564d8b69fdbf.jpg","https://cdn.shibe.online/shibes/80fba84353000476400a9849da045611a590c79f.jpg","https://cdn.shibe.online/shibes/94cb90933e179375608c5c58b3d8658ef136ad3c.jpg","https://cdn.shibe.online/shibes/8447e67b5d622ef0593485316b0c87940a0ef435.jpg","https://cdn.shibe.online/shibes/c39a1d83ad44d2427fc8090298c1062d1d849f7e.jpg","https://cdn.shibe.online/shibes/6f38b9b5b8dbf187f6e3313d6e7583ec3b942472.jpg","https://cdn.shibe.online/shibes/81a2cbb9a91c6b1d55dcc702cd3f9cfd9a111cae.jpg","https://cdn.shibe.online/shibes/f1f6ed56c814bd939645138b8e195ff392dfd799.jpg","https://cdn.shibe.online/shibes/204a4c43cfad1cdc1b76cccb4b9a6dcb4a5246d8.jpg","https://cdn.shibe.online/shibes/9f34919b6154a88afc7d001c9d5f79b2e465806f.jpg","https://cdn.shibe.online/shibes/6f556a64a4885186331747c432c4ef4820620d14.jpg","https://cdn.shibe.online/shibes/bbd18ae7aaf976f745bc3dff46b49641313c26a9.jpg","https://cdn.shibe.online/shibes/6a2b286a28183267fca2200d7c677eba73b1217d.jpg","https://cdn.shibe.online/shibes/06767701966ed64fa7eff2d8d9e018e9f10487ee.jpg","https://cdn.shibe.online/shibes/7aafa4880b15b8f75d916b31485458b4a8d96815.jpg","https://cdn.shibe.online/shibes/b501169755bcf5c1eca874ab116a2802b6e51a2e.jpg","https://cdn.shibe.online/shibes/a8989bad101f35cf94213f17968c33c3031c16fc.jpg","https://cdn.shibe.online/shibes/f5d78feb3baa0835056f15ff9ced8e3c32bb07e8.jpg","https://cdn.shibe.online/shibes/75db0c76e86fbcf81d3946104c619a7950e62783.jpg","https://cdn.shibe.online/shibes/8ac387d1b252595bbd0723a1995f17405386b794.jpg","https://cdn.shibe.online/shibes/4379491ef4662faa178f791cc592b52653fb24b3.jpg","https://cdn.shibe.online/shibes/4caeee5f80add8c3db9990663a356e4eec12fc0a.jpg","https://cdn.shibe.online/shibes/99ef30ea8bb6064129da36e5673649e957cc76c0.jpg","https://cdn.shibe.online/shibes/aeac6a5b0a07a00fba0ba953af27734d2361fc10.jpg","https://cdn.shibe.online/shibes/9a217cfa377cc50dd8465d251731be05559b2142.jpg","https://cdn.shibe.online/shibes/65f6047d8e1d247af353532db018b08a928fd62a.jpg","https://cdn.shibe.online/shibes/fcead395cbf330b02978f9463ac125074ac87ab4.jpg","https://cdn.shibe.online/shibes/79451dc808a3a73f99c339f485c2bde833380af0.jpg","https://cdn.shibe.online/shibes/bedf90869797983017f764165a5d97a630b7054b.jpg","https://cdn.shibe.online/shibes/dd20e5801badd797513729a3645c502ae4629247.jpg","https://cdn.shibe.online/shibes/88361ee50b544cb1623cb259bcf07b9850183e65.jpg","https://cdn.shibe.online/shibes/0ebcfd98e8aa61c048968cb37f66a2b5d9d54d4b.jpg"]
868 let kya = list[Math.floor(Math.random() * list.length)]
869 client.sendFileFromUrl(from, kya, 'Dog.jpeg', 'Doggo ✨️', id)
870 break
871 case 'neko':
872 q2 = Math.floor(Math.random() * 900) + 300;
873 q3 = Math.floor(Math.random() * 900) + 300;
874 client.sendFileFromUrl(from, 'http://placekitten.com/'+q3+'/'+q2, 'neko.png','Neko ?️', id)
875 break
876 case 'roll':
877 const dice = Math.floor(Math.random() * 6) + 1
878 await client.sendStickerfromUrl(from, 'https://www.random.org/dice/dice' + dice + '.png')
879 break
880 case 'flip':
881 const side = Math.floor(Math.random() * 2) + 1
882 if (side == 1) {
883 client.sendStickerfromUrl(from, 'https://i.ibb.co/LJjkVK5/heads.png')
884 } else {
885 client.sendStickerfromUrl(from, 'https://i.ibb.co/wNnZ4QD/tails.png')
886 }
887 break
888 case 'ship':
889 arg = body.trim().split(' ')
890 const per = Math.floor(Math.random() * 100)
891
892if (per < 25) {
893var sentence = `${per}% Worse than average ♦️`
894} else if (per < 50) {
895var sentence = `${per}% I don't know how i feel about it ❇️`
896} else if (per < 75) {
897var sentence = `${per}% Good, I guess... ⭐️`
898} else if (per < 90) {
899var sentence = `${per}% Sugoii! Go for it!?️`
900} else {
901var sentence = `${per}% Incredible! You two will be an amazing couple ?️`
902}
903
904var shiptext = `❣️ *Matchmaking...*
905
906---------------------------------
907 *${arg[1]} x ${arg[2]}*
908---------------------------------
909
910${sentence}`
911 await client.sendTextWithMentions(from, shiptext)
912 break
913 case 'pokemon':
914 q7 = Math.floor(Math.random() * 890) + 1;
915 client.sendFileFromUrl(from, 'https://assets.pokemon.com/assets/cms2/img/pokedex/full/'+q7+'.png','Pokemon.png','.', id)
916 break
917 case 'rpaper' :
918 const walnime = ['https://cdn.nekos.life/wallpaper/QwGLg4oFkfY.png','https://cdn.nekos.life/wallpaper/bUzSjcYxZxQ.jpg','https://cdn.nekos.life/wallpaper/j49zxzaUcjQ.jpg','https://cdn.nekos.life/wallpaper/YLTH5KuvGX8.png','https://cdn.nekos.life/wallpaper/Xi6Edg133m8.jpg','https://cdn.nekos.life/wallpaper/qvahUaFIgUY.png','https://cdn.nekos.life/wallpaper/leC8q3u8BSk.jpg','https://cdn.nekos.life/wallpaper/tSUw8s04Zy0.jpg','https://cdn.nekos.life/wallpaper/sqsj3sS6EJE.png','https://cdn.nekos.life/wallpaper/HmjdX_s4PU4.png','https://cdn.nekos.life/wallpaper/Oe2lKgLqEXY.jpg','https://cdn.nekos.life/wallpaper/GTwbUYI-xTc.jpg','https://cdn.nekos.life/wallpaper/nn_nA8wTeP0.png','https://cdn.nekos.life/wallpaper/Q63o6v-UUa8.png','https://cdn.nekos.life/wallpaper/ZXLFm05K16Q.jpg','https://cdn.nekos.life/wallpaper/cwl_1tuUPuQ.png','https://cdn.nekos.life/wallpaper/wWhtfdbfAgM.jpg','https://cdn.nekos.life/wallpaper/3pj0Xy84cPg.jpg','https://cdn.nekos.life/wallpaper/sBoo8_j3fkI.jpg','https://cdn.nekos.life/wallpaper/gCUl_TVizsY.png','https://cdn.nekos.life/wallpaper/LmTi1k9REW8.jpg','https://cdn.nekos.life/wallpaper/sbq_4WW2PUM.jpg','https://cdn.nekos.life/wallpaper/QOSUXEbzDQA.png','https://cdn.nekos.life/wallpaper/khaqGIHsiqk.jpg','https://cdn.nekos.life/wallpaper/iFtEXugqQgA.png','https://cdn.nekos.life/wallpaper/deFKIDdRe1I.jpg','https://cdn.nekos.life/wallpaper/OHZVtvDm0gk.jpg','https://cdn.nekos.life/wallpaper/YZYa00Hp2mk.jpg','https://cdn.nekos.life/wallpaper/R8nPIKQKo9g.png','https://cdn.nekos.life/wallpaper/_brn3qpRBEE.jpg','https://cdn.nekos.life/wallpaper/ADTEQdaHhFI.png','https://cdn.nekos.life/wallpaper/MGvWl6om-Fw.jpg','https://cdn.nekos.life/wallpaper/YGmpjZW3AoQ.jpg','https://cdn.nekos.life/wallpaper/hNCgoY-mQPI.jpg','https://cdn.nekos.life/wallpaper/3db40hylKs8.png','https://cdn.nekos.life/wallpaper/iQ2FSo5nCF8.jpg','https://cdn.nekos.life/wallpaper/meaSEfeq9QM.png','https://cdn.nekos.life/wallpaper/CmEmn79xnZU.jpg','https://cdn.nekos.life/wallpaper/MAL18nB-yBI.jpg','https://cdn.nekos.life/wallpaper/FUuBi2xODuI.jpg','https://cdn.nekos.life/wallpaper/ez-vNNuk6Ck.jpg','https://cdn.nekos.life/wallpaper/K4-z0Bc0Vpc.jpg','https://cdn.nekos.life/wallpaper/Y4JMbswrNg8.jpg','https://cdn.nekos.life/wallpaper/ffbPXIxt4-0.png','https://cdn.nekos.life/wallpaper/x63h_W8KFL8.jpg','https://cdn.nekos.life/wallpaper/lktzjDRhWyg.jpg','https://cdn.nekos.life/wallpaper/j7oQtvRZBOI.jpg','https://cdn.nekos.life/wallpaper/MQQEAD7TUpQ.png','https://cdn.nekos.life/wallpaper/lEG1-Eeva6Y.png','https://cdn.nekos.life/wallpaper/Loh5wf0O5Aw.png','https://cdn.nekos.life/wallpaper/yO6ioREenLA.png','https://cdn.nekos.life/wallpaper/4vKWTVgMNDc.jpg','https://cdn.nekos.life/wallpaper/Yk22OErU8eg.png','https://cdn.nekos.life/wallpaper/Y5uf1hsnufE.png','https://cdn.nekos.life/wallpaper/xAmBpMUd2Zw.jpg','https://cdn.nekos.life/wallpaper/f_RWFoWciRE.jpg','https://cdn.nekos.life/wallpaper/Y9qjP2Y__PA.jpg','https://cdn.nekos.life/wallpaper/eqEzgohpPwc.jpg','https://cdn.nekos.life/wallpaper/s1MBos_ZGWo.jpg','https://cdn.nekos.life/wallpaper/PtW0or_Pa9c.png','https://cdn.nekos.life/wallpaper/32EAswpy3M8.png','https://cdn.nekos.life/wallpaper/Z6eJZf5xhcE.png','https://cdn.nekos.life/wallpaper/xdiSF731IFY.jpg','https://cdn.nekos.life/wallpaper/Y9r9trNYadY.png','https://cdn.nekos.life/wallpaper/8bH8CXn-sOg.jpg','https://cdn.nekos.life/wallpaper/a02DmIFzRBE.png','https://cdn.nekos.life/wallpaper/MnrbXcPa7Oo.png','https://cdn.nekos.life/wallpaper/s1Tc9xnugDk.jpg','https://cdn.nekos.life/wallpaper/zRqEx2gnfmg.jpg','https://cdn.nekos.life/wallpaper/PtW0or_Pa9c.png','https://cdn.nekos.life/wallpaper/0ECCRW9soHM.jpg','https://cdn.nekos.life/wallpaper/kAw8QHl_wbM.jpg','https://cdn.nekos.life/wallpaper/ZXcaFmpOlLk.jpg','https://cdn.nekos.life/wallpaper/WVEdi9Ng8UE.png','https://cdn.nekos.life/wallpaper/IRu29rNgcYU.png','https://cdn.nekos.life/wallpaper/LgIJ_1AL3rM.jpg','https://cdn.nekos.life/wallpaper/DVD5_fLJEZA.jpg','https://cdn.nekos.life/wallpaper/siqOQ7k8qqk.jpg','https://cdn.nekos.life/wallpaper/CXNX_15eGEQ.png','https://cdn.nekos.life/wallpaper/s62tGjOTHnk.jpg','https://cdn.nekos.life/wallpaper/tmQ5ce6EfJE.png','https://cdn.nekos.life/wallpaper/Zju7qlBMcQ4.jpg','https://cdn.nekos.life/wallpaper/CPOc_bMAh2Q.png','https://cdn.nekos.life/wallpaper/Ew57S1KtqsY.jpg','https://cdn.nekos.life/wallpaper/hVpFbYJmZZc.jpg','https://cdn.nekos.life/wallpaper/sb9_J28pftY.jpg','https://cdn.nekos.life/wallpaper/JDoIi_IOB04.jpg','https://cdn.nekos.life/wallpaper/rG76AaUZXzk.jpg','https://cdn.nekos.life/wallpaper/9ru2luBo360.png','https://cdn.nekos.life/wallpaper/ghCgiWFxGwY.png','https://cdn.nekos.life/wallpaper/OSR-i-Rh7ZY.png','https://cdn.nekos.life/wallpaper/65VgtPyweCc.jpg','https://cdn.nekos.life/wallpaper/3vn-0FkNSbM.jpg','https://cdn.nekos.life/wallpaper/u02Y0-AJPL0.jpg','https://cdn.nekos.life/wallpaper/_-Z-0fGflRc.jpg','https://cdn.nekos.life/wallpaper/3VjNKqEPp58.jpg','https://cdn.nekos.life/wallpaper/NoG4lKnk6Sc.jpg','https://cdn.nekos.life/wallpaper/xiTxgRMA_IA.jpg','https://cdn.nekos.life/wallpaper/yq1ZswdOGpg.png','https://cdn.nekos.life/wallpaper/4SUxw4M3UMA.png','https://cdn.nekos.life/wallpaper/cUPnQOHNLg0.jpg','https://cdn.nekos.life/wallpaper/zczjuLWRisA.jpg','https://cdn.nekos.life/wallpaper/TcxvU_diaC0.png','https://cdn.nekos.life/wallpaper/7qqWhEF_uoY.jpg','https://cdn.nekos.life/wallpaper/J4t_7DvoUZw.jpg','https://cdn.nekos.life/wallpaper/xQ1Pg5D6J4U.jpg','https://cdn.nekos.life/wallpaper/aIMK5Ir4xho.jpg','https://cdn.nekos.life/wallpaper/6gneEXrNAWU.jpg','https://cdn.nekos.life/wallpaper/PSvNdoISWF8.jpg','https://cdn.nekos.life/wallpaper/SjgF2-iOmV8.jpg','https://cdn.nekos.life/wallpaper/vU54ikOVY98.jpg','https://cdn.nekos.life/wallpaper/QjnfRwkRU-Q.jpg','https://cdn.nekos.life/wallpaper/uSKqzz6ZdXc.png','https://cdn.nekos.life/wallpaper/AMrcxZOnVBE.jpg','https://cdn.nekos.life/wallpaper/N1l8SCMxamE.jpg','https://cdn.nekos.life/wallpaper/n2cBaTo-J50.png','https://cdn.nekos.life/wallpaper/ZXcaFmpOlLk.jpg','https://cdn.nekos.life/wallpaper/7bwxy3elI7o.png','https://cdn.nekos.life/wallpaper/7VW4HwF6LcM.jpg','https://cdn.nekos.life/wallpaper/YtrPAWul1Ug.png','https://cdn.nekos.life/wallpaper/1p4_Mmq95Ro.jpg','https://cdn.nekos.life/wallpaper/EY5qz5iebJw.png','https://cdn.nekos.life/wallpaper/aVDS6iEAIfw.jpg','https://cdn.nekos.life/wallpaper/veg_xpHQfjE.jpg','https://cdn.nekos.life/wallpaper/meaSEfeq9QM.png','https://cdn.nekos.life/wallpaper/Xa_GtsKsy-s.png','https://cdn.nekos.life/wallpaper/6Bx8R6D75eM.png','https://cdn.nekos.life/wallpaper/zXOGXH_b8VY.png','https://cdn.nekos.life/wallpaper/VQcviMxoQ00.png','https://cdn.nekos.life/wallpaper/CJnRl-PKWe8.png','https://cdn.nekos.life/wallpaper/zEWYfFL_Ero.png','https://cdn.nekos.life/wallpaper/_C9Uc5MPaz4.png','https://cdn.nekos.life/wallpaper/zskxNqNXyG0.jpg','https://cdn.nekos.life/wallpaper/g7w14PjzzcQ.jpg','https://cdn.nekos.life/wallpaper/KavYXR_GRB4.jpg','https://cdn.nekos.life/wallpaper/Z_r9WItzJBc.jpg','https://cdn.nekos.life/wallpaper/Qps-0JD6834.jpg','https://cdn.nekos.life/wallpaper/Ri3CiJIJ6M8.png','https://cdn.nekos.life/wallpaper/ArGYIpJwehY.jpg','https://cdn.nekos.life/wallpaper/uqYKeYM5h8w.jpg','https://cdn.nekos.life/wallpaper/h9cahfuKsRg.jpg','https://cdn.nekos.life/wallpaper/iNPWKO8d2a4.jpg','https://cdn.nekos.life/wallpaper/j2KoFVhsNig.jpg','https://cdn.nekos.life/wallpaper/z5Nc-aS6QJ4.jpg','https://cdn.nekos.life/wallpaper/VUFoK8l1qs0.png','https://cdn.nekos.life/wallpaper/rQ8eYh5mXN8.png','https://cdn.nekos.life/wallpaper/D3NxNISDavQ.png','https://cdn.nekos.life/wallpaper/Z_CiozIenrU.jpg','https://cdn.nekos.life/wallpaper/np8rpfZflWE.jpg','https://cdn.nekos.life/wallpaper/ED-fgS09gik.jpg','https://cdn.nekos.life/wallpaper/AB0Cwfs1X2w.jpg','https://cdn.nekos.life/wallpaper/DZBcYfHouiI.jpg','https://cdn.nekos.life/wallpaper/lC7pB-GRAcQ.png','https://cdn.nekos.life/wallpaper/zrI-sBSt2zE.png','https://cdn.nekos.life/wallpaper/_RJhylwaCLk.jpg','https://cdn.nekos.life/wallpaper/6km5m_GGIuw.png','https://cdn.nekos.life/wallpaper/3db40hylKs8.png','https://cdn.nekos.life/wallpaper/oggceF06ONQ.jpg','https://cdn.nekos.life/wallpaper/ELdH2W5pQGo.jpg','https://cdn.nekos.life/wallpaper/Zun_n5pTMRE.png','https://cdn.nekos.life/wallpaper/VqhFKG5U15c.png','https://cdn.nekos.life/wallpaper/NsMoiW8JZ60.jpg','https://cdn.nekos.life/wallpaper/XE4iXbw__Us.png','https://cdn.nekos.life/wallpaper/a9yXhS2zbhU.jpg','https://cdn.nekos.life/wallpaper/jjnd31_3Ic8.jpg','https://cdn.nekos.life/wallpaper/Nxanxa-xO3s.png','https://cdn.nekos.life/wallpaper/dBHlPcbuDc4.jpg','https://cdn.nekos.life/wallpaper/6wUZIavGVQU.jpg','https://cdn.nekos.life/wallpaper/_-Z-0fGflRc.jpg','https://cdn.nekos.life/wallpaper/H9OUpIrF4gU.jpg','https://cdn.nekos.life/wallpaper/xlRdH3fBMz4.jpg','https://cdn.nekos.life/wallpaper/7IzUIeaae9o.jpg','https://cdn.nekos.life/wallpaper/FZCVL6PyWq0.jpg','https://cdn.nekos.life/wallpaper/5dG-HH6d0yw.png','https://cdn.nekos.life/wallpaper/ddxyA37HiwE.png','https://cdn.nekos.life/wallpaper/I0oj_jdCD4k.jpg','https://cdn.nekos.life/wallpaper/ABchTV97_Ts.png','https://cdn.nekos.life/wallpaper/58C37kkq39Y.png','https://cdn.nekos.life/wallpaper/HMS5mK7WSGA.jpg','https://cdn.nekos.life/wallpaper/1O3Yul9ojS8.jpg','https://cdn.nekos.life/wallpaper/hdZI1XsYWYY.jpg','https://cdn.nekos.life/wallpaper/h8pAJJnBXZo.png','https://cdn.nekos.life/wallpaper/apO9K9JIUp8.jpg','https://cdn.nekos.life/wallpaper/p8f8IY_2mwg.jpg','https://cdn.nekos.life/wallpaper/HY1WIB2r_cE.jpg','https://cdn.nekos.life/wallpaper/u02Y0-AJPL0.jpg','https://cdn.nekos.life/wallpaper/jzN74LcnwE8.png','https://cdn.nekos.life/wallpaper/IeAXo5nJhjw.jpg','https://cdn.nekos.life/wallpaper/7lgPyU5fuLY.jpg','https://cdn.nekos.life/wallpaper/f8SkRWzXVxk.png','https://cdn.nekos.life/wallpaper/ZmDTpGGeMR8.jpg','https://cdn.nekos.life/wallpaper/AMrcxZOnVBE.jpg','https://cdn.nekos.life/wallpaper/ZhP-f8Icmjs.jpg','https://cdn.nekos.life/wallpaper/7FyUHX3fE2o.jpg','https://cdn.nekos.life/wallpaper/CZoSLK-5ng8.png','https://cdn.nekos.life/wallpaper/pSNDyxP8l3c.png','https://cdn.nekos.life/wallpaper/AhYGHF6Fpck.jpg','https://cdn.nekos.life/wallpaper/ic6xRRptRes.jpg','https://cdn.nekos.life/wallpaper/89MQq6KaggI.png','https://cdn.nekos.life/wallpaper/y1DlFeHHTEE.png']
919 let walnimek = walnime[Math.floor(Math.random() * walnime.length)]
920 client.sendFileFromUrl(from, walnimek, 'Nimek.jpg', '', message.id)
921 break
922 case 'meme':
923 const response = await axios.get('https://meme-api.herokuapp.com/gimme/wholesomeanimemes');
924 const { postlink, title, subreddit, url, nsfw, spoiler } = response.data
925 await client.sendFileFromUrl(from, `${url}`, 'meme.jpg', `${title}`)
926 break
927 case 'menu':
928 case 'tools':
929 case 'help':
930 client.reply(from, help.replace(undefined, pushname), message.id)
931 break
932 case 'menugrup':
933 if (!isGroupMsg) return client.reply(from, 'Maaf, fitur ini hanya dapat digunakan di dalam grup!', message.id)
934 client.reply(from, menugrup, message.id)
935 break
936 case 'info':
937 client.reply(from, info, message.id)
938 break
939 case 'profile':
940 if (!isGroupMsg) return client.reply(from, 'Maaf sob, fitur ini hanya dapat digunakan di dalam grup!', mesage.id)
941 var role = 'None'
942 if (isGroupMsg) {
943 if (!quotedMsg) {
944 var block = ban.includes(author)
945 var pic = await client.getProfilePicFromServer(author)
946 var namae = pushname
947 var sts = await client.getStatus(author)
948 var adm = isGroupAdmins
949 const { status } = sts
950 if (pic == undefined) {
951 var pfp = errorurl
952 } else {
953 var pfp = pic
954 }
955 await client.sendFileFromUrl(from, pfp, 'pfp.jpg', `?️ *Username: ${namae}*\n\n?️ *User Info: ${status}*\n\n*?️ Ban: ${block}*\n\n✨️ *Role: ${role}*\n\n ?️ *Admin: ${adm}*`)
956 } else if (quotedMsg) {
957 var qmid = quotedMsgObj.sender.id
958 var block = ban.includes(qmid)
959 var pic = await client.getProfilePicFromServer(qmid)
960 var namae = quotedMsgObj.sender.formattedName
961 var sts = await client.getStatus(qmid)
962 var admgrp = await client.getGroupAdmins(from)
963 var adm = admgrp.includes(qmid)
964 const { status } = sts
965 if (pic == undefined) {
966 var pfp = errorurl
967 } else {
968 var pfp = pic
969 }
970 await client.sendFileFromUrl(from, pfp, 'pfo.jpg', `?️ *Username: ${namae}*\n\n?️ *User Info: ${status}*\n\n*?️ Ban: ${block}*\n\n✨️ *Role: ${role}*\n\n ?️ *Admin: ${adm}*`)
971 }
972 }
973 break
974 case 'snk':
975 if (!isMemberPremium) return
976 client.reply(from, snk, message.id)
977 default:
978 await client.reply(from, `Command yang kamu minta tidak dapat ditemukan! Silahkan ketikan !menu atau !help untuk melihat daftar menu :)`, id)
979 console.log(color('[UNLISTED]', 'red'), color(time, 'yellow'), 'Unregistered Command from', color(pushname))
980 break
981 }
982 }
983 } catch (err) {
984 console.log(color('[ERROR]', 'red'), err)
985 }
986}
987