· 5 years ago · Nov 15, 2020, 04:28 PM
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')
21
22const errorurl = 'https://steamuserimages-a.akamaihd.net/ugc/954087817129084207/5B7E46EE484181A676C02DFCAD48ECB1C74BC423/?imw=512&&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false'
23const errorurl2 = 'https://steamuserimages-a.akamaihd.net/ugc/954087817129084207/5B7E46EE484181A676C02DFCAD48ECB1C74BC423/?imw=512&&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false'
24
25const color = require('./lib/color')
26const { doing } = require('./lib/translate.js')
27const { translate } = require('./lib')
28
29const msgFilter = require('./lib/msgFilter')
30const { quotemaker, wall, costom } = require('./lib/functions')
31const { help, info, infopremium } = require('./lib/help')
32const ban = JSON.parse(fs.readFileSync('./lib/banned.json'))
33
34const feature = require('./lib/poll');
35
36const yt = require('./lib/yt')
37const sendSticker = require('./lib/sendSticker')
38
39// API KEY
40const api_itech = 'nLnj3A-c9o74T-Z1BL83-yx6qJN-fCnfDg'
41const apiKey2 = 'zFuV88pxcIiCWuYlwg57'
42
43function sleep(ms) {
44 return new Promise(resolve => setTimeout(resolve, ms));
45}
46
47module.exports = msgHandler = async (client, message) => {
48 try {
49 const { type, id, from, t, sender, isGroupMsg, chat, chatId, caption, isMedia, mimetype, quotedMsg, mentionedJidList, author, quotedMsgObj } = message
50 let { body } = message
51 const { name } = chat
52 let { pushname, verifiedName } = sender
53 const prefix = '!'
54 body = (type === 'chat' && body.startsWith(prefix)) ? body : ((type === 'image' && caption || type === 'video' && caption) && caption.startsWith(prefix)) ? caption : ''
55 const command = body.slice(prefix.length).trim().split(/ +/).shift().toLowerCase()
56 const args = body.slice(prefix.length).trim().split(/ +/).slice(1)
57 const isCmd = body.startsWith(prefix)
58
59 const time = moment(t * 1000).format('DD/MM HH:mm:ss')
60
61 if (isCmd && msgFilter.isFiltered(from) && !isGroupMsg) return console.log(color('[SPAM!]', 'red'), color(time, 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname))
62 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))
63 if (!isCmd && !isGroupMsg) return console.log('[RECV]', color(time, 'yellow'), 'Message from', color(pushname))
64 if (!isCmd && isGroupMsg) return console.log('[RECV]', color(time, 'yellow'), 'Message from', color(pushname), 'in', color(name))
65 if (isCmd && !isGroupMsg) console.log(color('[EXEC]'), color(time, 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname))
66
67 if (isCmd && isGroupMsg) console.log(color('[EXEC]'), color(time, 'yellow'), color(`${command} [${args.length}]`), 'from', color(pushname), 'in', color(name))
68 const botNumber = await client.getHostNumber()
69 const groupId = isGroupMsg ? chat.groupMetadata.id : ''
70 const groupAdmins = isGroupMsg ? await client.getGroupAdmins(groupId) : ''
71 const isGroupAdmins = isGroupMsg ? groupAdmins.includes(sender.id) : false
72 const isBotGroupAdmins = isGroupMsg ? groupAdmins.includes(botNumber + '@c.us') : false
73 const isBanned = ban.includes(chatId)
74 const botadmins = ['6289515746253@c.us', '6281563825390@c.us'] //add the number of people that you want to the be bot admins
75 const isbotadmin = botadmins.includes(sender.id)
76 const memberPremium = ['6285772398315@c.us', '6285892795057@c.us', '6282123165559@c.us', '62895385107395@c.us', '6285716194181@c.us', '62895701062608@c.us', '6289515746253@c.us', '6281211887577@c.us','6282120026728@c.us', '6285892795057@c.us', '6281563825390@c.us']
77 const isMemberPremium = memberPremium.includes(sender.id)
78 const isnsfw = nsfwgrp.includes(chat.id)
79 const isQuotedImage = quotedMsg && quotedMsg.type === 'image'
80 global.pollfile = 'poll_Config_'+chat.id+'.json'
81 global.voterslistfile = 'poll_voters_Config_'+chat.id+'.json'
82
83
84 msgFilter.addFilter(from)
85
86 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'
87 const isUrl = new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/gi)
88 if (!isBanned) {
89 switch (command) {
90 case 'sticker':
91 case 'stiker':
92 if (isMedia) {
93 if (type == 'video') {
94 if (message.duration < 15) {
95 sendSticker.sendAnimatedSticker(message)
96 } else {
97 await client.reply(from, 'Maaf, format video belum didukung untuk dijadikan stiker!', id)
98 }
99 } else if (type == 'image') {
100 const mediaData = await decryptMedia(message)
101 const imageBase64 = `data:${mimetype};base64,${mediaData.toString('base64')}`
102 const baseImg = imageBase64.replace('video/mp4','image/gif')
103 await client.sendImageAsSticker(from, baseImg)
104 }
105 } else if (quotedMsg && quotedMsg.type == 'image') {
106 const mediaData = await decryptMedia(quotedMsg)
107 const imageBase64 = `data:${quotedMsg.mimetype};base64,${mediaData.toString('base64')}`
108 await client.sendImageAsSticker(from, imageBase64)
109 } else if (quotedMsg && quotedMsg.type == 'video') {
110 if (message.duration < 15) {
111 sendSticker.sendAnimatedSticker(message)
112 } else {
113 await client.reply(from, 'File yang diberikan terlalu besar untuk diproses!', id)
114 }
115 } else {
116 client.reply(from, 'Silahkan reply image dengan !stiker. Atau kirimkan foto dgn caption !stiker', message.id)
117 }
118 break
119 break
120 case 'donate':
121 case 'donasi':
122 client.sendLinkWithAutoPreview(from, 'https://saweria.co/donate/bangnopal', '\nDonasi dari kalian akan digunakan kembali untuk menyewa server tiap bulannya :)')
123 break
124 case 'infopremium':
125 client.reply(from, infopremium, message.id)
126 break
127 case 'ytdl':
128 const ytdl_url = body.slice(6)
129 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)
130 await client.reply(from, '_Permintaan anda sedang diproses. Ditunggu aja gan ?_', message.id)
131 ytdl.getInfo(ytdl_url, function(err, info) {
132 if (err) throw err
133 client.sendFileFromUrl(from, info.url, 'YTDownloader.mp4', `*[+]-- YOUTUBE DOWNLOADER --[+]*\n\n*Judul:* ${info.title}\n*Deksriction:* ${info.description}`, message.id)
134 })
135 break
136 case 's':
137 if (!isMemberPremium) return client.reply(from,)
138 const kata_talk = body.slice(3)
139 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)
140 const simi = await axios.get(`https://st4rz.herokuapp.com/api/simsimi?kata=${kata_talk}`)
141 if (simi.data.result != null) {
142 client.reply(from, simi.data.result, message.id)
143 } else if (simi.data.result == null) {
144 return client.reply(from, 'Maaf sob, fitur ini sudah mencapai batasnya saat ini. Max 500x perhari. Silahkan gunakan fitur lainnya ?')
145 }
146 break
147 case 'fml':
148 const fml = await axios.get(`https://api.i-tech.id/tools/fml?key=${api_itech}`)
149 client.reply(from, fml.data.result, message.id)
150 break
151 case 'fakta':
152 const fakta = await axios.get(`https://api.i-tech.id/tools/fakta?key=${api_itech}`)
153 client.reply(from, fakta.data.result, message.id)
154 break
155 case 'sha256':
156 const str_query_sha256 = body.slice(8)
157 if (args.length == 0) return client.reply(from, 'Ketikan !sha256 <query>. Contoh: !sha256 naufal', message.id)
158 const sha256 = await shajs(str_query_sha256)
159 client.reply(from, `*[+]-- TURU SHA256 ENCODER --[+]*\n\nString: *${str_query_sha256}*\nMD5 Encode:\n*${sha256}*`)
160 break
161 case 'md5':
162 const str_query = body.slice(5)
163 if (args.length == 0) return client.reply(from, 'Ketik !md5 <string>. Contoh: !md5 admin', message.id)
164 const md5_x = await md5(str_query)
165 client.reply(from, `*[+]-- TURU MD5 ENCODER --[+]*\n\nString: *${str_query}*\nMD5 Encode:\n*${md5_x}*`)
166 break
167 case 'brainly':
168 const query_brainly = body.slice(9)
169 if (args.length == 0) return client.reply(from, 'Ketik !brainly <pertanyaan>. Contoh: !brainly presiden pertama indonesia', message.id)
170 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
171 const search_brainly = await brainly(query_brainly)
172 if (search_brainly.success == true) {
173 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)
174 } else if (search_brainly.success == false) {
175 return client.reply(from, 'Maaf, tidak ada yang mau menjawab pertanyaan anda! AWOKAWOKAOWK :V', message.id)
176 }
177 break
178 case 'tiny':
179 const long_link = body.slice(6)
180 if (args.length == 0) return client.reply(from, 'Ketik !tiny <url>. Contoh: !tiny https://naufalhoster.xyz', message.id)
181 const tinyshort = await axios.get(`https://tinyurl.com/api-create.php?url=${long_link}`)
182 if (tinyshort.data == Error) return client.reply(from, 'Maaf, link yang kamu berikan tidak valid!', message.id)
183 client.reply(from, `*[+]-- TURU URL SHORTENER --[+]*\n\nNih gan url pendeknya -> ${tinyshort.data} ?`, message.id)
184 break
185 case 'bitly':
186 const link_panjang = body.slice(7)
187 if (args.length == 0) return client.reply(from, 'Ketik !short <link yang mau di short>. Contoh: !bitly https://naufalhoster.xyz', message.id)
188 const shorten = await axios.get(`https://api.i-tech.id/tools/shorturl?key=${api_itech}&link=${link_panjang}`)
189 if (shorten.data.code == "404") return client.reply(from, 'Maaf, link yang anda berikan tidak valid!', message.id)
190 client.reply(from, `*[+]-- TURU URL SHORTENER --[+]*\n\nNih gan url pendeknya -> ${shorten.data.result} ?`, message.id)
191 break
192 case 'quotemaker':
193 arg = body.trim().split('|')
194 if (arg.length >= 3) {
195 client.reply(from, 'Processing...', message.id)
196 const quotes = arg[1]
197 const author = arg[2]
198 const theme = arg[3]
199 try {
200 const resolt = await quotemaker(quotes, author, theme)
201 client.sendFile(from, resolt, 'quotesmaker.jpg','...')
202 } catch {
203 client.reply(from, 'Maaf, file tidak dapat diproses. Terjadi kegagalan dalam sistem!', message.id)
204 }
205 } else {
206 client.reply(from, 'Cara pakai: \n!quotemaker | quote | author', message.id)
207 }
208 break
209 case 'translate':
210 arg = body.trim().split(' ')
211 if (arg.length != 2) return client.reply(from, 'Wrong Format!', id)
212 if (!quotedMsg) return client.reply(from, 'Wrong Format!', id)
213 const quoteText = quotedMsg.type == 'chat' ? quotedMsg.body : quotedMsg.type == 'image' ? quotedMsg.caption : ''
214 translate(quoteText, arg[1])
215 .then((result) => client.reply(from, result))
216 .catch(() => client.reply(from, 'Maaf, kode bahasa yang anda masukan salah!'))
217 break
218 case 'rloli':
219 await client.reply(from, `_Permintaan anda sedang diproses. Ditunggu aja gan ?_`, message.id)
220 const rloli = await axios.get('https://st4rz.herokuapp.com/api/randomloli')
221 client.sendFileFromUrl(from, rloli.data.result, 'RandomLoli.jpg', '', message.id)
222 break
223 case 'tts':
224 var withOption = quotedMsg ? quotedMsgObj.body : args.splice(1).join(' ')
225 var tts = require('node-gtts')(args[0])
226 tts.save(process.cwd() + '/media/tts.ogg', withOption, async () => {
227 client.sendPtt(from, './media/tts.ogg', null)
228 })
229 break
230 case 'jadwaltv':
231 const channel = body.slice(11)
232 if (args.length == 0) return client.reply(from, 'Ketik !jadwaltv <channel>. Contoh: !jadwaltv RCTI', message.id)
233 const jadwalchannel = await axios.get(`https://api.haipbis.xyz/jadwaltv/${channel}`)
234 client.reply(from, jadwalchannel.data, message.id)
235 break
236 case 'waifu':
237 const waifu = await axios.get('https://st4rz.herokuapp.com/api/waifu')
238 client.sendFileFromUrl(from, waifu.data.image, 'Waifu.jpg', `Name : ${waifu.data.name}\nDescription : ${waifu.data.desc}\n\nSource : ${waifu.data.source}`, id)
239 break
240 case 'qr':
241 const str_qr = body.slice(5)
242 if (args.length == 0) return client.reply(from, 'Ketik !qr <query>/<url>. Contoh: !qr nopal ganteng', message.id)
243 QrMaker(str_qr)
244 .then(data => {
245 client.sendImage(from, data, 'qr.jpg', 'Nih gan QR Code nya ?', message.id)
246 })
247 .catch(err => {
248 console.log(err)
249 })
250 break
251 case 'cuaca':
252 const kota = body.slice(7)
253 if (args.length == 0) return client.reply(from, 'Ketik !cuaca <kota>. Contoh: !cuaca Tangerang')
254 const cuaca_url = await axios.get(`https://api.i-tech.id/tools/cuaca?key=${api_itech}&kota=${kota}`)
255 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)
256 break
257 case 'nfilm':
258 if (!isMemberPremium) return client.reply(from, 'Maaf sob, fitur ini hanya tersedia khusus member premium. Info member premium ketik !infopremium', messgae.id)
259 await client.reply(from, '_Permintaan anda sedang diproses. Ditunggu aja gan ?_', message.id)
260 const next_film = await axios.get('https://api.haipbis.xyz/cinema21/comingsoon')
261 const film = next_film.data
262 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)
263 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)
264 break
265 case 'randomhentai':
266 client.reply(from, 'Maaf, fitur tsb sedang dalam maintenance', message.id)
267 break
268 case 'nsfw':
269 client.reply(from, 'Maaf, fitur tsb sedang dalam maintenance', message.id)
270 break
271 case 'tulis':
272 if (!isMemberPremium) return client.reply(from, 'Maaf, fitur ini hanya tersedia utk member premium! Dikarenakan biaya API yang semakin mahal ?', message.id)
273 const txt_tulisan = body.slice(7)
274 if (args.length == 0) return client.reply(from, 'Ketik !tulis <text>. Contoh: !tulis Nopal Ganteng', message.id)
275 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
276 const tulis = await axios.get(`http://salism3.pythonanywhere.com/write?text=${txt_tulisan}`)
277 client.sendFileFromUrl(from, tulis.data.images[0], 'Tulisan.jpg', 'Nih gan tulisannya ?', message.id)
278 break
279 case 'lirik':
280 const liriklagu = body.slice(7)
281 if (args.length == 0) return client.reply(from, 'Ketik !lirik <judul lagu>. Contoh: !lirik Celengan Rindu', message.id)
282 const lirik = await axios.get(`https://api.i-tech.id/tools/lirik?key=${api_itech}&query=${liriklagu}`)
283 client.reply(from, lirik.data.result, message.id)
284 break
285 case 'chord':
286 const judul = body.slice(7)
287 if (args.length == 0) return client.reply(from, 'Ketik !chord <judul lagu>. Contoh !chord Celengan Rindu', message.id)
288 const chord = await axios.get(`https://api.i-tech.id/tools/chord?key=${api_itech}&query=${judul}`)
289 if (chord.data.result != null) {
290 client.reply(from, chord.data.result, message.id)
291 } else if (chord.data.result == null) {
292 return client.reply(from, 'Maaf, chord lagu yang kamu minta tidak dapat ditemukan! Coba gunakan kata kunci yang lain', message.id)
293 }
294 break
295 case 'igstalk':
296 const username_ig = body.slice(9)
297 if (args.length == 0) return client.reply(from, 'Ketik !igstalk <username ig>. Contoh !igstalk naufal_al.fattah', message.id)
298 const ig_stalk = await axios.get(`https://st4rz.herokuapp.com/api/stalk?username=${username_ig}`)
299 await client.reply(from, '_Permintaan anda sedang diproses. Ditunggu aja gan ?_', message.id)
300 if (ig_stalk.data.status == 200) {
301 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}`)
302 } else if (ig_stalk.data.status == false) {
303 client.sendFile(from, './media/images/ig_404.jpg', '404.jpg', 'Maaf, username yang kamu cari tidak dapat ditemukan!', message.id)
304 }
305 break
306 case 'igdl':
307 if (args.length == 0) return client.reply(from, 'Ketik !igdl <link post ig>', message.id)
308 const link_ig = body.slice(6)
309 const ig_valid = link_ig.match(/(https:\/\/www.instagram.com)/gi)
310 if (!ig_valid) return client.sendImage(from, './media/images/404.jpg', '404.jpeg', 'Maaf link yang kamu berikan tidak valid !', message.id)
311 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
312 const get_post_ig = await axios.get(`https://api.i-tech.id/dl/igdl?key=${api_itech}&link=${link_ig}`)
313 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)
314 if (get_post_ig.data.result[0].type == "image") {
315 await client.sendFileFromUrl(from, get_post_ig.data.result[0].url, 'IGdownloader.jpg', 'Nih gan fotonya ?', message.id)
316 } else if (get_post_ig.data.result[0].type == "video") {
317 await client.sendFileFromUrl(from, get_post_ig.data.result[0].url, 'IGDownloader.mp4', 'Nih gan videonya ?', message.id)
318 }
319 break
320 case 'jadwaltvnow':
321 const jadwaltv = await axios.get('https://api.haipbis.xyz/jadwaltvnow')
322 client.reply(from, jadwaltv.data.jadwalTV, message.id)
323 break
324 case 'wiki':
325 const wiki_query = body.slice(6)
326 if (args.length == 0) return client.reply(from, 'Ketik !wiki <query>. Contoh: !wiki whatsapp', message.id)
327 const wiki = await axios.get(`https://st4rz.herokuapp.com/api/wiki?q=${wiki_query}`)
328 if (wiki.data.status == 200) {
329 client.reply(from, wiki.data.result, message.id1)
330 } else {
331 return client.reply(from, 'Maaf, query yang anda cari tidak dapat ditemukan di WikiPedia!', message.id)
332 }
333 break
334 case 'ssweb':
335 const link_ss = body.slice(7)
336 if (args.length == 0) return client.reply(from, 'Ketik !ssweb <link>. Contoh !ssweb google.com', message.id)
337 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
338 const ssweb = await axios.get(`https://screenshotapi.net/api/v1/screenshot?token=IKIVN67SKQPRW7NDBOHKUC0MBQETJ8HH&url=${link_ss}&fresh=true`)
339 client.sendFileFromUrl(from, ssweb.data.screenshot, 'ScreenshotWebsite.jpg', 'Nih gan screenshotnya', message.id)
340 break
341 case 'artinama':
342 const nama_lengkap = body.slice(10)
343 if (args.length == 0) return client.reply(from, 'Ketik !artinama <nama lengkap>. Contoh: !artinama Muhammad Naufal Al Fattah', message.id)
344 const arti = await axios.get(`https://api.i-tech.id/tools/arti?key=${api_itech}&nama=${nama_lengkap}`)
345 client.reply(from, `Nama: *${nama_lengkap}*\n\nArti Nama: ${arti.data.arti}`, message.id)
346 break
347 case 'fbmp4':
348 if(!isMemberPremium) return client.reply(from, 'Maaf gan, fitur ini khusus bagi Member Premium! Upgrade ke member premium seharga 5k sekarang juga!', message.id)
349 const link_fb = body.slice(7)
350 const fb_valid = link_fb.match(/(https:\/\/www.facebook.com)/gi)
351 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)
352 if (!fb_valid) return client.reply(from, 'Maaf, link yang kamu berikan tidak valid!', message.id)
353 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
354 const fbmp4 = await axios.get(`https://api.i-tech.id/dl/fb?key=${api_itech}&link=${link_fb}`)
355 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)
356 client.sendFileFromUrl(from, fbmp4.data.link, 'FacebookDownloader.mp4', `${fbmp4.data.title}`, message.id)
357 break
358 case 'ytmp4':
359 if (args.length == 0) return client.reply(from, 'Ketik !ytmp4 <link yt>. Contoh: !ytmp4 https://www.youtube.com/watch?v=rz-NuNWxHck', message.id)
360 const link_yt = body.slice(7)
361 await client.reply(from, 'Permintaan anda sedang diproses. Ditunggu aja gan ?', message.id)
362 const ytmp4 = await axios.get(`https://api.i-tech.id/dl/yt?key=${api_itech}&link=${link_yt}`)
363 if (ytmp4.data.code == "200") {
364 client.sendFileFromUrl(from, ytmp4.data.url_video, 'YtDownloader.mp4', `*Judul:* ${ytmp4.data.title}\n\n*Durasi:* ${ytmp4.data.duration}`, message.id)
365 } else if (ytmp4.data.code = "404") {
366 client.sendFile(from, './media/images/404.jpg', '404.jpg', 'Maaf url yang kamu berikan tidak dapat ditemukan!', message.id)
367 }
368 break
369 case 'js':
370 const zona_kota = body.slice(4)
371 if (args.length == 0) return client.reply(from, 'Ketik !js <kota>. Contoh: !js Tangerang', message.id)
372 const js = await axios.get(`https://api.i-tech.id/tools/sholat?key=${api_itech}&kota=${zona_kota}`)
373 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)
374 break
375 case 'botstatus':
376 case 'botstat':
377 case 'botstats':
378 const loadedMsg = await client.getAmountOfLoadedMessages()
379 const chatIds = await client.getAllChatIds()
380 const groups = await client.getAllGroups()
381 const battery = await client.getBatteryLevel()
382 const plugged = await client.getIsPlugged()
383 const info_cpu = await si.cpu()
384 const info_os = await si.osInfo()
385 const info_uptime = await si.time()
386 const info_currentLoad = await si.currentLoad()
387 const info_currentLoad2 = info_currentLoad.currentload
388 const info_currentCpu = info_currentLoad2.toFixed(2)
389 const info_disk = await si.mem()
390 const disk_fixed = info_disk.used * 0.000000001
391 const disk_control = disk_fixed.toFixed(2)
392 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)
393 break
394 case 'tulis2':
395 if (!isMemberPremium) return client.reply(from, 'Maaf sob, fitur ini hanya tersedia untuk member premium. Info selengkapnya ketik !infopremium', message.id)
396 const text_tulis = body.slice(8)
397 if (args.length == 0) return client.reply(from, 'Untuk menggunakan fitur ini, ketikan !tulis2 <text>. Contoh: !tulis2 nopal ganteng')
398 await client.reply(from, '_Permintaan anda sedang diproses. Ditunggu aja gan ?_', message.id)
399 const nulis2 = await axios.get(`https://mhankbarbar.herokuapp.com/nulis?text=${text_tulis}&apiKey=${apiKey2}`)
400 client.sendFileFromUrl(from, nulis2.data.result, 'Tulisan2.jpg', 'Nih gan tulisannya ?', message.id)
401 break
402 case 'twtstalk':
403 if (!isMemberPremium) return client.reply(from, 'Maaf sob, fitur ini hanya tersedia khusus untuk member premium. Info selengkapnya ketik !infopremium', message.id)
404 const username_twt = body.slice(10)
405 if (args.length == 0) return client.reply(from, 'Untuk menggunakan fitur ini, ketikan !twtstalk <username twitter>. Contoh: !twtstalk cnnindonesia', message.id)
406 await client.reply(from, '_Permintaan anda sedang diproses. Ditunggu aja gan ?_', message.id)
407 const twt_stalker = await axios.get(`https://mhankbarbar.herokuapp.com/api/twstalk?username=${username_twt}&apiKey=${apiKey2}`)
408 if (twt_stalker.data.status == 200) {
409 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)
410 } else if (twt_stalker.data.status == false) {
411 client.sendFile(from, './media/images/twt_404.png', '404.png', 'Maaf, username yang kamu cari tidak dapat ditemukan!', message.id)
412 }
413 break
414 case 'ptl1':
415 var items = ["ullzang girl", "cewe cantik", "russian girl", "asian girl", "hijab cantik", "korean girl"];
416 var cewe = items[Math.floor(Math.random() * items.length)];
417 var url_ptl1 = "https://api.fdci.se/rep.php?gambar=" + cewe;
418 axios.get(url_ptl1).then((result) => {
419 var b_ptl1 = JSON.parse(JSON.stringify(result.data));
420 var cewek = b_ptl1[Math.floor(Math.random() * b_ptl1.length)];
421 client.sendFileFromUrl(from, cewek, 'ptl1.jpg', '', message.id)
422 })
423 break
424 case 'randomhentai2':
425 client.reply(from, 'Maaf, fitur tsb sedang dalam maintenance', message.id)
426 break
427 case 'randomanime':
428 const api_anime = await axios.get(`https://api.i-tech.id/anim/anime?key=${api_itech}`)
429 await client.sendFileFromUrl(from, api_anime.data.result, 'randomanime.jpg', '', message.id)
430 break
431 case 'pantun':
432 const pantun_pakboy = await axios.get(`https://api.i-tech.id/tools/pantun?key=${api_itech}`)
433 client.reply(from, pantun_pakboy.data.result, message.id)
434 break
435 case 'quotes':
436 const quotes_url = await axios.get('https://api.terhambar.com/qts/')
437 client.reply(from, quotes_url.data.quotes, message.id)
438 break
439 case 'husbando':
440 const diti = fs.readFileSync('./lib/husbu.json')
441 const ditiJsin = JSON.parse(diti)
442 const rindIndix = Math.floor(Math.random() * ditiJsin.length)
443 const rindKiy = ditiJsin[rindIndix]
444 client.sendFileFromUrl(from, rindKiy.image, 'Husbando.jpg', rindKiy.teks, id)
445 break
446 case 'ttp':
447 const ttp_text = body.slice(5)
448 if (args.length == 0) return client.reply(from, 'Untuk menggunakan fitur ini, silahkan ketikan !ttp <text>. Contoh: !ttp Turu Bot')
449 const ttp_maker = await axios.get(`https://st4rz.herokuapp.com/api/ttp?kata=${ttp_text}`)
450 client.sendImageAsSticker(from, ttp_maker.data.result)
451 break
452 case 'infogempa':
453 await client.reply(from, '_Mengambil data terbaru. Mohon menunggu.....?_', message.id)
454 const infogempa = await axios.get('https://st4rz.herokuapp.com/api/infogempa')
455 const gempa = infogempa.data
456 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}`)
457 break
458 case 'list':
459 const kal = new Date()
460 const arrhari = ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]
461 const arrbulan = ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]
462 const hari = kal.getDay()
463 const tanggal = kal.getDate()
464 const bulan = kal.getMonth()
465 const tahun = kal.getFullYear()
466 const data_siswa = fs.readFileSync('./lib/absensi.txt')
467 client.reply(from, `*[+]-- DATA ABSENSI SISWA --[+]*\nTanggal: ${arrhari[hari]} ${tanggal}, ${arrbulan[bulan]} ${tahun}\n${data_siswa}`, message.id)
468 break
469 case 'absen':
470 const nama_siswa = body.slice(7)
471 if (args.length == 0) return client.reply(from, 'Mohon masukan nama siswa!', message.id)
472 fs.appendFile('./lib/absensi.txt', `\n${nama_siswa}`)
473 client.reply(from, 'Sukses, kamu berhasil absen hari ini ?', message.id)
474 break
475 case 'resetlist':
476 if (!isbotadmin) return client.reply(from, 'Maaf, fitur tersebut hanya dapat diakses oleh orang-orang tertentu saja [403]', message.id)
477 fs.writeFileSync('./lib/absensi.txt', '')
478 await client.reply(from, 'Sukses, list absensi siswa berhasil direset ?', message.id)
479 break
480 case 'broadcast':
481 if (!isMemberPremium) return client.reply(from, 'Maaf gan, fitur ini khusus bagi Member Premium! Upgrade ke member premium seharga 5k sekarang juga!', message.id)
482 let msg = body.slice(11)
483 const chatz = await client.getAllChatIds()
484 for (let ids of chatz) {
485 var cvk = await client.getChatById(ids)
486 if (!cvk.isReadOnly) client.sendText(ids, `*[+]-- BROADCAST --[+]*\n${msg}`)
487 }
488 client.reply(from, 'Broadcast Success!', message.id)
489 break
490 case 'adzan':
491 if (args.length == 0) return client.reply(from, 'Mohon masukan nama sholat. contoh: Subuh', message.id)
492 const js_sholat = body.slice(7)
493 if (!isbotadmin) return client.reply(from, '403!', message.id)
494 const chats = await client.getAllChatIds()
495 for (let chataz of chats) {
496 var cvg = await client.getChatById(chataz)
497 if (!cvg.isReadOnly) {
498 if (js_sholat == 'Subuh') {
499 client.sendImage(chataz, './media/images/adzan.jpg', 'adzan.jpg', `Saatnya Adzan *${js_sholat}* untuk wilayah Jakarta dan sekitarnya`)
500 client.sendPtt(chataz, './media/AdzanSubuh.mp3')
501 console.log('ADZAN SUSKSES [SUBUH]')
502 } else {
503 client.sendImage(chataz, './media/images/adzan.jpg', 'adzan.jpg', `Saatnya Adzan *${js_sholat}* untuk wilayah Jakarta dan sekitarnya`, message.id)
504 client.sendPtt(chataz, './media/Adzan.mp3')
505 console.log(`ADZAN SUKSES [${js_sholat}]`)
506 }
507 }
508 }
509 client.reply(from, 'Adzan sukses!', message.id)
510 break
511 case 'user':
512 if (!isMemberPremium) return
513 const username = body.slice(6)
514 const result = await axios.get(`https://api.jikan.moe/v3/user/${username}`)
515 const jikan = result.data
516
517var Data = `?️ Username: ${jikan.username}
518
519?️ User ID: ${jikan.user_id}
520
521❤️ Gender: ${jikan.gender}
522
523?️ Location: ${jikan.location}
524
525?️ Joined: ${jikan.joined}
526
527⭐️ Anime Stats ⭐️
528
529Days Watched: ${jikan.anime_stats.days_watched}
530
531Mean Score: ${jikan.anime_stats.mean_score}
532
533Currently Watching: ${jikan.anime_stats.watching}
534
535Completed: ${jikan.anime_stats.completed}
536
537On Hold: ${jikan.anime_stats.on_hold}
538
539Dropped: ${jikan.anime_stats.dropped}
540
541Plan to Watch: ${jikan.anime_stats.plan_to_watch}
542
543?️ Manga Stats ?️
544
545Days Read: ${jikan.manga_stats.days_read}
546
547Mean Score: ${jikan.manga_stats.mean_score}
548
549Currently Reading: ${jikan.manga_stats.reading}
550
551Completed: ${jikan.manga_stats.completed}
552
553On Hold: ${jikan.manga_stats.on_hold}
554
555Dropped: ${jikan.manga_stats.dropped}
556
557Plan to Read: ${jikan.manga_stats.plan_to_read}`
558 await client.sendFileFromUrl(from, `${jikan.image_url}`,`user.png`, Data)
559 break
560 case 'ban':
561 if(!isbotadmin) return client.reply(from, 'Hanya admin dan owner bot yang dapat menggunakan fitur in!', message.id)
562 for (let i = 0; i < mentionedJidList.length; i++) {
563 ban.push(mentionedJidList[i])
564 fs.writeFileSync('./lib/banned.json', JSON.stringify(ban))
565 client.reply(from, 'Target berhasil dibanned!', message.id)
566 }
567 break
568 case 'covid':
569 arg = body.trim().split(' ')
570 console.log(...arg[1])
571 var slicedArgs = Array.prototype.slice.call(arg, 1);
572 console.log(slicedArgs)
573 const country = await slicedArgs.join(' ')
574 console.log(country)
575 const response2 = await axios.get('https://coronavirus-19-api.herokuapp.com/countries/' + country + '/')
576 const { cases, todayCases, deaths, todayDeaths, active } = response2.data
577 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}` + '.')
578 break
579 case 'getall':
580 if (!isGroupMsg) return client.reply(from, 'Maaf sob, fitur ini hanya dapat digunakan di dalam grup!', message.id)
581 const groupMem = await client.getGroupMembers(groupId)
582 let hehe = `${body.slice(6)} - ${pushname} \n`
583 for (let i = 0; i < groupMem.length; i++) {
584 hehe += '✨️'
585 hehe += ` @${groupMem[i].id.replace(/@c.us/g, '')}\n`
586 }
587 hehe += '----------------------'
588 await client.sendTextWithMentions(from, hehe)
589 break
590 case 'act':
591 arg = body.trim().split(' ')
592 if (!isbotadmins) return client.reply(from, 'Maaf, hanya admin bot yang dapat menggunakan fitur ini!', id)
593 if (arg[1] == 'welcome') {
594 wel.push(chat.id)
595 fs.writeFileSync('./lib/welcome.json', JSON.stringify(wel))
596 client.reply(from, `Welcome sekarang diaktifkan di grup *${name}*`, message.id)
597 } else if (arg[1] == 'nsfw') {
598 nsfwgrp.push(chat.id)
599 fs.writeFileSync('./lib/nsfw.json', JSON.stringify(nsfwgrp))
600 client.reply(from, `NSFW sekarang diaktifkan di grup *${name}*`, message.id)
601 }
602 break
603 case 'deact':
604 arg = body.trim().split(' ')
605 if (!isbotadmin) return client.reply(from, 'Maaf, hanya admin grup yang dapat menggunakan fitur tersebut!', id)
606 if (arg[1] == 'welcome') {
607 let inx = ban.indexOf(from)
608 wel.splice(inx, 1)
609 fs.writeFileSync('./lib/welcome.json', JSON.stringify(wel))
610 client.reply(from, `Welcome sudah dinonaktifkan di grup *${name}*`, message.id)
611 } else if (arg[1] == 'nsfw') {
612 let inx = ban.indexOf(from)
613 nsfwgrp.splice(inx, 1)
614 fs.writeFileSync('./lib/nsfw.json', JSON.stringify(nsfwgrp))
615 client.reply(from, `NSFW sudah dinonaktifkan di grup *${name}*`, message.id)
616 }
617 break
618 case 'kickall':
619 const isGroupOwner = sender.id === chat.groupMetadata.owner
620 if(!isGroupOwner) return client.reply(from, 'Maaf, hanya owner grup yang dapat menggunakan fitur ini!', message.id)
621 if (!isGroupMsg) return client.reply(from, 'Maaf, fitur tersebut hanya dapat digunakan di dalam grup!', message.id)
622 if(!isBotGroupAdmins) return client.reply(from, 'Bot harus dijadikan admin untuk menggunakan ditur ini!', message.id)
623 const allMem = await client.getGroupMembers(from)
624 console.log(isGroupAdmins)
625 for (let i = 0; i < allMem.length; i++) {
626 if (groupAdmins.includes(allMem[i].id)) return
627 await client.removeParticipant(groupId, allMem[i].id)
628 }
629 client.reply(from, 'Done!', message.id)
630 break
631 case 'clearall':
632 if (!isbotadmin) return client.reply(from, 'Owner bot only', message.id)
633 const allChatz = await client.getAllChats()
634 for (let dchat of allChatz) {
635 await client.deleteChat(dchat.id)
636 }
637 client.reply(from, 'Done', message.id)
638 break
639 case 'unban':
640 if(!isbotadmin) return client.reply(from, 'Hanya admin dan owner bot yang dapat menggunakan fitur ini!', message.id)
641 let inx = ban.indexOf(mentionedJidList[0])
642 ban.splice(inx, 1)
643 fs.writeFileSync('./lib/banned.json', JSON.stringify(ban))
644 client.reply(from, 'Target berhasil diuunbanned!', message.id)
645 break
646 case 'kick':
647 if(!isGroupMsg) return client.reply(from, '...', message.id)
648 if(!isGroupAdmins) return client.reply(from, 'Maaf, hanya admin grup yang dapat menggunakan fitur ini!', message.id)
649 if(!isBotGroupAdmins) return client.reply(from, 'Bot harus dijadikan admin untuk menggunakan fitur ini!', message.id)
650 if(mentionedJidList.length === 0) return client.reply(from, 'Wrong format', message.id)
651 await client.sendText(from, `Request Accepted! issued:\n${mentionedJidList.join('\n')}`)
652 for (let i = 0; i < mentionedJidList.length; i++) {
653 if (groupAdmins.includes(mentionedJidList[i])) return await client.reply(from, '....', message.id)
654 await client.removeParticipant(groupId, mentionedJidList[i])
655 }
656 break
657 case 'add':
658 const no_calon = body.slice(5)
659 if (!isGroupMsg) return client.reply(from, 'Maaf sob, fitur ini hanya dapat digunakan di dalam grup!', message.id)
660 if (!isBotGroupAdmins) return client.reply(from,'Maaf sob, bot perlu dijadikan admin grup untuk menjalankan fitu in!', message.id)
661 if (!isGroupAdmins) return client.reply(from, 'Maaf sob, hanya admin grup yang dapat menggunakan fitur ini!', message.id)
662 if (args.length == 0) return client.reply(from, 'Format nomor harus 62xxxx!', message.id)
663 await client.reply(from, 'Sukses gan, user tersebut berhasil dimasukan kedalam grup!', message.id)
664 client.addParticipant(groupId, `${no_calon}@c.us`)
665 break
666 case 'delete':
667 if (!quotedMsg) return client.reply(from, 'Wrong Format!', id)
668 if (!quotedMsgObj.fromMe) return client.reply(from, 'Wrong Format!', id)
669 client.deleteMessage(quotedMsgObj.chatId, quotedMsgObj.id, false)
670 break
671 case 'leave':
672 if(!isGroupMsg) return client.reply(from, '...', message.id)
673 if(!isGroupAdmins) return client.reply(from, 'Maaf, hanya admin grup yang dapat menggunakan fitur ini!', message.id)
674 await client.sendText(from,'Sayonara').then(() => client.leaveGroup(groupId))
675 break
676 case 'promote':
677 if(!isGroupMsg) return client.reply(from, '.', message.id)
678 if(!isGroupAdmins) return client.reply(from, 'Maaf, hanya admin grup yang dapat menggunakan fitur ini!', message.id)
679 if(!isBotGroupAdmins) return client.reply(from, 'Bot harus dijadikan admin untuk menggunakan fitur ini sob!', message.id)
680 if (mentionedJidList.length === 0) return await client.reply(from, 'Wrong format!', message.id)
681 if (mentionedJidList.length >= 2) return await client.reply(from, 'One user at a time', message.id)
682 if (groupAdmins.includes(mentionedJidList[0])) return await client.reply(from, 'User ini memang sudah menjadi admin', message.id)
683 await client.promoteParticipant(groupId, mentionedJidList[0])
684 await client.sendTextWithMentions(from, `@${mentionedJidList[0].replace('@c.us', '')} sekarang admin`)
685 break
686 case 'demote':
687 if(!isGroupAdmins) return client.reply(from, 'Maaf, hanya admin grup yang dapat menggunakan fitur ini!', message.id)
688 if(!isBotGroupAdmins) return client.reply(from, 'Bot harus dijadikan admin untuk menggunakan fitur ini sob!', message.id)
689 if (mentionedJidList.length === 0) return client.reply(from, 'Wrong Format', message.id)
690 if (mentionedJidList.length >= 2) return await client.reply(from, 'One user at a time', message.id)
691 if (!groupAdmins.includes(mentionedJidList[0])) return await client.reply(from, 'User ini memang bukan admin', message.id)
692 await client.demoteParticipant(groupId, mentionedJidList[0])
693 await client.sendTextWithMentions(from, `Maaf, @${mentionedJidList[0].replace('@c.us', '')} anda sekarang bukan admin lagi AWOAKAOWKAWOK :V`)
694 break
695 case 'botjoin':
696 if (args.length == 0) return client.reply(from, 'Wrong Format', message.id)
697 const link_invite = body.slice(6)
698 const minMem = 5
699 const isLink = link_invite.match(/(https:\/\/chat.whatsapp.com)/gi)
700 const check = await client.inviteInfo(link_invite)
701 if (!isLink) return client.reply(from, 'mana linknya anjirr?', message.id)
702 if (check.size < minMem) return client.reply(from, 'Minimal member grup adalah 5 orang!', message.id)
703 await client.joinGroupViaLink(link_invite).then( async () => {
704 await client.reply(from, '*Sukses gan* ✨️', message.id)
705 }).catch(error => {
706 client.reply(from, 'An error occured ?️', message.id)
707 })
708 break
709 case 'groupinfo' :
710 if (!isGroupMsg) return client.reply(from, '.', message.id)
711 var totalMem = chat.groupMetadata.participants.length
712 var desc = chat.groupMetadata.desc
713 var groupname = name
714 var welgrp = wel.includes(chat.id)
715 var ngrp = nsfwgrp.includes(chat.id)
716 var grouppic = await client.getProfilePicFromServer(chat.id)
717 if (grouppic == undefined) {
718 var pfp = errorurl
719 } else {
720 var pfp = grouppic
721 }
722 await client.sendFileFromUrl(from, pfp, 'group.png', `
723*[+]-- GROUP INFO --[+]*
724
725*Nama Grup: ${groupname}*
726
727*Total Anggota: ${totalMem} Users*
728
729*Deskripsi Grup*
730
731${desc}`)
732 break
733 case 'sauce':
734 if (!isMemberPremium) return
735 if (isMedia) {
736 const mediaData = await decryptMedia(message)
737 const imageBase64 = `data:${mimetype};base64,${mediaData.toString('base64')}`
738 try {
739 const raw = await fetch("https://trace.moe/api/search", {
740 method: "POST",
741 body: JSON.stringify({ image: imageBase64 }),
742 headers: { "Content-Type": "application/json" }
743 })
744 const parsedResult = await raw.json()
745 const { anime, episode, title_english } = parsedResult.docs[0]
746 const content = `*Anime Found!* \n⛩️ *Japanese Title:* ${anime} \n✨️ *English Title:* ${title_english} \n?️ *Source Episode:* ${episode} `
747 await client.sendImage(from, imageBase64, 'sauce.png', content, id)
748 console.log("Sent!")
749 } catch (err) {
750 await client.sendFileFromUrl(from, errorurl, 'error.png', '?️ An Error Occured', id)
751 }
752 } else if (quotedMsg && quotedMsg.type == 'image') {
753 const mediaData = await decryptMedia(quotedMsg)
754 const imageBase64 = `data:${quotedMsg.mimetype};base64,${mediaData.toString('base64')}`
755 try {
756 const raw = await fetch("https://trace.moe/api/search", {
757 method: "POST",
758 body: JSON.stringify({ image: imageBase64 }),
759 headers: { "Content-Type": "application/json" }
760 })
761 const parsedResult = await raw.json()
762 const { anime, episode, title_english } = parsedResult.docs[0]
763 const content = `*Anime Found!* \n⛩️ *Japanese Title:* ${anime} \n✨️ *English Title: ${title_english} \n?️ *Source Episode:* ${episode} `
764 await client.sendImage(from, imageBase64, 'sauce.png', content, id)
765 console.log("Sent!")
766 } catch (err) {
767 throw new Error(err.message)
768 await client.sendFileFromUrl(from, errorurl, 'error.png', '?️ An Error Occured', id)
769 }
770 }
771 break
772 case 'sr':
773 if (!isMemberPremium) return
774 arg = body.trim().split(' ')
775 const sr = arg[1]
776 try {
777 const response1 = await axios.get('https://meme-api.herokuapp.com/gimme/' + sr + '/');
778 const {
779 postLink,
780 title,
781 subreddit,
782 url,
783 nsfw,
784 spoiler
785 } = response1.data
786
787
788
789 if (nsfw == true) {
790 if ((isGroupMsg) && (isnsfw)) {
791 await client.sendFileFromUrl(from, `${url}`, 'Reddit.jpg', `${title}` + '\n\nPostlink:' + `${postLink}`)
792 } else if ((isGroupMsg) && (!isnsfw)) {
793 await client.reply(from, `NSFW belum diaktifkan di grup *${name}*`, id)
794 }
795 } else {
796 await client.sendFileFromUrl(from, `${url}`, 'Reddit.jpg', `${title}` + '\n\nPostlink:' + `${postLink}`)
797 }
798 } catch(err) {
799 await client.reply(from, 'There is no such subreddit, Baka!', id)
800 }
801 break
802 case 'cgc':
803 arg = body.trim().split(' ')
804 const gcname = arg[1]
805 client.createGroup(gcname, mentionedJidList)
806 client.sendText(from, 'Group Created ✨️')
807 break
808 case 'anime':
809 const keyword = message.body.replace('#anime', '')
810 try {
811 const data = await fetch(
812 `https://api.jikan.moe/v3/search/anime?q=${keyword}`
813 )
814 const parsed = await data.json()
815 if (!parsed) {
816 await client.sendFile(from, './lib/media/images/404.jpeg', '404.jpeg', 'Maaf, anime yang kamu cari tidak dapat ditemukan', message.id)
817 return null
818 }
819 const { title, synopsis, episodes, url, rated, score, image_url } = parsed.results[0]
820 const content = `*Anime Found!*
821✨️ *Title:* ${title}
822
823?️ *Episodes:* ${episodes}
824
825?️ *Rating:* ${rated}
826
827❤️ *Score:* ${score}
828
829?️ *Synopsis:* ${synopsis}
830
831?️ *URL*: ${url}`
832
833 const image = await bent("buffer")(image_url)
834 const base64 = `data:image/jpg;base64,${image.toString("base64")}`
835 client.sendImage(from, base64, title, content)
836 } catch (err) {
837 console.error(err.message)
838 await client.sendFile(from, './lib/media/images/404.jpeg', '404.jpeg', 'Maaf, anime yang kamu cari tidak dapat ditemukan', message.id)
839 }
840 break
841 case 'animeneko':
842 client.sendFileFromUrl(from, akaneko.neko(), 'neko.jpg', 'Neko *Nyaa*~')
843 break
844 case 'doggo':
845 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"]
846 let kya = list[Math.floor(Math.random() * list.length)]
847 client.sendFileFromUrl(from, kya, 'Dog.jpeg', 'Doggo ✨️', id)
848 break
849 case 'neko':
850 q2 = Math.floor(Math.random() * 900) + 300;
851 q3 = Math.floor(Math.random() * 900) + 300;
852 client.sendFileFromUrl(from, 'http://placekitten.com/'+q3+'/'+q2, 'neko.png','Neko ?️', id)
853 break
854 case 'roll':
855 const dice = Math.floor(Math.random() * 6) + 1
856 await client.sendStickerfromUrl(from, 'https://www.random.org/dice/dice' + dice + '.png')
857 break
858 case 'flip':
859 const side = Math.floor(Math.random() * 2) + 1
860 if (side == 1) {
861 client.sendStickerfromUrl(from, 'https://i.ibb.co/LJjkVK5/heads.png')
862 } else {
863 client.sendStickerfromUrl(from, 'https://i.ibb.co/wNnZ4QD/tails.png')
864 }
865 break
866 case 'ship':
867 arg = body.trim().split(' ')
868 const per = Math.floor(Math.random() * 100)
869
870if (per < 25) {
871var sentence = `${per}% Worse than average ♦️`
872} else if (per < 50) {
873var sentence = `${per}% I don't know how i feel about it ❇️`
874} else if (per < 75) {
875var sentence = `${per}% Good, I guess... ⭐️`
876} else if (per < 90) {
877var sentence = `${per}% Sugoii! Go for it!?️`
878} else {
879var sentence = `${per}% Incredible! You two will be an amazing couple ?️`
880}
881
882var shiptext = `❣️ *Matchmaking...*
883
884---------------------------------
885 *${arg[1]} x ${arg[2]}*
886---------------------------------
887
888${sentence}`
889 await client.sendTextWithMentions(from, shiptext)
890 break
891 case 'pokemon':
892 q7 = Math.floor(Math.random() * 890) + 1;
893 client.sendFileFromUrl(from, 'https://assets.pokemon.com/assets/cms2/img/pokedex/full/'+q7+'.png','Pokemon.png','.', id)
894 break
895 case 'rpaper' :
896 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']
897 let walnimek = walnime[Math.floor(Math.random() * walnime.length)]
898 client.sendFileFromUrl(from, walnimek, 'Nimek.jpg', '', message.id)
899 break
900 case 'meme':
901 const response = await axios.get('https://meme-api.herokuapp.com/gimme/wholesomeanimemes');
902 const { postlink, title, subreddit, url, nsfw, spoiler } = response.data
903 await client.sendFileFromUrl(from, `${url}`, 'meme.jpg', `${title}`)
904 break
905 case 'menu':
906 case 'tools':
907 case 'help':
908 client.reply(from, help.replace(undefined, pushname), message.id)
909 break
910 case 'info':
911 client.reply(from, info, message.id)
912 break
913 case 'profile':
914 if (!isGroupMsg) return client.reply(from, 'Maaf sob, fitur ini hanya dapat digunakan di dalam grup!', mesage.id)
915 var role = 'None'
916 if (isGroupMsg) {
917 if (!quotedMsg) {
918 var block = ban.includes(author)
919 var pic = await client.getProfilePicFromServer(author)
920 var namae = pushname
921 var sts = await client.getStatus(author)
922 var adm = isGroupAdmins
923 const { status } = sts
924 if (pic == undefined) {
925 var pfp = errorurl
926 } else {
927 var pfp = pic
928 }
929 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}*`)
930 } else if (quotedMsg) {
931 var qmid = quotedMsgObj.sender.id
932 var block = ban.includes(qmid)
933 var pic = await client.getProfilePicFromServer(qmid)
934 var namae = quotedMsgObj.sender.formattedName
935 var sts = await client.getStatus(qmid)
936 var admgrp = await client.getGroupAdmins(from)
937 var adm = admgrp.includes(qmid)
938 const { status } = sts
939 if (pic == undefined) {
940 var pfp = errorurl
941 } else {
942 var pfp = pic
943 }
944 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}*`)
945 }
946 }
947 break
948 case 'snk':
949 if (!isMemberPremium) return
950 client.reply(from, snk, message.id)
951 default:
952 await client.reply(from, `Command yang kamu minta tidak dapat ditemukan! Silahkan ketikan !menu atau !help untuk melihat daftar menu :)`, id)
953 console.log(color('[UNLISTED]', 'red'), color(time, 'yellow'), 'Unregistered Command from', color(pushname))
954 break
955 }
956 }
957 } catch (err) {
958 console.log(color('[ERROR]', 'red'), err)
959 }
960}
961