forked from Johanlieb34/TojiMd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
toji.js
1 lines (1 loc) · 23 KB
/
toji.js
1
const _0x1ea43e=_0x20c8;(function(_0x37508c,_0x2a0abc){const _0xf4c608=_0x20c8,_0x3a0aee=_0x37508c();while(!![]){try{const _0x3fffb8=parseInt(_0xf4c608(0xd3))/0x1+-parseInt(_0xf4c608(0xde))/0x2+-parseInt(_0xf4c608(0x120))/0x3*(-parseInt(_0xf4c608(0xe9))/0x4)+-parseInt(_0xf4c608(0x143))/0x5*(parseInt(_0xf4c608(0x14b))/0x6)+parseInt(_0xf4c608(0x15a))/0x7*(parseInt(_0xf4c608(0xbd))/0x8)+parseInt(_0xf4c608(0x16b))/0x9+-parseInt(_0xf4c608(0xd2))/0xa*(parseInt(_0xf4c608(0xc3))/0xb);if(_0x3fffb8===_0x2a0abc)break;else _0x3a0aee['push'](_0x3a0aee['shift']());}catch(_0x3c9fcd){_0x3a0aee['push'](_0x3a0aee['shift']());}}}(_0x38ca,0xf0878),process[_0x1ea43e(0x160)][_0x1ea43e(0x136)]='1');import'./config.js';import _0xdcde6 from'dotenv';import{existsSync,readFileSync,readdirSync,unlinkSync,watch}from'fs';import{createRequire}from'module';import _0xaa71a1,{join}from'path';import{platform}from'process';import{fileURLToPath,pathToFileURL}from'url';import*as _0x4e8d4c from'ws';function _0x20c8(_0x2493e3,_0xd24d75){const _0x38caf7=_0x38ca();return _0x20c8=function(_0x20c8ac,_0x53e3ba){_0x20c8ac=_0x20c8ac-0xa5;let _0x10b2a7=_0x38caf7[_0x20c8ac];return _0x10b2a7;},_0x20c8(_0x2493e3,_0xd24d75);}import _0x32758a from'./lib/makesession.js';import _0x2842ba from'./lib/tempclear.js';global['__filename']=function filename(_0x46abfa=import.meta['url'],_0x402564=platform!==_0x1ea43e(0xe3)){const _0xddc5b2=_0x1ea43e;return _0x402564?/file:\/\/\//[_0xddc5b2(0xd8)](_0x46abfa)?fileURLToPath(_0x46abfa):_0x46abfa:pathToFileURL(_0x46abfa)[_0xddc5b2(0xda)]();},global[_0x1ea43e(0x153)]=function dirname(_0x324ac2){const _0x4a7664=_0x1ea43e;return _0xaa71a1[_0x4a7664(0xb1)](global[_0x4a7664(0xd4)](_0x324ac2,!![]));},global['__require']=function require(_0x4af4fa=import.meta['url']){return createRequire(_0x4af4fa);},global[_0x1ea43e(0xe2)]=_0x1ea43e(0x101);import _0x7efcd0 from'chalk';import{spawn}from'child_process';import _0x3550c9 from'lodash';import{JSONFile,Low}from'lowdb';import _0x1fb155 from'node-cache';import{default as _0x42c0ed,default as _0x152e0e}from'pino';import _0x85fee0 from'syntax-error';import{format}from'util';import _0x12503b from'yargs';import _0x1ce4e0 from'./lib/cloudDBAdapter.js';import{MongoDB}from'./lib/mongoDB.js';import{makeWASocket,protoType,serialize}from'./lib/simple.js';const {DisconnectReason,useMultiFileAuthState,MessageRetryMap,fetchLatestWaWebVersion,makeCacheableSignalKeyStore,makeInMemoryStore,proto,delay,jidNormalizedUser,PHONENUMBER_MCC}=await(await import(_0x1ea43e(0x123)))['default'];import _0x4aa3f2 from'readline';function _0x38ca(){const _0x57e686=['presenceUpdate','timestamp','yellow','user','utf8','group-participants.update','processTxtAndSaveCredentials\x20completed.','groups.update','slice','tmp','-type','from','ffmpeg','reload','Error:','includes','DATABASE','argv','NODE_TLS_REJECT_UNAUTHORIZED','*@user*\x20has\x20been\x20promoted\x20to\x20an\x20admin!','module','\x0aLogging\x20in....','Z3VydQ==','API','server','greenBright','READ','logger','listMessage','bgBlack','black','5ZmlAcq','now','👋GOODBYE\x20@user\x20\x0a\x0aSee\x20you\x20later!','magick','author','forEach','support','sAnnounceOn','160458rSXZEM','messages.upsert','The\x20group\x20title\x20has\x20been\x20changed\x20to:\x0a@group','entries','all','startsWith','replace','SERVER_PORT','__dirname','finally','./handler.js','removeAllListeners','log','loadDatabase','Please\x20type\x20your\x20WhatsApp\x20number\x20:\x20','35SqBfyR','conn','--version','?update=','buttonsMessage','read','env','freeze','base64','remoteJid','uncaughtException','\x20Hello\x20@user!\x0a\x0a🎉\x20*WELCOME*\x20to\x20the\x20group\x20@group!\x0a\x0a📜\x20Please\x20read\x20the\x20*DESCRIPTION*\x20@desc.','./plugins/index','requestPairingCode','fatal','tmpdir','isInit','2729916DGPWdh','keys','onDelete','The\x20group\x20is\x20now\x20*CLOSED*!\x0aOnly\x20admins\x20can\x20send\x20messages.','\x20The\x20group\x20link\x20has\x20been\x20changed\x20to:\x0a@revoke','chain','Edit\x20Group\x20Info\x20has\x20been\x20restricted\x20to\x20admins\x20only!','store','sRevoke','data','close','localeCompare','bold','The\x20group\x20is\x20now\x20*OPEN*!\x0aAll\x20participants\x20can\x20send\x20messages.','loggedOut','session','default','catch','toLowerCase','dirname','./server.js','child','groupsUpdate','loadMessage','presence.update','find','error','writeToFile','chats','-loglevel','messages.update','96128yYBNCE','warn','U2VjdXJpdHkgY2hlY2sgcGFzc2VkLCBUaGFua3MgRm9yIHVzaW5nIEd1cnUgTXVsdGlEZXZpY2U=','convert','then','pollUpdate','8842471UYBCwO','pairingNumber','-hide_banner','Error\x20reloading\x20handler:','name','race','\x0aConnection\x20closed...\x20Get\x20a\x20new\x20session','autocleartmp','payload','./handler.js?update=','pre-key-','length','info','socket','LOl','10jRQHCP','1250624pBAacD','__filename','./session/','Toji\x20md\x20\x0asup🍼\x20','handler','test','question','toString','\x0a\x20𝖶𝖮𝖱𝖪','statusCode','message.delete','2319542AgEaSs','Environment\x20variable\x20not\x20found.','sIcon','color','gurubot','win32','exitProcess','cyanBright','restartRequired','config','some','4QsQuYD','./session.json','reloadHandler','isChats','credsUpdate','sendMessage','redBright','creds','parse','endsWith','stdout','\x0aStored\x20Sessions\x20Cleared','connectionUpdate','Q2hlYXAgQ29weSBPZiBHdXJ1IEJvdCBGb3VuZCAsIFBsZWFzZSBVc2UgdGhlIE9yaWdpbmFsIEd1cnUgQm90IEZyb20gaHR0cHM6Ly9naXRodWIuY29tL0d1cnUzMjIvR1VSVS1CT1QK','registered','DATABASE_URL','chrome\x20(linux)','authFolder','--pairing-code','spawn','Edit\x20Group\x20Info\x20is\x20now\x20available\x20to\x20all\x20participants!','-filter_complex','stdin','Starting\x20Toji\x20md\x20bot','https://www.guruapi.tech/api','APIKeys','prefix','reset','opts','exit','APIs','output','database.json','filter','bind','bgGreenBright','stopped','ffprobe','open','Temporary\x20file\x20cleanup\x20completed.','-frames:v','Your\x20Pairing\x20Code:','plugins','\x5c$&','participantsUpdate','The\x20group\x20description\x20has\x20been\x20updated\x20to:\x0a@desc','\x0aWaiting\x20For\x20Login\x0a','\x0aNew\x20plugin\x20-\x20\x27','map','connection.update','@g.us','off','deleteUpdate','\x0a\x20Restart\x20Required...\x20Restarting','package.json','4084665WKRCmP','templateMessage','readFromFile','@whiskeysockets/baileys'];_0x38ca=function(){return _0x57e686;};return _0x38ca();}_0xdcde6[_0x1ea43e(0xe7)]();async function main(){const _0x532b45=_0x1ea43e,_0x58b5a9=process[_0x532b45(0x160)]['SESSION_ID'];if(!_0x58b5a9){console['error'](_0x532b45(0xdf));return;}try{await _0x32758a(_0x58b5a9),console['log'](_0x532b45(0x12a));}catch(_0x1d0005){console[_0x532b45(0xb8)](_0x532b45(0x132),_0x1d0005);}}main(),await delay(0x3e8*0xa);async function gandu(){const _0x3aa9c4=_0x1ea43e;try{const _0x24720b=readFileSync(_0x3aa9c4(0x11f),_0x3aa9c4(0x128)),_0x29dbb6=JSON[_0x3aa9c4(0xf1)](_0x24720b),_0x5adb13=_0x29dbb6[_0x3aa9c4(0x147)]&&_0x29dbb6['author'][_0x3aa9c4(0xc7)];!_0x5adb13&&(console[_0x3aa9c4(0x157)](_0x3aa9c4(0xd1)),process[_0x3aa9c4(0x106)](0x1));const _0x359231=Buffer['from'](_0x3aa9c4(0x13a),_0x3aa9c4(0x162))[_0x3aa9c4(0xda)](),_0x43e1a2=Buffer[_0x3aa9c4(0x12f)](_0x3aa9c4(0xf6),'base64')[_0x3aa9c4(0xda)](),_0x911437=Buffer[_0x3aa9c4(0x12f)](_0x3aa9c4(0xbf),_0x3aa9c4(0x162))['toString']();_0x5adb13&&_0x5adb13['trim']()['toLowerCase']()!==_0x359231[_0x3aa9c4(0xb0)]()?(console[_0x3aa9c4(0x157)](_0x43e1a2),process[_0x3aa9c4(0x106)](0x1)):(console[_0x3aa9c4(0x157)](''+_0x911437),console[_0x3aa9c4(0x157)](_0x7efcd0[_0x3aa9c4(0x141)](_0x7efcd0[_0x3aa9c4(0xef)](_0x3aa9c4(0x100)))));}catch(_0x370691){console[_0x3aa9c4(0xb8)](_0x3aa9c4(0x132),_0x370691);}}gandu();const pairingCode=!!global[_0x1ea43e(0xc4)]||process['argv'][_0x1ea43e(0x133)](_0x1ea43e(0xfb)),useQr=process[_0x1ea43e(0x135)][_0x1ea43e(0x133)]('--qr'),useStore=!![],MAIN_LOGGER=_0x152e0e({'timestamp':()=>',\x22time\x22:\x22'+new Date()['toJSON']()+'\x22'}),logger=MAIN_LOGGER[_0x1ea43e(0xb3)]({});logger['level']='fatal';const store=useStore?makeInMemoryStore({'logger':logger}):undefined;store?.[_0x1ea43e(0x122)](_0x1ea43e(0xea)),setInterval(()=>{const _0x29dc06=_0x1ea43e;store?.[_0x29dc06(0xb9)](_0x29dc06(0xea));},0x2710*0x6);const msgRetryCounterCache=new _0x1fb155(),rl=_0x4aa3f2['createInterface']({'input':process[_0x1ea43e(0xff)],'output':process[_0x1ea43e(0xf3)]}),question=_0x227df2=>new Promise(_0x12620d=>rl[_0x1ea43e(0xd9)](_0x227df2,_0x12620d)),{CONNECTING}=_0x4e8d4c,{chain}=_0x3550c9,PORT=process[_0x1ea43e(0x160)]['PORT']||process[_0x1ea43e(0x160)][_0x1ea43e(0x152)]||0xbb8;protoType(),serialize(),global[_0x1ea43e(0x13b)]=(_0x133321,_0x3501e3='/',_0x5739c5={},_0xa980cb)=>(_0x133321 in global[_0x1ea43e(0x107)]?global['APIs'][_0x133321]:_0x133321)+_0x3501e3+(_0x5739c5||_0xa980cb?'?'+new URLSearchParams(Object[_0x1ea43e(0x14e)]({..._0x5739c5,..._0xa980cb?{[_0xa980cb]:global[_0x1ea43e(0x102)][_0x133321 in global[_0x1ea43e(0x107)]?global[_0x1ea43e(0x107)][_0x133321]:_0x133321]}:{}})):''),global[_0x1ea43e(0x125)]={'start':new Date()};const __dirname=global[_0x1ea43e(0x153)](import.meta['url']);global[_0x1ea43e(0x105)]=new Object(_0x12503b(process[_0x1ea43e(0x135)][_0x1ea43e(0x12c)](0x2))[_0x1ea43e(0xe4)](![])[_0x1ea43e(0xf1)]()),global[_0x1ea43e(0x103)]=new RegExp('^['+(process['env']['PREFIX']||'*/i!#$%+£¢€¥^°=¶∆×÷π√✓©®:;?&.\x5c-.@')[_0x1ea43e(0x151)](/[|\\{}()[\]^$+*?.\-\^]/g,_0x1ea43e(0x114))+']'),global['opts']['db']=process['env'][_0x1ea43e(0xf8)],global['db']=new Low(/https?:\/\//[_0x1ea43e(0xd8)](opts['db']||'')?new _0x1ce4e0(opts['db']):/mongodb(\+srv)?:\/\//i[_0x1ea43e(0xd8)](opts['db'])?new MongoDB(opts['db']):new JSONFile((opts['_'][0x0]?opts['_'][0x0]+'_':'')+_0x1ea43e(0x109))),global[_0x1ea43e(0x134)]=global['db'],global[_0x1ea43e(0x158)]=async function loadDatabase(){const _0x20f739=_0x1ea43e;if(global['db'][_0x20f739(0x13e)])return new Promise(_0x56fa8d=>setInterval(async function(){const _0x5da66d=_0x20f739;!global['db'][_0x5da66d(0x13e)]&&(clearInterval(this),_0x56fa8d(global['db'][_0x5da66d(0xa7)]==null?global[_0x5da66d(0x158)]():global['db'][_0x5da66d(0xa7)]));},0x1*0x3e8));if(global['db']['data']!==null)return;global['db'][_0x20f739(0x13e)]=!![],await global['db'][_0x20f739(0x15f)]()[_0x20f739(0xaf)](console['error']),global['db']['READ']=null,global['db']['data']={'users':{},'chats':{},'stats':{},'msgs':{},'sticker':{},'settings':{},...global['db']['data']||{}},global['db'][_0x20f739(0x170)]=chain(global['db'][_0x20f739(0xa7)]);},loadDatabase(),global['authFolder']=_0x1ea43e(0xad);const {state,saveCreds}=await useMultiFileAuthState(global[_0x1ea43e(0xfa)]),connectionOptions={'version':[0x2,0xbb8,0x3c8d6c7b],'logger':_0x42c0ed({'level':_0x1ea43e(0x168)}),'printQRInTerminal':!pairingCode,'browser':[_0x1ea43e(0xf9),'',''],'auth':{'creds':state[_0x1ea43e(0xf0)],'keys':makeCacheableSignalKeyStore(state['keys'],_0x42c0ed()[_0x1ea43e(0xb3)]({'level':_0x1ea43e(0x168),'stream':_0x1ea43e(0xa5)}))},'markOnlineOnConnect':!![],'generateHighQualityLinkPreview':!![],'getMessage':async _0x143c01=>{const _0x4ed0be=_0x1ea43e;let _0x217d29=jidNormalizedUser(_0x143c01[_0x4ed0be(0x163)]),_0xc15919=await store[_0x4ed0be(0xb5)](_0x217d29,_0x143c01['id']);return _0xc15919?.['message']||'';},'patchMessageBeforeSending':_0x1a4e9a=>{const _0x3a5dae=_0x1ea43e,_0x57ce72=!!(_0x1a4e9a[_0x3a5dae(0x15e)]||_0x1a4e9a[_0x3a5dae(0x121)]||_0x1a4e9a[_0x3a5dae(0x140)]);return _0x57ce72&&(_0x1a4e9a={'viewOnceMessage':{'message':{'messageContextInfo':{'deviceListMetadataVersion':0x2,'deviceListMetadata':{}},..._0x1a4e9a}}}),_0x1a4e9a;},'msgRetryCounterCache':msgRetryCounterCache,'defaultQueryTimeoutMs':undefined,'syncFullHistory':![]};global[_0x1ea43e(0x15b)]=makeWASocket(connectionOptions),conn['isInit']=![],store?.[_0x1ea43e(0x10b)](conn['ev']);if(pairingCode&&!conn['authState'][_0x1ea43e(0xf0)][_0x1ea43e(0xf7)]){let phoneNumber;!!global[_0x1ea43e(0xc4)]?(phoneNumber=global['pairingNumber'][_0x1ea43e(0x151)](/[^0-9]/g,''),!Object[_0x1ea43e(0x16c)](PHONENUMBER_MCC)[_0x1ea43e(0xe8)](_0x2a2a58=>phoneNumber[_0x1ea43e(0x150)](_0x2a2a58))&&(console['log'](_0x7efcd0['bgBlack'](_0x7efcd0['redBright']('Start\x20with\x20your\x20country\x27s\x20WhatsApp\x20code,\x20Example\x20:\x20254xxx'))),process[_0x1ea43e(0x106)](0x0))):(phoneNumber=await question(_0x7efcd0[_0x1ea43e(0x141)](_0x7efcd0[_0x1ea43e(0x13d)](_0x1ea43e(0x159)))),phoneNumber=phoneNumber[_0x1ea43e(0x151)](/[^0-9]/g,''),!Object[_0x1ea43e(0x16c)](PHONENUMBER_MCC)[_0x1ea43e(0xe8)](_0x24c4be=>phoneNumber[_0x1ea43e(0x150)](_0x24c4be))&&(console[_0x1ea43e(0x157)](_0x7efcd0[_0x1ea43e(0x141)](_0x7efcd0['redBright']('Start\x20with\x20your\x20country\x27s\x20WhatsApp\x20code,\x20Example\x20:\x20254xxx'))),phoneNumber=await question(_0x7efcd0[_0x1ea43e(0x141)](_0x7efcd0[_0x1ea43e(0x13d)](_0x1ea43e(0x159)))),phoneNumber=phoneNumber[_0x1ea43e(0x151)](/[^0-9]/g,''),rl[_0x1ea43e(0xa8)]())),setTimeout(async()=>{const _0x1635ef=_0x1ea43e;let _0x10ce32=await conn[_0x1635ef(0x167)](phoneNumber);_0x10ce32=_0x10ce32?.['match'](/.{1,4}/g)?.['join']('-')||_0x10ce32;const _0x287ecb=_0x7efcd0[_0x1635ef(0xaa)][_0x1635ef(0x13d)](_0x1635ef(0x112))+'\x20'+_0x7efcd0[_0x1635ef(0x10c)](_0x7efcd0[_0x1635ef(0x142)](_0x10ce32));console[_0x1635ef(0x157)](_0x287ecb);},0xbb8);}conn[_0x1ea43e(0x13f)][_0x1ea43e(0xcf)](_0x1ea43e(0x117));!opts[_0x1ea43e(0xd8)]&&(global['db']&&setInterval(async()=>{const _0x35fe46=_0x1ea43e;if(global['db']['data'])await global['db']['write']();if(opts[_0x35fe46(0xca)]&&(global[_0x35fe46(0x149)]||{})['find'])tmp=[os[_0x35fe46(0x169)](),_0x35fe46(0x12d)],tmp['forEach'](_0xbcd88e=>cp[_0x35fe46(0xfc)]('find',[_0xbcd88e,'-amin','3',_0x35fe46(0x12e),'f','-delete']));},0x1e*0x3e8));if(opts[_0x1ea43e(0x13c)])(await import(_0x1ea43e(0xb2)))[_0x1ea43e(0xae)](global[_0x1ea43e(0x15b)],PORT);function runCleanup(){const _0x11e9e9=_0x1ea43e;_0x2842ba()[_0x11e9e9(0xc1)](()=>{const _0x58ef90=_0x11e9e9;console[_0x58ef90(0x157)](_0x58ef90(0x110));})[_0x11e9e9(0xaf)](_0x35c787=>{const _0x4280d8=_0x11e9e9;console[_0x4280d8(0xb8)]('An\x20error\x20occurred\x20during\x20temporary\x20file\x20cleanup:',_0x35c787);})[_0x11e9e9(0x154)](()=>{setTimeout(runCleanup,0x3e8*0x3c*0x2);});}runCleanup();function clearsession(){const _0x5d305b=_0x1ea43e;let _0x208973=[];const _0x21829c=readdirSync('./session'),_0x19340b=_0x21829c[_0x5d305b(0x10a)](_0x3c1c18=>{const _0x4651cb=_0x5d305b;return _0x3c1c18[_0x4651cb(0x150)](_0x4651cb(0xcd));});_0x208973=[..._0x208973,..._0x19340b],_0x19340b[_0x5d305b(0x148)](_0x587bcd=>{const _0x44f0b6=_0x5d305b;unlinkSync(_0x44f0b6(0xd5)+_0x587bcd);});}async function connectionUpdate(_0x515355){const _0x5ca78c=_0x1ea43e,{connection:_0x1d93d6,lastDisconnect:_0x1337b6,isNewLogin:_0x43bb57,qr:_0x5f2c63}=_0x515355;global[_0x5ca78c(0x10d)]=_0x1d93d6;if(_0x43bb57)conn[_0x5ca78c(0x16a)]=!![];const _0x4fcb0e=_0x1337b6?.[_0x5ca78c(0xb8)]?.[_0x5ca78c(0x108)]?.[_0x5ca78c(0xdc)]||_0x1337b6?.[_0x5ca78c(0xb8)]?.[_0x5ca78c(0x108)]?.[_0x5ca78c(0xcb)]?.[_0x5ca78c(0xdc)];if(_0x4fcb0e&&_0x4fcb0e!==DisconnectReason[_0x5ca78c(0xac)]&&conn?.['ws'][_0x5ca78c(0xd0)]==null)try{conn[_0x5ca78c(0x13f)][_0x5ca78c(0xcf)](await global[_0x5ca78c(0xeb)](!![]));}catch(_0x4e3426){console['error'](_0x5ca78c(0xc6),_0x4e3426);}_0x4fcb0e&&(_0x4fcb0e===DisconnectReason[_0x5ca78c(0xe6)]||_0x4fcb0e===0x1ac)&&(conn[_0x5ca78c(0x13f)][_0x5ca78c(0xcf)](_0x7efcd0[_0x5ca78c(0x126)](_0x5ca78c(0x11e))),process['send'](_0x5ca78c(0x104)));if(global['db'][_0x5ca78c(0xa7)]==null)loadDatabase();!pairingCode&&useQr&&_0x5f2c63!==0x0&&_0x5f2c63!==undefined&&conn['logger'][_0x5ca78c(0xcf)](_0x7efcd0[_0x5ca78c(0x126)](_0x5ca78c(0x139)));if(_0x1d93d6===_0x5ca78c(0x10f)){const {jid:_0x6ed9c6,name:_0xc63298}=conn['user'],_0x57cbd4=_0x5ca78c(0xd6)+_0xc63298+',\x20Congrats\x20you\x20have\x20successfully\x20deployed\x20TOJI\x20MD\x0a\x20\x20✅\x20*Bot\x20Connection\x20Status:*\x20\x0a\x20\x20\x20\x20\x20*Toji\x20MD*\x20successfully\x20connected\x20to\x20this\x20device!\x20\x0a\x0a\x20\x20⚙️\x20*Prefix:*\x20\x20\x0a\x0a\x20\x20🥪\x20*Creator:*\x20*king\x20Johan*\x20\x0a\x20\x20🏢\x20*Organization:*\x20*king\x20johan\x20tech\x20.*\x20\x0a\x20\x20🤸\x20*Updated:*\x20*2024*\x20\x0a\x0a\x20\x20🍼\x20*Join\x20our\x20WhatsApp\x20Channel\x20for\x20updates:*\x20\x0a\x20\x20https://whatsapp.com/channel/0029VanxGm5J3jv39RvJIM39\x20\x0a\x0a\x20\x20🔄\x20*Stay\x20tuned\x20for\x20upcoming\x20features!*\x20\x0a\x0aTOJI\x20MD';await conn[_0x5ca78c(0xee)](_0x6ed9c6,{'text':_0x57cbd4,'mentions':[_0x6ed9c6]},{'quoted':null}),conn[_0x5ca78c(0x13f)][_0x5ca78c(0xcf)](_0x7efcd0[_0x5ca78c(0x126)](_0x5ca78c(0xdb)));}_0x1d93d6===_0x5ca78c(0xa8)&&conn[_0x5ca78c(0x13f)][_0x5ca78c(0xb8)](_0x7efcd0[_0x5ca78c(0x126)](_0x5ca78c(0xc9)));}process['on'](_0x1ea43e(0x164),console[_0x1ea43e(0xb8)]);let isInit=!![],handler=await import(_0x1ea43e(0x155));global[_0x1ea43e(0xeb)]=async function(_0x16d83c){const _0x227c2c=_0x1ea43e;try{const _0xb559e5=await import(_0x227c2c(0xcc)+Date[_0x227c2c(0x144)]())[_0x227c2c(0xaf)](console['error']);if(Object['keys'](_0xb559e5||{})[_0x227c2c(0xce)])handler=_0xb559e5;}catch(_0x562bf3){console[_0x227c2c(0xb8)];}if(_0x16d83c){const _0x221ca4=global[_0x227c2c(0x15b)][_0x227c2c(0xba)];try{global[_0x227c2c(0x15b)]['ws'][_0x227c2c(0xa8)]();}catch{}conn['ev'][_0x227c2c(0x156)](),global[_0x227c2c(0x15b)]=makeWASocket(connectionOptions,{'chats':_0x221ca4}),isInit=!![];}!isInit&&(conn['ev'][_0x227c2c(0x11c)](_0x227c2c(0x14c),conn[_0x227c2c(0xd7)]),conn['ev']['off'](_0x227c2c(0xbc),conn[_0x227c2c(0xc2)]),conn['ev'][_0x227c2c(0x11c)]('group-participants.update',conn['participantsUpdate']),conn['ev']['off']('groups.update',conn[_0x227c2c(0xb4)]),conn['ev']['off']('message.delete',conn[_0x227c2c(0x16d)]),conn['ev'][_0x227c2c(0x11c)](_0x227c2c(0xb6),conn['presenceUpdate']),conn['ev'][_0x227c2c(0x11c)](_0x227c2c(0x11a),conn[_0x227c2c(0xf5)]),conn['ev'][_0x227c2c(0x11c)]('creds.update',conn[_0x227c2c(0xed)]));conn['welcome']=_0x227c2c(0x165),conn['bye']=_0x227c2c(0x145),conn['spromote']=_0x227c2c(0x137),conn['sdemote']='*@user*\x20is\x20no\x20longer\x20an\x20admin.',conn['sDesc']=_0x227c2c(0x116),conn['sSubject']=_0x227c2c(0x14d),conn[_0x227c2c(0xe0)]='The\x20group\x20icon\x20has\x20been\x20updated!',conn[_0x227c2c(0xa6)]=_0x227c2c(0x16f),conn[_0x227c2c(0x14a)]=_0x227c2c(0x16e),conn['sAnnounceOff']=_0x227c2c(0xab),conn['sRestrictOn']=_0x227c2c(0x171),conn['sRestrictOff']=_0x227c2c(0xfd),conn[_0x227c2c(0xd7)]=handler[_0x227c2c(0xd7)][_0x227c2c(0x10b)](global['conn']),conn['pollUpdate']=handler[_0x227c2c(0xc2)][_0x227c2c(0x10b)](global[_0x227c2c(0x15b)]),conn['participantsUpdate']=handler[_0x227c2c(0x115)][_0x227c2c(0x10b)](global['conn']),conn[_0x227c2c(0xb4)]=handler[_0x227c2c(0xb4)][_0x227c2c(0x10b)](global[_0x227c2c(0x15b)]),conn['onDelete']=handler[_0x227c2c(0x11d)][_0x227c2c(0x10b)](global[_0x227c2c(0x15b)]),conn[_0x227c2c(0x124)]=handler[_0x227c2c(0x124)][_0x227c2c(0x10b)](global['conn']),conn[_0x227c2c(0xf5)]=connectionUpdate[_0x227c2c(0x10b)](global['conn']),conn['credsUpdate']=saveCreds[_0x227c2c(0x10b)](global['conn'],!![]);const _0x1c471f=new Date(),_0x3e497f=new Date(conn['ev']);if(_0x1c471f>=_0x3e497f){const _0xd077f5=Object['entries'](conn[_0x227c2c(0xba)])[_0x227c2c(0x10a)](([_0x2aa213,_0x15a36c])=>!_0x2aa213[_0x227c2c(0xf2)]('@g.us')&&_0x15a36c[_0x227c2c(0xec)])[_0x227c2c(0x119)](_0xccb578=>_0xccb578[0x0]);}else{const _0x592711=Object[_0x227c2c(0x14e)](conn['chats'])[_0x227c2c(0x10a)](([_0x50a9d4,_0x45ab8b])=>!_0x50a9d4[_0x227c2c(0xf2)](_0x227c2c(0x11b))&&_0x45ab8b[_0x227c2c(0xec)])[_0x227c2c(0x119)](_0x4c8c9b=>_0x4c8c9b[0x0]);}return conn['ev']['on'](_0x227c2c(0x14c),conn[_0x227c2c(0xd7)]),conn['ev']['on'](_0x227c2c(0xbc),conn[_0x227c2c(0xc2)]),conn['ev']['on'](_0x227c2c(0x129),conn[_0x227c2c(0x115)]),conn['ev']['on'](_0x227c2c(0x12b),conn['groupsUpdate']),conn['ev']['on'](_0x227c2c(0xdd),conn[_0x227c2c(0x16d)]),conn['ev']['on'](_0x227c2c(0xb6),conn['presenceUpdate']),conn['ev']['on'](_0x227c2c(0x11a),conn['connectionUpdate']),conn['ev']['on']('creds.update',conn[_0x227c2c(0xed)]),isInit=![],!![];};const pluginFolder=global[_0x1ea43e(0x153)](join(__dirname,_0x1ea43e(0x166))),pluginFilter=_0x1ef6f8=>/\.js$/[_0x1ea43e(0xd8)](_0x1ef6f8);global[_0x1ea43e(0x113)]={};async function filesInit(){const _0x2edd1b=_0x1ea43e;for(const _0x4b2465 of readdirSync(pluginFolder)['filter'](pluginFilter)){try{const _0x505cae=global[_0x2edd1b(0xd4)](join(pluginFolder,_0x4b2465)),_0x2eb570=await import(_0x505cae);global[_0x2edd1b(0x113)][_0x4b2465]=_0x2eb570[_0x2edd1b(0xae)]||_0x2eb570;}catch(_0x372181){conn[_0x2edd1b(0x13f)][_0x2edd1b(0xb8)](_0x372181),delete global[_0x2edd1b(0x113)][_0x4b2465];}}}filesInit()[_0x1ea43e(0xc1)](_0x5e979f=>Object[_0x1ea43e(0x16c)](global['plugins']))['catch'](console[_0x1ea43e(0xb8)]),global[_0x1ea43e(0x131)]=async(_0x321e59,_0x2303c3)=>{const _0x42232f=_0x1ea43e;if(pluginFilter(_0x2303c3)){const _0x2947d3=global['__filename'](join(pluginFolder,_0x2303c3),!![]);if(_0x2303c3 in global[_0x42232f(0x113)]){if(existsSync(_0x2947d3))conn[_0x42232f(0x13f)]['info']('\x0aUpdated\x20plugin\x20-\x20\x27'+_0x2303c3+'\x27');else return conn[_0x42232f(0x13f)][_0x42232f(0xbe)]('\x0aDeleted\x20plugin\x20-\x20\x27'+_0x2303c3+'\x27'),delete global[_0x42232f(0x113)][_0x2303c3];}else conn[_0x42232f(0x13f)][_0x42232f(0xcf)](_0x42232f(0x118)+_0x2303c3+'\x27');const _0x4400c2=_0x85fee0(readFileSync(_0x2947d3),_0x2303c3,{'sourceType':_0x42232f(0x138),'allowAwaitOutsideFunction':!![]});if(_0x4400c2)conn[_0x42232f(0x13f)][_0x42232f(0xb8)]('\x0aSyntax\x20error\x20while\x20loading\x20\x27'+_0x2303c3+'\x27\x0a'+format(_0x4400c2));else try{const _0x40bf33=await import(global[_0x42232f(0xd4)](_0x2947d3)+_0x42232f(0x15d)+Date['now']());global[_0x42232f(0x113)][_0x2303c3]=_0x40bf33['default']||_0x40bf33;}catch(_0x8f07d3){conn[_0x42232f(0x13f)][_0x42232f(0xb8)]('\x0aError\x20require\x20plugin\x20\x27'+_0x2303c3+'\x0a'+format(_0x8f07d3)+'\x27');}finally{global['plugins']=Object['fromEntries'](Object[_0x42232f(0x14e)](global[_0x42232f(0x113)])['sort'](([_0x53f3d2],[_0x3dfc6d])=>_0x53f3d2[_0x42232f(0xa9)](_0x3dfc6d)));}}},Object[_0x1ea43e(0x161)](global['reload']),watch(pluginFolder,global[_0x1ea43e(0x131)]),await global['reloadHandler']();async function _quickTest(){const _0x11a778=_0x1ea43e,_0x5f44df=await Promise[_0x11a778(0x14f)]([spawn('ffmpeg'),spawn(_0x11a778(0x10e)),spawn(_0x11a778(0x130),[_0x11a778(0xc5),_0x11a778(0xbb),_0x11a778(0xb8),_0x11a778(0xfe),_0x11a778(0xe1),_0x11a778(0x111),'1','-f','webp','-']),spawn(_0x11a778(0xc0)),spawn(_0x11a778(0x146)),spawn('gm'),spawn(_0x11a778(0xb7),[_0x11a778(0x15c)])][_0x11a778(0x119)](_0x6acb74=>{const _0x583ad4=_0x11a778;return Promise[_0x583ad4(0xc8)]([new Promise(_0xf523cc=>{const _0x408dbf=_0x583ad4;_0x6acb74['on'](_0x408dbf(0xa8),_0x946068=>{_0xf523cc(_0x946068!==0x7f);});}),new Promise(_0x2ec7d4=>{const _0x32e6d4=_0x583ad4;_0x6acb74['on'](_0x32e6d4(0xb8),_0x253509=>_0x2ec7d4(![]));})]);})),[_0x3ebad2,_0x5bcbbc,_0x42a72c,_0x454ca8,_0x362b6f,_0x1fbc03,_0x293ce9]=_0x5f44df,_0x1e40e8=global[_0x11a778(0x149)]={'ffmpeg':_0x3ebad2,'ffprobe':_0x5bcbbc,'ffmpegWebp':_0x42a72c,'convert':_0x454ca8,'magick':_0x362b6f,'gm':_0x1fbc03,'find':_0x293ce9};Object[_0x11a778(0x161)](global[_0x11a778(0x149)]);}async function saafsafai(){const _0x4e71d1=_0x1ea43e;if(stopped===_0x4e71d1(0xa8)||!conn||!conn[_0x4e71d1(0x127)])return;clearsession(),console[_0x4e71d1(0x157)](_0x7efcd0[_0x4e71d1(0xe5)](_0x4e71d1(0xf4)));}setInterval(saafsafai,0xa*0x3c*0x3e8),_quickTest()[_0x1ea43e(0xaf)](console[_0x1ea43e(0xb8)]);