-
-
Notifications
You must be signed in to change notification settings - Fork 449
/
main.js
1 lines (1 loc) ยท 21.2 KB
/
main.js
1
const _0x4acfb3=_0xd2bc;(function(_0x2b8cb1,_0x534fc4){const _0x3e2d9c=_0xd2bc,_0x1d3585=_0x2b8cb1();while(!![]){try{const _0x4a83eb=-parseInt(_0x3e2d9c(0x250))/0x1+parseInt(_0x3e2d9c(0x1cb))/0x2+parseInt(_0x3e2d9c(0x1c5))/0x3+-parseInt(_0x3e2d9c(0x23b))/0x4*(parseInt(_0x3e2d9c(0x23c))/0x5)+parseInt(_0x3e2d9c(0x23a))/0x6*(-parseInt(_0x3e2d9c(0x25d))/0x7)+-parseInt(_0x3e2d9c(0x231))/0x8+parseInt(_0x3e2d9c(0x1eb))/0x9;if(_0x4a83eb===_0x534fc4)break;else _0x1d3585['push'](_0x1d3585['shift']());}catch(_0x5a0de2){_0x1d3585['push'](_0x1d3585['shift']());}}}(_0x2943,0xdb221),process[_0x4acfb3(0x21b)][_0x4acfb3(0x1e1)]='1');import'./config.js';import _0x494204 from'dotenv';import{existsSync,readFileSync,readdirSync,unlinkSync,watch}from'fs';import{createRequire}from'module';import _0x1af2e0,{join}from'path';import{platform}from'process';import{fileURLToPath,pathToFileURL}from'url';import*as _0x5cab6a from'ws';import _0x1e5f67 from'./lib/makesession.js';import _0x26195c from'./lib/tempclear.js';global[_0x4acfb3(0x25e)]=function filename(_0x5d220f=import.meta[_0x4acfb3(0x1f2)],_0x1218a0=platform!==_0x4acfb3(0x203)){const _0x23bab5=_0x4acfb3;return _0x1218a0?/file:\/\/\//['test'](_0x5d220f)?fileURLToPath(_0x5d220f):_0x5d220f:pathToFileURL(_0x5d220f)[_0x23bab5(0x20b)]();},global[_0x4acfb3(0x22f)]=function dirname(_0x4f7595){const _0x21734b=_0x4acfb3;return _0x1af2e0['dirname'](global[_0x21734b(0x25e)](_0x4f7595,!![]));},global[_0x4acfb3(0x1e8)]=function require(_0x19447f=import.meta[_0x4acfb3(0x1f2)]){return createRequire(_0x19447f);},global[_0x4acfb3(0x1d6)]=_0x4acfb3(0x25f);import _0x3a0015 from'chalk';import{spawn}from'child_process';import _0x498cfb from'lodash';import{JSONFile,Low}from'lowdb';import _0xdd1dab from'node-cache';import{default as _0x333424,default as _0x3780b8}from'pino';import _0xe61257 from'syntax-error';import{format}from'util';import _0x1900da from'yargs';import _0x4df306 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(_0x4acfb3(0x1d4)))[_0x4acfb3(0x24f)];import _0x491fbc from'readline';_0x494204[_0x4acfb3(0x23f)]();async function main(){const _0x5763fc=_0x4acfb3,_0x4c07c6=process[_0x5763fc(0x21b)][_0x5763fc(0x214)];if(!_0x4c07c6){console[_0x5763fc(0x22c)]('Environment\x20variable\x20not\x20found.');return;}try{await _0x1e5f67(_0x4c07c6),console[_0x5763fc(0x219)]('processTxtAndSaveCredentials\x20completed.');}catch(_0x8019c1){console[_0x5763fc(0x22c)]('Error:',_0x8019c1);}}main(),await delay(0x3e8*0xa);const pairingCode=!!global[_0x4acfb3(0x244)]||process[_0x4acfb3(0x213)][_0x4acfb3(0x207)](_0x4acfb3(0x1db)),useQr=process[_0x4acfb3(0x213)][_0x4acfb3(0x207)](_0x4acfb3(0x23d)),useStore=!![],MAIN_LOGGER=_0x3780b8({'timestamp':()=>_0x4acfb3(0x1ee)+new Date()['toJSON']()+'\x22'}),logger=MAIN_LOGGER[_0x4acfb3(0x239)]({});logger[_0x4acfb3(0x218)]=_0x4acfb3(0x20d);function _0x2943(){const _0x3e09a0=['fatal','catch','participantsUpdate','autocleartmp','buttonsMessage','output','argv','SESSION_ID','@g.us','loadDatabase','opts','level','log','server','env','freeze','pollUpdate','sessions','group-participants.update','timestamp','yellow','statusCode','startsWith','presence.update','The\x20group\x20is\x20now\x20*CLOSED*!\x0aOnly\x20admins\x20can\x20send\x20messages.','black','-amin','open','sSubject','\x0aNew\x20plugin\x20-\x20\x27','PREFIX','error','Edit\x20Group\x20Info\x20is\x20now\x20available\x20to\x20all\x20participants!','messages.upsert','__dirname','remoteJid','9602096dlmlfZ','\x0aWaiting\x20For\x20Login\x0a','-frames:v','writeToFile','--version','webp','off','\x0a๐ฐ๏ธconnection\x20closed...\x20Get\x20a\x20New\x20Session','child','6oEygds','4584616DIILwI','5qyWIPd','--qr','filter','config','match','deleteUpdate','registered','sAnnounceOff','pairingNumber','all','find','user','stdout','store','color','Error\x20reloading\x20handler:','exit','\x5c$&','\x0aLogging\x20in....','default','87156tJxPko','message','sIcon','onDelete','replace','templateMessage','-loglevel','-filter_complex','message.delete','APIs','./server.js','race','bold','4592833PMXvKq','__filename','https://www.guruapi.tech/api','ffmpeg','API','sdemote','credsUpdate','sAnnounceOn','listMessage','./sessions.json','keys','chain','endsWith','module','localeCompare','-delete','reload','convert','messages.update','The\x20group\x20icon\x20has\x20been\x20updated!','connectionUpdate','?update=','*@user*\x20is\x20no\x20longer\x20an\x20admin.','exitProcess','question','stdin','READ','creds','1132725VMppxz','isInit','warn','reloadHandler','tmp','redBright','2294770xPVJgg','bgBlack','cyanBright','groups.update','bgGreenBright','data','\x0a๐๐๐๐๐๐-๐๐\x0a\x0aสแดแด\x20ษชs\x20แดษดสษชษดแด\x20ษดแดแดกโ
\x0aIา\x20สแดแด\x20สษชแดแด\x20แดสแด\x20สแดแด\x20ษขษชแด แด\x20แด\x20sแดแดส\x20๐\x0a\x0aENJOY๐','sRevoke','forEach','@whiskeysockets/baileys','greenBright','gurubot','\x0aError\x20require\x20plugin\x20\x27','Temporary\x20file\x20cleanup\x20completed.','entries','groupsUpdate','--pairing-code','sDesc','isChats','sRestrictOff','bye','tmpdir','NODE_TLS_REJECT_UNAUTHORIZED','handler','reset','close','ffprobe','loadMessage','./sessions/','__require','conn','authState','22160700SKpnZg','join','logger',',\x22time\x22:\x22','Start\x20with\x20your\x20country\x27s\x20WhatsApp\x20code,\x20Example\x20:\x2092xxx','info','map','url','\x20Hello\x20@user!\x0a\x0a๐\x20*WELCOME*\x20to\x20the\x20group\x20@group!\x0a\x0a๐\x20Please\x20read\x20the\x20*DESCRIPTION*\x20@desc.','creds.update','DATABASE_URL','bind','The\x20group\x20is\x20now\x20*OPEN*!\x0aAll\x20participants\x20can\x20send\x20messages.','readFromFile','some','plugins','payload','spawn','presenceUpdate','\x0aDeleted\x20plugin\x20-\x20\x27','test','APIKeys','An\x20error\x20occurred\x20during\x20temporary\x20file\x20cleanup:','./handler.js','win32','socket','requestPairingCode','chats','includes','support','stopped','The\x20group\x20description\x20has\x20been\x20updated\x20to:\x0a@desc','toString','then'];_0x2943=function(){return _0x3e09a0;};return _0x2943();}const store=useStore?makeInMemoryStore({'logger':logger}):undefined;store?.[_0x4acfb3(0x1f8)](_0x4acfb3(0x266)),setInterval(()=>{const _0x5439dc=_0x4acfb3;store?.[_0x5439dc(0x234)](_0x5439dc(0x266));},0x2710*0x6);const msgRetryCounterCache=new _0xdd1dab(),rl=_0x491fbc['createInterface']({'input':process[_0x4acfb3(0x1c2)],'output':process[_0x4acfb3(0x248)]}),question=_0xffd1e4=>new Promise(_0x23a1d7=>rl[_0x4acfb3(0x1c1)](_0xffd1e4,_0x23a1d7)),{CONNECTING}=_0x5cab6a,{chain}=_0x498cfb,PORT=process[_0x4acfb3(0x21b)]['PORT']||process[_0x4acfb3(0x21b)]['SERVER_PORT']||0xbb8;protoType(),serialize(),global[_0x4acfb3(0x261)]=(_0x16b38c,_0x32eb75='/',_0x161a1f={},_0x46aee8)=>(_0x16b38c in global['APIs']?global[_0x4acfb3(0x259)][_0x16b38c]:_0x16b38c)+_0x32eb75+(_0x161a1f||_0x46aee8?'?'+new URLSearchParams(Object[_0x4acfb3(0x1d9)]({..._0x161a1f,..._0x46aee8?{[_0x46aee8]:global[_0x4acfb3(0x200)][_0x16b38c in global[_0x4acfb3(0x259)]?global[_0x4acfb3(0x259)][_0x16b38c]:_0x16b38c]}:{}})):''),global[_0x4acfb3(0x220)]={'start':new Date()};const __dirname=global['__dirname'](import.meta[_0x4acfb3(0x1f2)]);global[_0x4acfb3(0x217)]=new Object(_0x1900da(process[_0x4acfb3(0x213)]['slice'](0x2))[_0x4acfb3(0x1c0)](![])['parse']()),global['prefix']=new RegExp('^['+(process[_0x4acfb3(0x21b)][_0x4acfb3(0x22b)]||'*/i!#$%+ยฃยขโฌยฅ^ยฐ=ยถโรรทฯโโยฉยฎ:;?&.\x5c-.@')[_0x4acfb3(0x254)](/[|\\{}()[\]^$+*?.\-\^]/g,_0x4acfb3(0x24d))+']'),global['opts']['db']=process[_0x4acfb3(0x21b)][_0x4acfb3(0x1f5)],global['db']=new Low(/https?:\/\//[_0x4acfb3(0x1ff)](opts['db']||'')?new _0x4df306(opts['db']):/mongodb(\+srv)?:\/\//i['test'](opts['db'])?new MongoDB(opts['db']):new JSONFile((opts['_'][0x0]?opts['_'][0x0]+'_':'')+'database.json')),global['DATABASE']=global['db'],global[_0x4acfb3(0x216)]=async function loadDatabase(){const _0xc4cc9c=_0x4acfb3;if(global['db'][_0xc4cc9c(0x1c3)])return new Promise(_0x9fb8b1=>setInterval(async function(){const _0x2f33e2=_0xc4cc9c;!global['db']['READ']&&(clearInterval(this),_0x9fb8b1(global['db'][_0x2f33e2(0x1d0)]==null?global[_0x2f33e2(0x216)]():global['db'][_0x2f33e2(0x1d0)]));},0x1*0x3e8));if(global['db'][_0xc4cc9c(0x1d0)]!==null)return;global['db'][_0xc4cc9c(0x1c3)]=!![],await global['db']['read']()[_0xc4cc9c(0x20e)](console[_0xc4cc9c(0x22c)]),global['db'][_0xc4cc9c(0x1c3)]=null,global['db'][_0xc4cc9c(0x1d0)]={'users':{},'chats':{},'stats':{},'msgs':{},'sticker':{},'settings':{},...global['db']['data']||{}},global['db'][_0xc4cc9c(0x268)]=chain(global['db'][_0xc4cc9c(0x1d0)]);},loadDatabase(),global['authFolder']=_0x4acfb3(0x21e);const {state,saveCreds}=await useMultiFileAuthState(global['authFolder']),connectionOptions={'version':[0x2,0xbb8,0x3c8d6c7b],'logger':_0x333424({'level':_0x4acfb3(0x20d)}),'printQRInTerminal':!pairingCode,'browser':['chrome\x20(linux)','',''],'auth':{'creds':state[_0x4acfb3(0x1c4)],'keys':makeCacheableSignalKeyStore(state['keys'],_0x333424()[_0x4acfb3(0x239)]({'level':_0x4acfb3(0x20d),'stream':_0x4acfb3(0x249)}))},'markOnlineOnConnect':![],'generateHighQualityLinkPreview':!![],'getMessage':async _0x5668f4=>{const _0x2187dc=_0x4acfb3;let _0x542292=jidNormalizedUser(_0x5668f4[_0x2187dc(0x230)]),_0x2fdd03=await store[_0x2187dc(0x1e6)](_0x542292,_0x5668f4['id']);return _0x2fdd03?.[_0x2187dc(0x251)]||'';},'patchMessageBeforeSending':_0xb9d0f=>{const _0x2a99da=_0x4acfb3,_0x99744e=!!(_0xb9d0f[_0x2a99da(0x211)]||_0xb9d0f[_0x2a99da(0x255)]||_0xb9d0f[_0x2a99da(0x265)]);return _0x99744e&&(_0xb9d0f={'viewOnceMessage':{'message':{'messageContextInfo':{'deviceListMetadataVersion':0x2,'deviceListMetadata':{}},..._0xb9d0f}}}),_0xb9d0f;},'msgRetryCounterCache':msgRetryCounterCache,'defaultQueryTimeoutMs':undefined,'syncFullHistory':![]};global[_0x4acfb3(0x1e9)]=makeWASocket(connectionOptions),conn[_0x4acfb3(0x1c6)]=![],store?.[_0x4acfb3(0x1f6)](conn['ev']);if(pairingCode&&!conn[_0x4acfb3(0x1ea)]['creds'][_0x4acfb3(0x242)]){let phoneNumber;!!global['pairingNumber']?(phoneNumber=global[_0x4acfb3(0x244)][_0x4acfb3(0x254)](/[^0-9]/g,''),!Object[_0x4acfb3(0x267)](PHONENUMBER_MCC)[_0x4acfb3(0x1f9)](_0x161a76=>phoneNumber[_0x4acfb3(0x223)](_0x161a76))&&(console[_0x4acfb3(0x219)](_0x3a0015['bgBlack'](_0x3a0015[_0x4acfb3(0x1ca)](_0x4acfb3(0x1ef)))),process[_0x4acfb3(0x24c)](0x0))):(phoneNumber=await question(_0x3a0015[_0x4acfb3(0x1cc)](_0x3a0015['greenBright']('Please\x20type\x20your\x20WhatsApp\x20number\x20:\x20'))),phoneNumber=phoneNumber['replace'](/[^0-9]/g,''),!Object[_0x4acfb3(0x267)](PHONENUMBER_MCC)[_0x4acfb3(0x1f9)](_0x3021fe=>phoneNumber['startsWith'](_0x3021fe))&&(console[_0x4acfb3(0x219)](_0x3a0015[_0x4acfb3(0x1cc)](_0x3a0015[_0x4acfb3(0x1ca)]('Start\x20with\x20your\x20country\x27s\x20WhatsApp\x20code,\x20Example\x20:\x2092xxx'))),phoneNumber=await question(_0x3a0015[_0x4acfb3(0x1cc)](_0x3a0015['greenBright']('Please\x20type\x20your\x20WhatsApp\x20number\x20:\x20'))),phoneNumber=phoneNumber[_0x4acfb3(0x254)](/[^0-9]/g,''),rl['close']())),setTimeout(async()=>{const _0x1ab7b7=_0x4acfb3;let _0x1a5c1a=await conn[_0x1ab7b7(0x205)](phoneNumber);_0x1a5c1a=_0x1a5c1a?.[_0x1ab7b7(0x240)](/.{1,4}/g)?.[_0x1ab7b7(0x1ec)]('-')||_0x1a5c1a;const _0x36d95c=_0x3a0015[_0x1ab7b7(0x25c)][_0x1ab7b7(0x1d5)]('Your\x20Pairing\x20Code:')+'\x20'+_0x3a0015[_0x1ab7b7(0x1cf)](_0x3a0015[_0x1ab7b7(0x226)](_0x1a5c1a));console[_0x1ab7b7(0x219)](_0x36d95c);},0xbb8);}conn['logger']['info'](_0x4acfb3(0x232));!opts[_0x4acfb3(0x1ff)]&&(global['db']&&setInterval(async()=>{const _0x65bb46=_0x4acfb3;if(global['db'][_0x65bb46(0x1d0)])await global['db']['write']();if(opts[_0x65bb46(0x210)]&&(global[_0x65bb46(0x208)]||{})[_0x65bb46(0x246)])tmp=[os[_0x65bb46(0x1e0)](),_0x65bb46(0x1c9)],tmp[_0x65bb46(0x1d3)](_0xc79cfb=>cp[_0x65bb46(0x1fc)](_0x65bb46(0x246),[_0xc79cfb,_0x65bb46(0x227),'3','-type','f',_0x65bb46(0x26c)]));},0x1e*0x3e8));if(opts[_0x4acfb3(0x21a)])(await import(_0x4acfb3(0x25a)))[_0x4acfb3(0x24f)](global[_0x4acfb3(0x1e9)],PORT);function runCleanup(){const _0x23edcc=_0x4acfb3;_0x26195c()[_0x23edcc(0x20c)](()=>{const _0x5e145c=_0x23edcc;console[_0x5e145c(0x219)](_0x5e145c(0x1d8));})[_0x23edcc(0x20e)](_0x5719c3=>{const _0xdb5a3a=_0x23edcc;console[_0xdb5a3a(0x22c)](_0xdb5a3a(0x201),_0x5719c3);})['finally'](()=>{setTimeout(runCleanup,0x3e8*0x3c*0x2);});}runCleanup();function clearsession(){const _0x218c78=_0x4acfb3;let _0x2727c5=[];const _0x25973c=readdirSync('./sessions'),_0x2d6812=_0x25973c[_0x218c78(0x23e)](_0x40769b=>{return _0x40769b['startsWith']('pre-key-');});_0x2727c5=[..._0x2727c5,..._0x2d6812],_0x2d6812['forEach'](_0xb7e31a=>{const _0x49e3df=_0x218c78;unlinkSync(_0x49e3df(0x1e7)+_0xb7e31a);});}async function connectionUpdate(_0x26f30b){const _0x1dcc56=_0x4acfb3,{connection:_0x29d4be,lastDisconnect:_0x50d5bf,isNewLogin:_0x202d13,qr:_0x4cc0ee}=_0x26f30b;global[_0x1dcc56(0x209)]=_0x29d4be;if(_0x202d13)conn[_0x1dcc56(0x1c6)]=!![];const _0x3a2643=_0x50d5bf?.['error']?.[_0x1dcc56(0x212)]?.[_0x1dcc56(0x222)]||_0x50d5bf?.[_0x1dcc56(0x22c)]?.['output']?.[_0x1dcc56(0x1fb)]?.[_0x1dcc56(0x222)];if(_0x3a2643&&_0x3a2643!==DisconnectReason['loggedOut']&&conn?.['ws'][_0x1dcc56(0x204)]==null)try{conn[_0x1dcc56(0x1ed)][_0x1dcc56(0x1f0)](await global[_0x1dcc56(0x1c8)](!![]));}catch(_0x199371){console['error'](_0x1dcc56(0x24b),_0x199371);}_0x3a2643&&(_0x3a2643===DisconnectReason['restartRequired']||_0x3a2643===0x1ac)&&(conn[_0x1dcc56(0x1ed)][_0x1dcc56(0x1f0)](_0x3a0015[_0x1dcc56(0x221)]('\x0a๐ฉ\x20Restart\x20Required...\x20Restarting')),process['send'](_0x1dcc56(0x1e3)));if(global['db'][_0x1dcc56(0x1d0)]==null)loadDatabase();!pairingCode&&useQr&&_0x4cc0ee!==0x0&&_0x4cc0ee!==undefined&&conn['logger'][_0x1dcc56(0x1f0)](_0x3a0015[_0x1dcc56(0x221)](_0x1dcc56(0x24e)));if(_0x29d4be===_0x1dcc56(0x228)){const {jid:_0x7c31ed,name:_0x4aba5c}=conn[_0x1dcc56(0x247)];let _0x3a54cf=_0x1dcc56(0x1d1);await conn['sendMessage'](_0x7c31ed,{'text':_0x3a54cf,'mentions':[_0x7c31ed]},{'quoted':null}),conn[_0x1dcc56(0x1ed)][_0x1dcc56(0x1f0)](_0x3a0015[_0x1dcc56(0x221)]('\x0a๐ฉ\x20P\x20R\x20I\x20N\x20C\x20E\x20\x20I\x20S\x20\x20B\x20O\x20T\x20\x20R\x20E\x20A\x20D\x20Y'));}_0x29d4be==_0x1dcc56(0x1e4)&&conn[_0x1dcc56(0x1ed)][_0x1dcc56(0x22c)](_0x3a0015[_0x1dcc56(0x221)](_0x1dcc56(0x238)));}process['on']('uncaughtException',console[_0x4acfb3(0x22c)]);let isInit=!![],handler=await import(_0x4acfb3(0x202));global[_0x4acfb3(0x1c8)]=async function(_0x35329f){const _0x5822ad=_0x4acfb3;try{const _0x95dfea=await import('./handler.js?update='+Date['now']())[_0x5822ad(0x20e)](console[_0x5822ad(0x22c)]);if(Object[_0x5822ad(0x267)](_0x95dfea||{})['length'])handler=_0x95dfea;}catch(_0x315e99){console['error'];}if(_0x35329f){const _0x10dbf4=global[_0x5822ad(0x1e9)][_0x5822ad(0x206)];try{global[_0x5822ad(0x1e9)]['ws'][_0x5822ad(0x1e4)]();}catch{}conn['ev']['removeAllListeners'](),global[_0x5822ad(0x1e9)]=makeWASocket(connectionOptions,{'chats':_0x10dbf4}),isInit=!![];}!isInit&&(conn['ev'][_0x5822ad(0x237)](_0x5822ad(0x22e),conn['handler']),conn['ev'][_0x5822ad(0x237)](_0x5822ad(0x1bb),conn['pollUpdate']),conn['ev'][_0x5822ad(0x237)](_0x5822ad(0x21f),conn[_0x5822ad(0x20f)]),conn['ev']['off'](_0x5822ad(0x1ce),conn[_0x5822ad(0x1da)]),conn['ev'][_0x5822ad(0x237)]('message.delete',conn[_0x5822ad(0x253)]),conn['ev'][_0x5822ad(0x237)](_0x5822ad(0x224),conn[_0x5822ad(0x1fd)]),conn['ev']['off']('connection.update',conn[_0x5822ad(0x1bd)]),conn['ev']['off'](_0x5822ad(0x1f4),conn['credsUpdate']));conn['welcome']=_0x5822ad(0x1f3),conn[_0x5822ad(0x1df)]='๐GOODBYE\x20@user\x20\x0a\x0aSee\x20you\x20later!',conn['spromote']='*@user*\x20has\x20been\x20promoted\x20to\x20an\x20admin!',conn[_0x5822ad(0x262)]=_0x5822ad(0x1bf),conn[_0x5822ad(0x1dc)]=_0x5822ad(0x20a),conn[_0x5822ad(0x229)]='The\x20group\x20title\x20has\x20been\x20changed\x20to:\x0a@group',conn[_0x5822ad(0x252)]=_0x5822ad(0x1bc),conn[_0x5822ad(0x1d2)]='\x20The\x20group\x20link\x20has\x20been\x20changed\x20to:\x0a@revoke',conn[_0x5822ad(0x264)]=_0x5822ad(0x225),conn[_0x5822ad(0x243)]=_0x5822ad(0x1f7),conn['sRestrictOn']='Edit\x20Group\x20Info\x20has\x20been\x20restricted\x20to\x20admins\x20only!',conn[_0x5822ad(0x1de)]=_0x5822ad(0x22d),conn[_0x5822ad(0x1e2)]=handler[_0x5822ad(0x1e2)][_0x5822ad(0x1f6)](global['conn']),conn[_0x5822ad(0x21d)]=handler[_0x5822ad(0x21d)][_0x5822ad(0x1f6)](global['conn']),conn[_0x5822ad(0x20f)]=handler['participantsUpdate'][_0x5822ad(0x1f6)](global['conn']),conn['groupsUpdate']=handler[_0x5822ad(0x1da)]['bind'](global['conn']),conn['onDelete']=handler[_0x5822ad(0x241)][_0x5822ad(0x1f6)](global[_0x5822ad(0x1e9)]),conn[_0x5822ad(0x1fd)]=handler['presenceUpdate'][_0x5822ad(0x1f6)](global[_0x5822ad(0x1e9)]),conn[_0x5822ad(0x1bd)]=connectionUpdate[_0x5822ad(0x1f6)](global[_0x5822ad(0x1e9)]),conn[_0x5822ad(0x263)]=saveCreds[_0x5822ad(0x1f6)](global[_0x5822ad(0x1e9)],!![]);const _0x4cf220=new Date(),_0x2a5bb1=new Date(conn['ev']);if(_0x4cf220>=_0x2a5bb1){const _0x9877be=Object[_0x5822ad(0x1d9)](conn[_0x5822ad(0x206)])[_0x5822ad(0x23e)](([_0x42423f,_0x4f7826])=>!_0x42423f['endsWith']('@g.us')&&_0x4f7826[_0x5822ad(0x1dd)])['map'](_0x4217b6=>_0x4217b6[0x0]);}else{const _0x333f81=Object[_0x5822ad(0x1d9)](conn['chats'])[_0x5822ad(0x23e)](([_0x2a3073,_0x10cc91])=>!_0x2a3073[_0x5822ad(0x269)](_0x5822ad(0x215))&&_0x10cc91[_0x5822ad(0x1dd)])[_0x5822ad(0x1f1)](_0x3a0256=>_0x3a0256[0x0]);}return conn['ev']['on'](_0x5822ad(0x22e),conn['handler']),conn['ev']['on']('messages.update',conn[_0x5822ad(0x21d)]),conn['ev']['on'](_0x5822ad(0x21f),conn[_0x5822ad(0x20f)]),conn['ev']['on'](_0x5822ad(0x1ce),conn['groupsUpdate']),conn['ev']['on'](_0x5822ad(0x258),conn['onDelete']),conn['ev']['on'](_0x5822ad(0x224),conn[_0x5822ad(0x1fd)]),conn['ev']['on']('connection.update',conn[_0x5822ad(0x1bd)]),conn['ev']['on'](_0x5822ad(0x1f4),conn[_0x5822ad(0x263)]),isInit=![],!![];};const pluginFolder=global[_0x4acfb3(0x22f)](join(__dirname,'./plugins/index')),pluginFilter=_0x359807=>/\.js$/['test'](_0x359807);global[_0x4acfb3(0x1fa)]={};async function filesInit(){const _0x42d2ec=_0x4acfb3;for(const _0x14d767 of readdirSync(pluginFolder)[_0x42d2ec(0x23e)](pluginFilter)){try{const _0x49b696=global[_0x42d2ec(0x25e)](join(pluginFolder,_0x14d767)),_0x5f1503=await import(_0x49b696);global[_0x42d2ec(0x1fa)][_0x14d767]=_0x5f1503[_0x42d2ec(0x24f)]||_0x5f1503;}catch(_0x2ab4eb){conn['logger']['error'](_0x2ab4eb),delete global[_0x42d2ec(0x1fa)][_0x14d767];}}}filesInit()[_0x4acfb3(0x20c)](_0x588d9a=>Object['keys'](global[_0x4acfb3(0x1fa)]))[_0x4acfb3(0x20e)](console[_0x4acfb3(0x22c)]),global[_0x4acfb3(0x26d)]=async(_0xebaa62,_0x5e1619)=>{const _0x2c58e7=_0x4acfb3;if(pluginFilter(_0x5e1619)){const _0x59701b=global[_0x2c58e7(0x25e)](join(pluginFolder,_0x5e1619),!![]);if(_0x5e1619 in global[_0x2c58e7(0x1fa)]){if(existsSync(_0x59701b))conn[_0x2c58e7(0x1ed)][_0x2c58e7(0x1f0)]('\x0aUpdated\x20plugin\x20-\x20\x27'+_0x5e1619+'\x27');else return conn[_0x2c58e7(0x1ed)][_0x2c58e7(0x1c7)](_0x2c58e7(0x1fe)+_0x5e1619+'\x27'),delete global[_0x2c58e7(0x1fa)][_0x5e1619];}else conn['logger'][_0x2c58e7(0x1f0)](_0x2c58e7(0x22a)+_0x5e1619+'\x27');const _0x314ac3=_0xe61257(readFileSync(_0x59701b),_0x5e1619,{'sourceType':_0x2c58e7(0x26a),'allowAwaitOutsideFunction':!![]});if(_0x314ac3)conn[_0x2c58e7(0x1ed)]['error']('\x0aSyntax\x20error\x20while\x20loading\x20\x27'+_0x5e1619+'\x27\x0a'+format(_0x314ac3));else try{const _0x25a1c8=await import(global['__filename'](_0x59701b)+_0x2c58e7(0x1be)+Date['now']());global[_0x2c58e7(0x1fa)][_0x5e1619]=_0x25a1c8[_0x2c58e7(0x24f)]||_0x25a1c8;}catch(_0x56913a){conn[_0x2c58e7(0x1ed)]['error'](_0x2c58e7(0x1d7)+_0x5e1619+'\x0a'+format(_0x56913a)+'\x27');}finally{global[_0x2c58e7(0x1fa)]=Object['fromEntries'](Object[_0x2c58e7(0x1d9)](global[_0x2c58e7(0x1fa)])['sort'](([_0x55e834],[_0x403951])=>_0x55e834[_0x2c58e7(0x26b)](_0x403951)));}}},Object['freeze'](global[_0x4acfb3(0x26d)]),watch(pluginFolder,global[_0x4acfb3(0x26d)]),await global[_0x4acfb3(0x1c8)]();async function _quickTest(){const _0x1b8d8f=_0x4acfb3,_0x5c199f=await Promise[_0x1b8d8f(0x245)]([spawn(_0x1b8d8f(0x260)),spawn(_0x1b8d8f(0x1e5)),spawn(_0x1b8d8f(0x260),['-hide_banner',_0x1b8d8f(0x256),_0x1b8d8f(0x22c),_0x1b8d8f(0x257),_0x1b8d8f(0x24a),_0x1b8d8f(0x233),'1','-f',_0x1b8d8f(0x236),'-']),spawn(_0x1b8d8f(0x26e)),spawn('magick'),spawn('gm'),spawn(_0x1b8d8f(0x246),[_0x1b8d8f(0x235)])][_0x1b8d8f(0x1f1)](_0x101291=>{const _0x1035a7=_0x1b8d8f;return Promise[_0x1035a7(0x25b)]([new Promise(_0x15a839=>{const _0x15212c=_0x1035a7;_0x101291['on'](_0x15212c(0x1e4),_0x24034f=>{_0x15a839(_0x24034f!==0x7f);});}),new Promise(_0x5bcc72=>{const _0x3108e=_0x1035a7;_0x101291['on'](_0x3108e(0x22c),_0x13168d=>_0x5bcc72(![]));})]);})),[_0x5b1b2a,_0x55813c,_0x54f817,_0x29c4a2,_0x530fec,_0x3285c6,_0x34e7d9]=_0x5c199f,_0x1c1b1f=global[_0x1b8d8f(0x208)]={'ffmpeg':_0x5b1b2a,'ffprobe':_0x55813c,'ffmpegWebp':_0x54f817,'convert':_0x29c4a2,'magick':_0x530fec,'gm':_0x3285c6,'find':_0x34e7d9};Object[_0x1b8d8f(0x21c)](global[_0x1b8d8f(0x208)]);}function _0xd2bc(_0x1c486c,_0x544b87){const _0x29432f=_0x2943();return _0xd2bc=function(_0xd2bc65,_0x1d63f1){_0xd2bc65=_0xd2bc65-0x1bb;let _0x4752a6=_0x29432f[_0xd2bc65];return _0x4752a6;},_0xd2bc(_0x1c486c,_0x544b87);}async function saafsafai(){const _0x1c3f5b=_0x4acfb3;if(stopped===_0x1c3f5b(0x1e4)||!conn||!conn[_0x1c3f5b(0x247)])return;clearsession(),console['log'](_0x3a0015[_0x1c3f5b(0x1cd)]('\x0aStored\x20Sessions\x20Cleared'));}setInterval(saafsafai,0xa*0x3c*0x3e8),_quickTest()[_0x4acfb3(0x20e)](console[_0x4acfb3(0x22c)]);