diff --git a/Guru.js b/Guru.js index 3d92889ee9..6da3e4083d 100644 --- a/Guru.js +++ b/Guru.js @@ -1 +1 @@ -const _0x40c564=_0x5a89;(function(_0x38962d,_0x110682){const _0x27b99f=_0x5a89,_0x355832=_0x38962d();while(!![]){try{const _0x41e657=-parseInt(_0x27b99f(0x1f0))/0x1+-parseInt(_0x27b99f(0x156))/0x2*(parseInt(_0x27b99f(0x16f))/0x3)+parseInt(_0x27b99f(0x1f9))/0x4+-parseInt(_0x27b99f(0x1d5))/0x5+parseInt(_0x27b99f(0x1a5))/0x6*(-parseInt(_0x27b99f(0x1f4))/0x7)+-parseInt(_0x27b99f(0x1d3))/0x8*(parseInt(_0x27b99f(0x16e))/0x9)+parseInt(_0x27b99f(0x1ca))/0xa;if(_0x41e657===_0x110682)break;else _0x355832['push'](_0x355832['shift']());}catch(_0x147c22){_0x355832['push'](_0x355832['shift']());}}}(_0x4a04,0x27115),process[_0x40c564(0x171)][_0x40c564(0x14f)]='0');import'./config.js';import{createRequire}from'module';import _0x14fb2b,{join}from'path';function _0x4a04(){const _0x217d6a=['createInterface','announceOn','filter','register','\x0aFailed\x20to\x20register\x20your\x20phone\x20number.\x20Please\x20try\x20again.\x0a','\x20The\x20group\x20description\x20has\x20been\x20updated\x20to:\x0a@desc','Please\x20type\x20your\x20WhatsApp\x20number\x20:\x20','send','-delete','sDesc','phoneNumber','win32','10452yBUOYc','write','func','bgBlack','๐Ÿ‘‹\x20GOODBYE\x20@user\x20','\x0aFailed\x20to\x20request\x20registration\x20code.\x20Please\x20try\x20again.\x0a','connection.update','support','@g.us','error','test','registered','-\x20Number','\x0aconnection\x20closed....\x20Trying\x20to\x20Restart','freeze','PREFIX','readFromFile','SESSION_ID','server','__require','trim','creds','cyan','stopped','match','requestRegistrationCode','writeToFile','from','keys','replace','\x0aWaiting\x20For\x20Login\x0a','output','package.json','level','config','onDelete','chrome\x20(linux)','12033520FrEPQN','./session','bye','now','__dirname','spromote','toLowerCase','sRevoke','default','313848deKcTv','API','1334680UFmbwt','sRestrictOff','webp','color','argv','reset','--version','statusCode','groups.update','creds.update','warn','toString','pre-key-','url','phoneNumberCountryCode','isValid','reloadHandler','authState','yellow','\x0aDeleted\x20plugin\x20-\x20\x27','processTxtAndSaveCredentials\x20completed.','\x0aStored\x20Sessions\x20Cleared\x20โœ…','join','trace','logger','endsWith','Environment\x20variable\x20not\x20found.','229709IqSFMV','*/i!#$%+ยฃยขโ‚ฌยฅ^ยฐ=ยถโˆ†ร—รทฯ€โˆšโœ“ยฉยฎ:;?&.\x5c-.@aA','An\x20error\x20occurred\x20during\x20temporary\x20file\x20cleanup:','-filter_complex','581sXaONk','redBright','loadMessage','announceOff','sAnnounceOn','481532woVMJl','prefix','deleteUpdate','bgGreenBright','startsWith','pollUpdate','pairingNumber','catch','format','name','\x0aNew\x20plugin\x20-\x20\x27','off','stdin','credsUpdate','find','fatal','payload','\x0aUpdated\x20plugin\x20-\x20\x27','sIcon','connectionUpdate','sRestrictOn','conn','./plugins/index','then','https://www.guruapi.tech/api','\x0aInvalid\x20phone\x20number:\x20','\x0a\x0aSee\x20you\x20later!','Start\x20with\x20your\x20country\x27s\x20WhatsApp\x20code,\x20Example\x20:\x2062xxx','magick','authFolder','stdout','loadDatabase','๐Ÿ‘ค๐Ÿ™…โ€โ™‚๏ธ','groupsUpdate','SERVER_PORT','Z3VydQ==','\x0aError\x20require\x20plugin\x20\x27','phoneNumberMobileCountryCode','remoteJid','exit','close','base64','-frames:v','ffmpeg','\x20Congrats\x20you\x20have\x20successfully\x20deployed\x20GURU-BOT\x0aJoin\x20my\x20support\x20Group\x20for\x20any\x20Query\x0a\x20https://chat.whatsapp.com/F3sB3pR3tClBvVmlIkqDJp','requestPairingCode','--mobile','opts','bind','--pairing-code','parse','DATABASE','demote','method','slice','LOl','bold','\x20The\x20group\x20icon\x20has\x20been\x20updated!','Please\x20Enter\x20Your\x20OTP\x20Code','sendMessage','log','desc','./handler.js?update=','READ','child','participantsUpdate','NODE_TLS_REJECT_UNAUTHORIZED','\x0aSyntax\x20error\x20while\x20loading\x20\x27','includes','convert','forEach','__filename',',\x22time\x22:\x22','4548aJJWLz','length','messages.update','info','./handler.js','plugins','initializing\x20Guru\x20Bot','presenceUpdate','Cannot\x20use\x20pairing\x20code\x20with\x20mobile\x20api','U2VjdXJpdHkgY2hlY2sgcGFzc2VkLCBUaGFua3MgRm9yIHVzaW5nIEd1cnUgTXVsdGlEZXZpY2U=','database.json','sort','user','chats','gurubot','tmpdir','author','Start\x20with\x20your\x20country\x27s\x20WhatsApp\x20code,\x20Example\x2062xxx','reload','\x20\x20\x20','restrictOn','entries','-type','icon','63SarbbG','327CJqGqI','map','env','messages.upsert','toJSON','some','-loglevel','sdemote','greenBright','-\x20Method','APIKeys','isChats','\x20The\x20group\x20is\x20now\x20*CLOSED*!\x0aOnly\x20admins\x20can\x20send\x20messages.','message.delete','welcome','data','socket','revoke','handler','sSubject','restrictOff','read','?update=','\x0a๐Ÿšฉ\x20R\x20E\x20A\x20D\x20Y','isInit','*@user*\x20is\x20no\x20longer\x20an\x20admin.','module','*@user*\x20has\x20been\x20promoted\x20to\x20an\x20admin!','๐Ÿ“จ\x20','./server.js','Hai๐Ÿคฉ','Q2hlYXAgQ29weSBPZiBHdXJ1IEJvdCBGb3VuZCAsIFBsZWFzZSBVc2UgdGhlIE9yaWdpbmFsIEd1cnUgQm90IEZyb20gaHR0cHM6Ly9naXRodWIuY29tL0d1cnUzMjIvR1VSVS1CT1QK','\x5c$&','countryCallingCode','fromEntries','nationalNumber','subject','Error:','APIs','loggedOut','\x0aLogging\x20in....','\x20The\x20group\x20link\x20has\x20been\x20changed\x20to:\x0a@revoke'];_0x4a04=function(){return _0x217d6a;};return _0x4a04();}import{fileURLToPath,pathToFileURL}from'url';import _0x10bf43 from'./lib/tempclear.js';import _0x21dc7a from'axios';import{platform}from'process';import _0x8d3942 from'dotenv';global['__filename']=function filename(_0x501bc8=import.meta['url'],_0x22af82=platform!==_0x40c564(0x1a4)){const _0xee88bc=_0x40c564;return _0x22af82?/file:\/\/\//[_0xee88bc(0x1af)](_0x501bc8)?fileURLToPath(_0x501bc8):_0x501bc8:pathToFileURL(_0x501bc8)['toString']();},global[_0x40c564(0x1ce)]=function dirname(_0x594b04){const _0x29fe82=_0x40c564;return _0x14fb2b['dirname'](global[_0x29fe82(0x154)](_0x594b04,!![]));},global[_0x40c564(0x1b8)]=function require(_0xb2719d=import.meta['url']){return createRequire(_0xb2719d);},global[_0x40c564(0x164)]=_0x40c564(0x125);import*as _0x7ff189 from'ws';import _0x31467d from'cfonts';import{readdirSync,statSync,unlinkSync,existsSync,mkdirSync,readFileSync,rmSync,watch}from'fs';import _0x145a23 from'./lib/makesession.js';import _0x10c915 from'yargs';import{promisify}from'util';import{spawn}from'child_process';import _0x500476 from'pino';import _0x2a8d70 from'lodash';import _0x1d6144 from'chalk';import _0x4eb9f1 from'syntax-error';import{tmpdir}from'os';function _0x5a89(_0x4a5c4e,_0x32d795){const _0x4a04c9=_0x4a04();return _0x5a89=function(_0x5a89a0,_0x220b96){_0x5a89a0=_0x5a89a0-0x113;let _0x3f9ac5=_0x4a04c9[_0x5a89a0];return _0x3f9ac5;},_0x5a89(_0x4a5c4e,_0x32d795);}import{format}from'util';import{Boom}from'@hapi/boom';import _0x5650f0 from'pino';import{makeWASocket,protoType,serialize}from'./lib/simple.js';import{Low,JSONFile}from'lowdb';import{MongoDB}from'./lib/mongoDB.js';import _0xd09cde from'./lib/cloudDBAdapter.js';import _0x3d435d from'node-cache';const {DisconnectReason,useMultiFileAuthState,MessageRetryMap,fetchLatestBaileysVersion,makeCacheableSignalKeyStore,makeInMemoryStore,proto,delay,jidNormalizedUser,PHONENUMBER_MCC,Browsers}=await(await import('@whiskeysockets/baileys'))['default'];import _0x5eb767 from'readline';import{parsePhoneNumber}from'libphonenumber-js';import _0x580fe0 from'./lib/helper.js';import _0x35535f from'emoji-regex';_0x8d3942[_0x40c564(0x1c7)]();async function main(){const _0x7bd9dd=_0x40c564,_0x376ce7=process[_0x7bd9dd(0x171)][_0x7bd9dd(0x1b6)];if(!_0x376ce7){console[_0x7bd9dd(0x1ae)](_0x7bd9dd(0x1ef));return;}try{await _0x145a23(_0x376ce7),console[_0x7bd9dd(0x149)](_0x7bd9dd(0x1e9));}catch(_0x37bfdf){console[_0x7bd9dd(0x1ae)](_0x7bd9dd(0x194),_0x37bfdf);}}main(),await delay(0x3e8*0xa);async function gandu(){const _0x3fadd3=_0x40c564;try{const _0x176049=readFileSync(_0x3fadd3(0x1c5),'utf8'),_0x43da11=JSON[_0x3fadd3(0x13f)](_0x176049),_0x189ccf=_0x43da11[_0x3fadd3(0x166)]&&_0x43da11[_0x3fadd3(0x166)][_0x3fadd3(0x116)];!_0x189ccf&&(console[_0x3fadd3(0x149)](_0x3fadd3(0x144)),process[_0x3fadd3(0x134)](0x1));const _0x4fc685=Buffer[_0x3fadd3(0x1c0)](_0x3fadd3(0x130),_0x3fadd3(0x136))[_0x3fadd3(0x1e0)](),_0x129787=Buffer[_0x3fadd3(0x1c0)](_0x3fadd3(0x18e),_0x3fadd3(0x136))[_0x3fadd3(0x1e0)](),_0x24c4b8=Buffer[_0x3fadd3(0x1c0)](_0x3fadd3(0x15f),'base64')[_0x3fadd3(0x1e0)]();_0x189ccf&&_0x189ccf[_0x3fadd3(0x1b9)]()[_0x3fadd3(0x1d0)]()!==_0x4fc685[_0x3fadd3(0x1d0)]()?(console[_0x3fadd3(0x149)](_0x129787),process[_0x3fadd3(0x134)](0x1)):(console[_0x3fadd3(0x149)](''+_0x24c4b8),console[_0x3fadd3(0x149)](_0x1d6144[_0x3fadd3(0x1a8)](_0x1d6144[_0x3fadd3(0x1f5)](_0x3fadd3(0x15c)))));}catch(_0x5481fe){console[_0x3fadd3(0x1ae)](_0x3fadd3(0x194),_0x5481fe);}}gandu();const pairingCode=!!global['pairingNumber']||process[_0x40c564(0x1d9)][_0x40c564(0x151)](_0x40c564(0x13e)),useMobile=process[_0x40c564(0x1d9)]['includes'](_0x40c564(0x13b)),useQr=process['argv'][_0x40c564(0x151)]('--qr'),useStore=![],MAIN_LOGGER=_0x500476({'timestamp':()=>_0x40c564(0x155)+new Date()[_0x40c564(0x173)]()+'\x22'}),logger=MAIN_LOGGER[_0x40c564(0x14d)]({});logger[_0x40c564(0x1c6)]=_0x40c564(0x1ec);const store=useStore?makeInMemoryStore({'logger':logger}):undefined;store?.[_0x40c564(0x1b5)](_0x40c564(0x1cb)),setInterval(()=>{const _0x1c3d6b=_0x40c564;store?.[_0x1c3d6b(0x1bf)]('./session');},0x2710*0x6);const msgRetryCounterCache=new _0x3d435d(),rl=_0x5eb767[_0x40c564(0x199)]({'input':process[_0x40c564(0x119)],'output':process[_0x40c564(0x12b)]}),question=_0x120836=>new Promise(_0x28aa19=>rl['question'](_0x120836,_0x28aa19)),{CONNECTING}=_0x7ff189,{chain}=_0x2a8d70,PORT=process[_0x40c564(0x171)]['PORT']||process['env'][_0x40c564(0x12f)]||0xbb8;protoType(),serialize(),global[_0x40c564(0x1d4)]=(_0x3003d7,_0x2b8ab8='/',_0x220377={},_0x4febf5)=>(_0x3003d7 in global[_0x40c564(0x195)]?global[_0x40c564(0x195)][_0x3003d7]:_0x3003d7)+_0x2b8ab8+(_0x220377||_0x4febf5?'?'+new URLSearchParams(Object[_0x40c564(0x16b)]({..._0x220377,..._0x4febf5?{[_0x4febf5]:global[_0x40c564(0x179)][_0x3003d7 in global['APIs']?global['APIs'][_0x3003d7]:_0x3003d7]}:{}})):''),global['timestamp']={'start':new Date()};const __dirname=global[_0x40c564(0x1ce)](import.meta[_0x40c564(0x1e2)]);global[_0x40c564(0x13c)]=new Object(_0x10c915(process[_0x40c564(0x1d9)][_0x40c564(0x143)](0x2))['exitProcess'](![])[_0x40c564(0x13f)]()),global[_0x40c564(0x1fa)]=new RegExp('^['+(process[_0x40c564(0x171)][_0x40c564(0x1b4)]||_0x40c564(0x1f1))[_0x40c564(0x1c2)](/[|\\{}()[\]^$+*?.\-\^]/g,_0x40c564(0x18f))+']'),global[_0x40c564(0x13c)]['db']=process[_0x40c564(0x171)]['DATABASE_URL'],global['db']=new Low(/https?:\/\//[_0x40c564(0x1af)](opts['db']||'')?new _0xd09cde(opts['db']):/mongodb(\+srv)?:\/\//i[_0x40c564(0x1af)](opts['db'])?new MongoDB(opts['db']):new JSONFile((opts['_'][0x0]?opts['_'][0x0]+'_':'')+_0x40c564(0x160))),global[_0x40c564(0x140)]=global['db'],global[_0x40c564(0x12c)]=async function loadDatabase(){const _0x301aaf=_0x40c564;if(global['db'][_0x301aaf(0x14c)])return new Promise(_0x15e65a=>setInterval(async function(){const _0xcde579=_0x301aaf;!global['db'][_0xcde579(0x14c)]&&(clearInterval(this),_0x15e65a(global['db']['data']==null?global[_0xcde579(0x12c)]():global['db'][_0xcde579(0x17e)]));},0x1*0x3e8));if(global['db'][_0x301aaf(0x17e)]!==null)return;global['db'][_0x301aaf(0x14c)]=!![],await global['db'][_0x301aaf(0x184)]()[_0x301aaf(0x114)](console['error']),global['db'][_0x301aaf(0x14c)]=null,global['db'][_0x301aaf(0x17e)]={'users':{},'chats':{},'stats':{},'msgs':{},'sticker':{},'settings':{},...global['db'][_0x301aaf(0x17e)]||{}},global['db']['chain']=chain(global['db'][_0x301aaf(0x17e)]);},loadDatabase(),global[_0x40c564(0x12a)]='session';const {state,saveCreds}=await useMultiFileAuthState(global[_0x40c564(0x12a)]);let {version,isLatest}=await fetchLatestBaileysVersion();const connectionOptions={'version':version,'logger':_0x5650f0({'level':_0x40c564(0x11c)}),'printQRInTerminal':!pairingCode,'mobile':useMobile,'browser':[_0x40c564(0x1c9),'',''],'auth':{'creds':state[_0x40c564(0x1ba)],'keys':makeCacheableSignalKeyStore(state['keys'],_0x5650f0()[_0x40c564(0x14d)]({'level':'fatal','stream':'store'}))},'markOnlineOnConnect':!![],'generateHighQualityLinkPreview':!![],'getMessage':async _0x5ae6ca=>{const _0x27f511=_0x40c564;let _0x42cd1c=jidNormalizedUser(_0x5ae6ca[_0x27f511(0x133)]),_0x47496d=await store[_0x27f511(0x1f6)](_0x42cd1c,_0x5ae6ca['id']);return _0x47496d?.['message']||'';},'msgRetryCounterCache':msgRetryCounterCache,'defaultQueryTimeoutMs':undefined};global[_0x40c564(0x122)]=makeWASocket(connectionOptions),conn[_0x40c564(0x187)]=![],store?.['bind'](conn['ev']);if(pairingCode&&!conn[_0x40c564(0x1e6)][_0x40c564(0x1ba)][_0x40c564(0x1b0)]){if(useMobile)throw new Error(_0x40c564(0x15e));let phoneNumber;!!global[_0x40c564(0x113)]?(phoneNumber=global[_0x40c564(0x113)][_0x40c564(0x1c2)](/[^0-9]/g,''),!Object[_0x40c564(0x1c1)](PHONENUMBER_MCC)[_0x40c564(0x174)](_0xb5a944=>phoneNumber[_0x40c564(0x1fd)](_0xb5a944))&&(console[_0x40c564(0x149)](_0x1d6144[_0x40c564(0x1a8)](_0x1d6144['redBright'](_0x40c564(0x128)))),process['exit'](0x0))):(phoneNumber=await question(_0x1d6144['bgBlack'](_0x1d6144[_0x40c564(0x177)]('Please\x20type\x20your\x20WhatsApp\x20number\x20:\x20'))),phoneNumber=phoneNumber[_0x40c564(0x1c2)](/[^0-9]/g,''),!Object[_0x40c564(0x1c1)](PHONENUMBER_MCC)[_0x40c564(0x174)](_0xa72aa4=>phoneNumber['startsWith'](_0xa72aa4))&&(console['log'](_0x1d6144[_0x40c564(0x1a8)](_0x1d6144[_0x40c564(0x1f5)](_0x40c564(0x128)))),phoneNumber=await question(_0x1d6144['bgBlack'](_0x1d6144['greenBright'](_0x40c564(0x19f)))),phoneNumber=phoneNumber[_0x40c564(0x1c2)](/[^0-9]/g,''),rl[_0x40c564(0x135)]())),setTimeout(async()=>{const _0x538004=_0x40c564;let _0x86700b=await conn[_0x538004(0x13a)](phoneNumber);_0x86700b=_0x86700b?.[_0x538004(0x1bd)](/.{1,4}/g)?.[_0x538004(0x1eb)]('-')||_0x86700b;const _0x37a259=_0x1d6144[_0x538004(0x145)][_0x538004(0x177)]('Your\x20Pairing\x20Code:')+'\x20'+_0x1d6144[_0x538004(0x1fc)](_0x1d6144['black'](_0x86700b));console[_0x538004(0x149)](_0x37a259);},0xbb8);}if(useMobile&&!conn[_0x40c564(0x1e6)]['creds']['registered']){const {registration}=conn[_0x40c564(0x1e6)][_0x40c564(0x1ba)]||{'registration':{}};if(!registration['phoneNumber']){console['log']('๐Ÿ“จ\x20'+_0x1d6144['redBright']('Please\x20type\x20your\x20WhatsApp\x20number')+':');let phoneNumber=await question(_0x40c564(0x169)+_0x1d6144[_0x40c564(0x1bb)](_0x40c564(0x1b1))+':\x20');phoneNumber=phoneNumber[_0x40c564(0x1c2)](/[^0-9]/g,''),!Object[_0x40c564(0x1c1)](PHONENUMBER_MCC)[_0x40c564(0x174)](_0x2728b5=>phoneNumber[_0x40c564(0x1fd)](_0x2728b5))&&(console[_0x40c564(0x149)]('๐Ÿ’ฌ\x20'+_0x1d6144[_0x40c564(0x1f5)](_0x40c564(0x167))+':'),console[_0x40c564(0x149)](_0x40c564(0x18b)+_0x1d6144['redBright']('Please\x20type\x20your\x20WhatsApp\x20number')+':'),phoneNumber=await question('\x20\x20\x20'+_0x1d6144['cyan'](_0x40c564(0x1b1))+':\x20'),phoneNumber=phoneNumber[_0x40c564(0x1c2)](/[^0-9]/g,'')),registration[_0x40c564(0x1a3)]='+'+phoneNumber;}const phoneNumber=parsePhoneNumber(registration[_0x40c564(0x1a3)]);if(!phoneNumber[_0x40c564(0x1e4)]())conn[_0x40c564(0x1ed)]['error'](_0x40c564(0x126)+registration[_0x40c564(0x1a3)]);registration[_0x40c564(0x1a3)]=phoneNumber[_0x40c564(0x115)]('E.164'),registration[_0x40c564(0x1e3)]=phoneNumber[_0x40c564(0x190)],registration['phoneNumberNationalNumber']=phoneNumber[_0x40c564(0x192)];const mcc=PHONENUMBER_MCC[phoneNumber[_0x40c564(0x190)]];registration[_0x40c564(0x132)]=mcc;async function enterCode(){const _0x4448e6=_0x40c564;try{console[_0x4448e6(0x149)]('๐Ÿ“จ\x20'+_0x1d6144[_0x4448e6(0x1f5)](_0x4448e6(0x147))+':');const _0x41e7ae=await question(_0x4448e6(0x169)+_0x1d6144[_0x4448e6(0x1bb)]('-\x20Code')+':\x20'),_0x2c7cac=await conn[_0x4448e6(0x19c)](_0x41e7ae[_0x4448e6(0x1c2)](/[^0-9]/g,'')['trim']()['toLowerCase']());console[_0x4448e6(0x149)]('๐Ÿ’ฌ\x20'+_0x1d6144['redBright']('Successfully\x20registered\x20your\x20phone\x20number.')),console[_0x4448e6(0x149)](_0x2c7cac),rl['close']();}catch(_0x3e9bac){conn[_0x4448e6(0x1ed)][_0x4448e6(0x1ae)](_0x4448e6(0x19d),_0x3e9bac),await askOTP();}}async function askOTP(){const _0x1a198c=_0x40c564;console[_0x1a198c(0x149)](_0x1a198c(0x18b)+_0x1d6144[_0x1a198c(0x1f5)]('What\x20method\x20do\x20you\x20want\x20to\x20use?\x20\x22sms\x22\x20or\x20\x22voice\x22'));let _0x11b7f3=await question('\x20\x20\x20'+_0x1d6144['cyan'](_0x1a198c(0x178))+':\x20');_0x11b7f3=_0x11b7f3['replace'](/["']/g,'')[_0x1a198c(0x1b9)]()['toLowerCase']();if(_0x11b7f3!=='sms'&&_0x11b7f3!=='voice')return await askOTP();registration[_0x1a198c(0x142)]=_0x11b7f3;try{await conn[_0x1a198c(0x1be)](registration),await enterCode();}catch(_0xb88e15){conn[_0x1a198c(0x1ed)][_0x1a198c(0x1ae)](_0x1a198c(0x1aa),_0xb88e15),await askOTP();}}await askOTP();}conn['logger'][_0x40c564(0x159)](_0x40c564(0x1c3));!opts[_0x40c564(0x1af)]&&(global['db']&&setInterval(async()=>{const _0xd692c3=_0x40c564;if(global['db'][_0xd692c3(0x17e)])await global['db'][_0xd692c3(0x1a6)]();if(opts['autocleartmp']&&(global[_0xd692c3(0x1ac)]||{})[_0xd692c3(0x11b)])tmp=[os[_0xd692c3(0x165)](),'tmp'],tmp['forEach'](_0x1bff95=>cp['spawn'](_0xd692c3(0x11b),[_0x1bff95,'-amin','3',_0xd692c3(0x16c),'f',_0xd692c3(0x1a1)]));},0x1e*0x3e8));if(opts[_0x40c564(0x1b7)])(await import(_0x40c564(0x18c)))['default'](global[_0x40c564(0x122)],PORT);function runCleanup(){const _0x8b9ee9=_0x40c564;_0x10bf43()[_0x8b9ee9(0x124)](()=>{const _0x221b64=_0x8b9ee9;console[_0x221b64(0x149)]('Temporary\x20file\x20cleanup\x20completed.');})[_0x8b9ee9(0x114)](_0x5d9434=>{const _0x27b8eb=_0x8b9ee9;console['error'](_0x27b8eb(0x1f2),_0x5d9434);})['finally'](()=>{setTimeout(runCleanup,0x3e8*0x3c*0x2);});}runCleanup();function purgeSession(){const _0x11e395=_0x40c564;let _0x210934=[];const _0xe0e5c=readdirSync(_0x11e395(0x1cb)),_0x485a0c=_0xe0e5c[_0x11e395(0x19b)](_0x29064e=>{const _0x5ee33c=_0x11e395;return _0x29064e[_0x5ee33c(0x1fd)](_0x5ee33c(0x1e1));});_0x210934=[..._0x210934,..._0x485a0c],_0x485a0c[_0x11e395(0x153)](_0x2bffd0=>{unlinkSync('./session/'+_0x2bffd0);});}async function connectionUpdate(_0x2227a4){const _0x56cffb=_0x40c564,{connection:_0x1d68be,lastDisconnect:_0x1b229b,isNewLogin:_0x12a065,qr:_0xbef497}=_0x2227a4;global[_0x56cffb(0x1bc)]=_0x1d68be;if(_0x12a065)conn[_0x56cffb(0x187)]=!![];const _0x291160=_0x1b229b?.['error']?.[_0x56cffb(0x1c4)]?.[_0x56cffb(0x1dc)]||_0x1b229b?.[_0x56cffb(0x1ae)]?.[_0x56cffb(0x1c4)]?.[_0x56cffb(0x11d)]?.[_0x56cffb(0x1dc)];_0x291160&&_0x291160!==DisconnectReason[_0x56cffb(0x196)]&&conn?.['ws'][_0x56cffb(0x17f)]==null&&conn[_0x56cffb(0x1ed)]['info'](await global[_0x56cffb(0x1e5)](!![])[_0x56cffb(0x114)](console[_0x56cffb(0x1ae)]));if(global['db'][_0x56cffb(0x17e)]==null)loadDatabase();!pairingCode&&!useMobile&&useQr&&_0xbef497!=0x0&&_0xbef497!=undefined&&conn[_0x56cffb(0x1ed)]['info'](_0x1d6144[_0x56cffb(0x1e7)](_0x56cffb(0x197)));if(_0x1d68be==='open'){const {jid:_0x352e10,name:_0x20f35b}=conn[_0x56cffb(0x162)];let _0x3f7977=_0x56cffb(0x18d)+_0x20f35b+_0x56cffb(0x139),_0x566791=conn[_0x56cffb(0x148)](_0x352e10,{'text':_0x3f7977,'mentions':[_0x352e10]},{'quoted':null});conn[_0x56cffb(0x1ed)][_0x56cffb(0x159)](_0x1d6144[_0x56cffb(0x1e7)](_0x56cffb(0x186)));}_0x1d68be==_0x56cffb(0x135)&&(conn[_0x56cffb(0x1ed)][_0x56cffb(0x1ae)](_0x1d6144['yellow'](_0x56cffb(0x1b2))),process[_0x56cffb(0x1a0)](_0x56cffb(0x1da)));}process['on']('uncaughtException',console[_0x40c564(0x1ae)]);let isInit=!![],handler=await import(_0x40c564(0x15a));global[_0x40c564(0x1e5)]=async function(_0x39a9d2){const _0x347c62=_0x40c564;try{const _0x1b035a=await import(_0x347c62(0x14b)+Date[_0x347c62(0x1cd)]())[_0x347c62(0x114)](console['error']);if(Object[_0x347c62(0x1c1)](_0x1b035a||{})[_0x347c62(0x157)])handler=_0x1b035a;}catch(_0x146318){console[_0x347c62(0x1ae)];}if(_0x39a9d2){const _0x5bffed=global[_0x347c62(0x122)][_0x347c62(0x163)];try{global['conn']['ws'][_0x347c62(0x135)]();}catch{}conn['ev']['removeAllListeners'](),global[_0x347c62(0x122)]=makeWASocket(connectionOptions,{'chats':_0x5bffed}),isInit=!![];}!isInit&&(conn['ev'][_0x347c62(0x118)](_0x347c62(0x172),conn['handler']),conn['ev'][_0x347c62(0x118)]('messages.update',conn['pollUpdate']),conn['ev'][_0x347c62(0x118)]('group-participants.update',conn[_0x347c62(0x14e)]),conn['ev'][_0x347c62(0x118)]('groups.update',conn[_0x347c62(0x12e)]),conn['ev'][_0x347c62(0x118)](_0x347c62(0x17c),conn['onDelete']),conn['ev']['off']('presence.update',conn['presenceUpdate']),conn['ev'][_0x347c62(0x118)](_0x347c62(0x1ab),conn[_0x347c62(0x120)]),conn['ev'][_0x347c62(0x118)]('creds.update',conn[_0x347c62(0x11a)]));const _0x3e14a7={'welcome':'๐Ÿ‘‹','bye':'๐Ÿ‘‹','promote':'๐Ÿ‘ค๐Ÿ‘‘','demote':_0x347c62(0x12d),'desc':'๐Ÿ“','subject':'๐Ÿ“Œ','icon':'๐Ÿ–ผ๏ธ','revoke':'๐Ÿ”—','announceOn':'๐Ÿ”’','announceOff':'๐Ÿ”“','restrictOn':'๐Ÿšซ','restrictOff':'โœ…'};conn[_0x347c62(0x17d)]=_0x3e14a7[_0x347c62(0x17d)]+'\x20Hello\x20@user!\x0a\x0a๐ŸŽ‰\x20*WELCOME*\x20to\x20the\x20group\x20@group!\x0a\x0a๐Ÿ“œ\x20Please\x20read\x20the\x20*DESCRIPTION*\x20@desc.',conn[_0x347c62(0x1cc)]=_0x347c62(0x1a9)+_0x3e14a7[_0x347c62(0x1cc)]+_0x347c62(0x127),conn[_0x347c62(0x1cf)]=_0x3e14a7['promote']+_0x347c62(0x18a),conn[_0x347c62(0x176)]=_0x3e14a7[_0x347c62(0x141)]+_0x347c62(0x188),conn[_0x347c62(0x1a2)]=_0x3e14a7[_0x347c62(0x14a)]+_0x347c62(0x19e),conn[_0x347c62(0x182)]=_0x3e14a7[_0x347c62(0x193)]+'\x20The\x20group\x20title\x20has\x20been\x20changed\x20to:\x0a@group',conn[_0x347c62(0x11f)]=_0x3e14a7[_0x347c62(0x16d)]+_0x347c62(0x146),conn[_0x347c62(0x1d1)]=_0x3e14a7[_0x347c62(0x180)]+_0x347c62(0x198),conn[_0x347c62(0x1f8)]=_0x3e14a7[_0x347c62(0x19a)]+_0x347c62(0x17b),conn['sAnnounceOff']=_0x3e14a7[_0x347c62(0x1f7)]+'\x20The\x20group\x20is\x20now\x20*OPEN*!\x0aAll\x20participants\x20can\x20send\x20messages.',conn[_0x347c62(0x121)]=_0x3e14a7[_0x347c62(0x16a)]+'\x20Edit\x20Group\x20Info\x20has\x20been\x20restricted\x20to\x20admins\x20only!',conn[_0x347c62(0x1d6)]=_0x3e14a7[_0x347c62(0x183)]+'\x20Edit\x20Group\x20Info\x20is\x20now\x20available\x20to\x20all\x20participants!',conn['handler']=handler['handler'][_0x347c62(0x13d)](global[_0x347c62(0x122)]),conn[_0x347c62(0x1fe)]=handler[_0x347c62(0x1fe)][_0x347c62(0x13d)](global[_0x347c62(0x122)]),conn[_0x347c62(0x14e)]=handler['participantsUpdate'][_0x347c62(0x13d)](global[_0x347c62(0x122)]),conn[_0x347c62(0x12e)]=handler[_0x347c62(0x12e)]['bind'](global[_0x347c62(0x122)]),conn[_0x347c62(0x1c8)]=handler[_0x347c62(0x1fb)][_0x347c62(0x13d)](global[_0x347c62(0x122)]),conn['presenceUpdate']=handler[_0x347c62(0x15d)][_0x347c62(0x13d)](global['conn']),conn['connectionUpdate']=connectionUpdate[_0x347c62(0x13d)](global[_0x347c62(0x122)]),conn['credsUpdate']=saveCreds['bind'](global['conn'],!![]);const _0xe020a1=new Date(),_0x498952=new Date(conn['ev']);if(_0xe020a1>=_0x498952){const _0x240e21=Object[_0x347c62(0x16b)](conn['chats'])[_0x347c62(0x19b)](([_0x19ddfa,_0x292975])=>!_0x19ddfa[_0x347c62(0x1ee)]('@g.us')&&_0x292975[_0x347c62(0x17a)])[_0x347c62(0x170)](_0x3635b2=>_0x3635b2[0x0]);}else{const _0x193913=Object[_0x347c62(0x16b)](conn[_0x347c62(0x163)])[_0x347c62(0x19b)](([_0x2a5005,_0xcbc6a9])=>!_0x2a5005['endsWith'](_0x347c62(0x1ad))&&_0xcbc6a9[_0x347c62(0x17a)])[_0x347c62(0x170)](_0x345717=>_0x345717[0x0]);}return conn['ev']['on']('messages.upsert',conn[_0x347c62(0x181)]),conn['ev']['on'](_0x347c62(0x158),conn[_0x347c62(0x1fe)]),conn['ev']['on']('group-participants.update',conn[_0x347c62(0x14e)]),conn['ev']['on'](_0x347c62(0x1dd),conn[_0x347c62(0x12e)]),conn['ev']['on'](_0x347c62(0x17c),conn['onDelete']),conn['ev']['on']('presence.update',conn[_0x347c62(0x15d)]),conn['ev']['on']('connection.update',conn[_0x347c62(0x120)]),conn['ev']['on'](_0x347c62(0x1de),conn['credsUpdate']),isInit=![],!![];};const pluginFolder=global['__dirname'](join(__dirname,_0x40c564(0x123))),pluginFilter=_0x5ae99f=>/\.js$/[_0x40c564(0x1af)](_0x5ae99f);global[_0x40c564(0x15b)]={};async function filesInit(){const _0x14fb6=_0x40c564;for(const _0x2b0b10 of readdirSync(pluginFolder)[_0x14fb6(0x19b)](pluginFilter)){try{const _0x2c3136=global[_0x14fb6(0x154)](join(pluginFolder,_0x2b0b10)),_0x2faf1c=await import(_0x2c3136);global[_0x14fb6(0x15b)][_0x2b0b10]=_0x2faf1c[_0x14fb6(0x1d2)]||_0x2faf1c;}catch(_0x40e29a){conn[_0x14fb6(0x1ed)][_0x14fb6(0x1ae)](_0x40e29a),delete global[_0x14fb6(0x15b)][_0x2b0b10];}}}filesInit()[_0x40c564(0x124)](_0x241fb9=>Object[_0x40c564(0x1c1)](global['plugins']))[_0x40c564(0x114)](console[_0x40c564(0x1ae)]),global[_0x40c564(0x168)]=async(_0x4d3a28,_0xcfb2dc)=>{const _0x38f4eb=_0x40c564;if(pluginFilter(_0xcfb2dc)){const _0x305783=global[_0x38f4eb(0x154)](join(pluginFolder,_0xcfb2dc),!![]);if(_0xcfb2dc in global[_0x38f4eb(0x15b)]){if(existsSync(_0x305783))conn['logger'][_0x38f4eb(0x159)](_0x38f4eb(0x11e)+_0xcfb2dc+'\x27');else return conn[_0x38f4eb(0x1ed)][_0x38f4eb(0x1df)](_0x38f4eb(0x1e8)+_0xcfb2dc+'\x27'),delete global[_0x38f4eb(0x15b)][_0xcfb2dc];}else conn['logger'][_0x38f4eb(0x159)](_0x38f4eb(0x117)+_0xcfb2dc+'\x27');const _0x142128=_0x4eb9f1(readFileSync(_0x305783),_0xcfb2dc,{'sourceType':_0x38f4eb(0x189),'allowAwaitOutsideFunction':!![]});if(_0x142128)conn[_0x38f4eb(0x1ed)][_0x38f4eb(0x1ae)](_0x38f4eb(0x150)+_0xcfb2dc+'\x27\x0a'+format(_0x142128));else try{const _0x458948=await import(global[_0x38f4eb(0x154)](_0x305783)+_0x38f4eb(0x185)+Date[_0x38f4eb(0x1cd)]());global[_0x38f4eb(0x15b)][_0xcfb2dc]=_0x458948[_0x38f4eb(0x1d2)]||_0x458948;}catch(_0x2ac174){conn[_0x38f4eb(0x1ed)][_0x38f4eb(0x1ae)](_0x38f4eb(0x131)+_0xcfb2dc+'\x0a'+format(_0x2ac174)+'\x27');}finally{global[_0x38f4eb(0x15b)]=Object[_0x38f4eb(0x191)](Object[_0x38f4eb(0x16b)](global[_0x38f4eb(0x15b)])[_0x38f4eb(0x161)](([_0x124a34],[_0x41287e])=>_0x124a34['localeCompare'](_0x41287e)));}}},Object[_0x40c564(0x1b3)](global[_0x40c564(0x168)]),watch(pluginFolder,global[_0x40c564(0x168)]),await global['reloadHandler']();async function _quickTest(){const _0x9dc309=_0x40c564,_0x5822fa=await Promise['all']([spawn('ffmpeg'),spawn('ffprobe'),spawn(_0x9dc309(0x138),['-hide_banner',_0x9dc309(0x175),_0x9dc309(0x1ae),_0x9dc309(0x1f3),_0x9dc309(0x1d8),_0x9dc309(0x137),'1','-f',_0x9dc309(0x1d7),'-']),spawn(_0x9dc309(0x152)),spawn(_0x9dc309(0x129)),spawn('gm'),spawn(_0x9dc309(0x11b),[_0x9dc309(0x1db)])][_0x9dc309(0x170)](_0x14c115=>{return Promise['race']([new Promise(_0x4ce2aa=>{_0x14c115['on']('close',_0x461c4a=>{_0x4ce2aa(_0x461c4a!==0x7f);});}),new Promise(_0x578e74=>{const _0x58eead=_0x5a89;_0x14c115['on'](_0x58eead(0x1ae),_0xcc1fd6=>_0x578e74(![]));})]);})),[_0x36c941,_0x5f1616,_0x5db511,_0x330273,_0x42a318,_0x2acd2f,_0x3a4855]=_0x5822fa,_0x1649dc=global[_0x9dc309(0x1ac)]={'ffmpeg':_0x36c941,'ffprobe':_0x5f1616,'ffmpegWebp':_0x5db511,'convert':_0x330273,'magick':_0x42a318,'gm':_0x2acd2f,'find':_0x3a4855};Object['freeze'](global[_0x9dc309(0x1ac)]);}const actions=[{'func':purgeSession,'message':_0x40c564(0x1ea)}];for(const action of actions){setInterval(async()=>{const _0x5f3d25=_0x40c564;if(stopped==='close'||!conn||!conn['user'])return;await action[_0x5f3d25(0x1a7)](),console[_0x5f3d25(0x149)](_0x1d6144['cyanBright'](action['message']+'\x0a'));},0xa*0x3c*0x3e8);}_quickTest()[_0x40c564(0x114)](console[_0x40c564(0x1ae)]); +const _0x374239=_0x4b29;(function(_0xe49a30,_0x2d13fe){const _0x57d570=_0x4b29,_0x2d5b05=_0xe49a30();while(!![]){try{const _0x21ae1f=-parseInt(_0x57d570(0x286))/0x1*(-parseInt(_0x57d570(0x1b7))/0x2)+parseInt(_0x57d570(0x1db))/0x3*(parseInt(_0x57d570(0x1e8))/0x4)+-parseInt(_0x57d570(0x1ca))/0x5*(-parseInt(_0x57d570(0x25d))/0x6)+-parseInt(_0x57d570(0x1f5))/0x7+parseInt(_0x57d570(0x239))/0x8*(-parseInt(_0x57d570(0x28a))/0x9)+parseInt(_0x57d570(0x26f))/0xa+parseInt(_0x57d570(0x20b))/0xb*(-parseInt(_0x57d570(0x1ef))/0xc);if(_0x21ae1f===_0x2d13fe)break;else _0x2d5b05['push'](_0x2d5b05['shift']());}catch(_0x1d5f1b){_0x2d5b05['push'](_0x2d5b05['shift']());}}}(_0x2e13,0x8c2b2),process[_0x374239(0x207)][_0x374239(0x1c7)]='0');import'./config.js';import{createRequire}from'module';import _0x2e740d,{join}from'path';import{fileURLToPath,pathToFileURL}from'url';function _0x2e13(){const _0x3881bd=['replace','./plugins/index','message','pollUpdate','removeAllListeners','freeze','__filename','level','6bzppUh','redBright','connectionUpdate','requestPairingCode','from','payload','test','localeCompare','sSubject','?update=','Hai๐Ÿคฉ','handler','greenBright','Start\x20with\x20your\x20country\x27s\x20WhatsApp\x20code,\x20Example\x2062xxx','plugins','reset','Environment\x20variable\x20not\x20found.','stdin','10150140sRApnZ','\x20\x20\x20','output','๐Ÿ“จ\x20','spromote','An\x20error\x20occurred\x20during\x20temporary\x20file\x20cleanup:','exit','argv','sms','isInit','server','E.164','isChats','loggedOut','cyan','socket','\x0aconnection\x20closed....\x20Trying\x20to\x20Restart','log','filter','sRestrictOff','support','__dirname','opts','3731gfbgay','toLowerCase','APIKeys','ffprobe','18531Nnwgef','https://www.guruapi.tech/api','endsWith','win32','welcome','loadDatabase','database.json','creds.update','registered','\x20The\x20group\x20icon\x20has\x20been\x20updated!','bye','pre-key-','*@user*\x20has\x20been\x20promoted\x20to\x20an\x20admin!','chain','phoneNumberMobileCountryCode','PORT','sendMessage','PREFIX','API','createInterface','message.delete','subject','APIs','./session','package.json','\x0a๐Ÿšฉ\x20R\x20E\x20A\x20D\x20Y','connection.update','messages.upsert','statusCode','\x20The\x20group\x20is\x20now\x20*OPEN*!\x0aAll\x20participants\x20can\x20send\x20messages.','close','Error:','question',',\x22time\x22:\x22','match','๐Ÿ–ผ๏ธ','*@user*\x20is\x20no\x20longer\x20an\x20admin.','./session/','582Cdxoxd','read','--pairing-code','exitProcess','now','demote','--mobile','bold','promote','--qr','creds','forEach','-\x20Code','tmp','off','join','NODE_TLS_REJECT_UNAUTHORIZED','toJSON','-filter_complex','4432605OcKprw','@g.us','webp','error','name','announceOff','send','some','color','loadMessage','fatal','\x0aStored\x20Sessions\x20Cleared\x20โœ…','icon','\x0aNew\x20plugin\x20-\x20\x27','trim','sAnnounceOff','trace','6306uEwKbK','length','author','restrictOn','nationalNumber','\x0aFailed\x20to\x20register\x20your\x20phone\x20number.\x20Please\x20try\x20again.\x0a','write','prefix','toString','Cannot\x20use\x20pairing\x20code\x20with\x20mobile\x20api','restrictOff','-type','data','1468ozJlZY','ffmpeg','sort','revoke','./server.js','--version','reload','132WyuXmz','\x20The\x20group\x20is\x20now\x20*CLOSED*!\x0aOnly\x20admins\x20can\x20send\x20messages.','conn','autocleartmp','session','stdout','936999jKgotA','Please\x20type\x20your\x20WhatsApp\x20number\x20:\x20','Temporary\x20file\x20cleanup\x20completed.','readFromFile','tmpdir','open','\x0aError\x20require\x20plugin\x20\x27','authState','yellow','url','parse','logger','๐Ÿ‘ค๐Ÿ‘‘','\x0aLogging\x20in....','group-participants.update','\x20Hello\x20@user!\x0a\x0a๐ŸŽ‰\x20*WELCOME*\x20to\x20the\x20group\x20@group!\x0a\x0a๐Ÿ“œ\x20Please\x20read\x20the\x20*DESCRIPTION*\x20@desc.','initializing\x20Guru\x20Bot','SESSION_ID','env','\x0aUpdated\x20plugin\x20-\x20\x27','phoneNumber','countryCallingCode','1967669bZgljs','-\x20Number','authFolder','func','catch','\x20Congrats\x20you\x20have\x20successfully\x20deployed\x20GURU-BOT\x0aJoin\x20my\x20support\x20Group\x20for\x20any\x20Query\x0a\x20https://chat.whatsapp.com/F3sB3pR3tClBvVmlIkqDJp','dirname','Q2hlYXAgQ29weSBPZiBHdXJ1IEJvdCBGb3VuZCAsIFBsZWFzZSBVc2UgdGhlIE9yaWdpbmFsIEd1cnUgQm90IEZyb20gaHR0cHM6Ly9naXRodWIuY29tL0d1cnUzMjIvR1VSVS1CT1QK','presenceUpdate','all','\x0aInvalid\x20phone\x20number:\x20','Start\x20with\x20your\x20country\x27s\x20WhatsApp\x20code,\x20Example\x20:\x2062xxx','desc','default','requestRegistrationCode','phoneNumberNationalNumber','-loglevel','./handler.js','child','__require','info','keys','-hide_banner','bgBlack','onDelete','READ','๐Ÿ‘‹\x20GOODBYE\x20@user\x20','chats','participantsUpdate','uncaughtException','map','-amin','\x0aDeleted\x20plugin\x20-\x20\x27','reloadHandler','pairingNumber','fromEntries','phoneNumberCountryCode','bind','convert','race','-frames:v','DATABASE_URL','timestamp','๐Ÿ‘ค๐Ÿ™…โ€โ™‚๏ธ','warn','SERVER_PORT','4208ErJGfs','messages.update','Please\x20Enter\x20Your\x20OTP\x20Code','presence.update','groupsUpdate','startsWith','Successfully\x20registered\x20your\x20phone\x20number.','sDesc','groups.update','then','slice','sRevoke','magick','entries','voice','Please\x20type\x20your\x20WhatsApp\x20number','\x20The\x20group\x20description\x20has\x20been\x20updated\x20to:\x0a@desc','\x20The\x20group\x20title\x20has\x20been\x20changed\x20to:\x0a@group','\x20Edit\x20Group\x20Info\x20has\x20been\x20restricted\x20to\x20admins\x20only!','Z3VydQ==','sRestrictOn','find','credsUpdate','spawn','base64','register','includes','@whiskeysockets/baileys'];_0x2e13=function(){return _0x3881bd;};return _0x2e13();}import _0x456d95 from'./lib/tempclear.js';import _0xbef445 from'axios';import{platform}from'process';import _0x58cc04 from'dotenv';global['__filename']=function filename(_0x5f3d8e=import.meta[_0x374239(0x1fe)],_0xf164d=platform!==_0x374239(0x28d)){const _0xb9e94b=_0x374239;return _0xf164d?/file:\/\/\//[_0xb9e94b(0x263)](_0x5f3d8e)?fileURLToPath(_0x5f3d8e):_0x5f3d8e:pathToFileURL(_0x5f3d8e)[_0xb9e94b(0x1e3)]();},global[_0x374239(0x284)]=function dirname(_0x433294){const _0x518d71=_0x374239;return _0x2e740d[_0x518d71(0x211)](global[_0x518d71(0x25b)](_0x433294,!![]));},global[_0x374239(0x21e)]=function require(_0x470632=import.meta[_0x374239(0x1fe)]){return createRequire(_0x470632);},global['gurubot']=_0x374239(0x28b);import*as _0x4e9817 from'ws';import _0x4c7a7b from'cfonts';import{readdirSync,statSync,unlinkSync,existsSync,mkdirSync,readFileSync,rmSync,watch}from'fs';import _0x4a9f72 from'./lib/makesession.js';import _0x5f3915 from'yargs';import{promisify}from'util';import{spawn}from'child_process';import _0x421e30 from'pino';import _0x119f07 from'lodash';import _0x499532 from'chalk';import _0x37cb86 from'syntax-error';import{tmpdir}from'os';import{format}from'util';import{Boom}from'@hapi/boom';import _0x51a471 from'pino';import{makeWASocket,protoType,serialize}from'./lib/simple.js';import{Low,JSONFile}from'lowdb';import{MongoDB}from'./lib/mongoDB.js';import _0x543439 from'./lib/cloudDBAdapter.js';import _0x4ab311 from'node-cache';const {DisconnectReason,useMultiFileAuthState,MessageRetryMap,fetchLatestBaileysVersion,makeCacheableSignalKeyStore,makeInMemoryStore,proto,delay,jidNormalizedUser,PHONENUMBER_MCC,Browsers}=await(await import(_0x374239(0x254)))[_0x374239(0x218)];import _0x162cd5 from'readline';import{parsePhoneNumber}from'libphonenumber-js';import _0x18bfc6 from'./lib/helper.js';import _0x563097 from'emoji-regex';_0x58cc04['config']();async function main(){const _0x25f163=_0x374239,_0x3208a7=process[_0x25f163(0x207)][_0x25f163(0x206)];if(!_0x3208a7){console['error'](_0x25f163(0x26d));return;}try{await _0x4a9f72(_0x3208a7),console['log']('processTxtAndSaveCredentials\x20completed.');}catch(_0x3cff24){console['error'](_0x25f163(0x1b0),_0x3cff24);}}main(),await delay(0x3e8*0xa);async function gandu(){const _0x14b17a=_0x374239;try{const _0x2037c5=readFileSync(_0x14b17a(0x1a9),'utf8'),_0x4c3a1e=JSON[_0x14b17a(0x1ff)](_0x2037c5),_0x4a7429=_0x4c3a1e[_0x14b17a(0x1dd)]&&_0x4c3a1e[_0x14b17a(0x1dd)][_0x14b17a(0x1ce)];!_0x4a7429&&(console[_0x14b17a(0x280)]('LOl'),process[_0x14b17a(0x275)](0x1));const _0x5c54b6=Buffer[_0x14b17a(0x261)](_0x14b17a(0x24c),_0x14b17a(0x251))[_0x14b17a(0x1e3)](),_0x55ff3b=Buffer[_0x14b17a(0x261)](_0x14b17a(0x212),'base64')['toString'](),_0x40fa41=Buffer[_0x14b17a(0x261)]('U2VjdXJpdHkgY2hlY2sgcGFzc2VkLCBUaGFua3MgRm9yIHVzaW5nIEd1cnUgTXVsdGlEZXZpY2U=',_0x14b17a(0x251))[_0x14b17a(0x1e3)]();_0x4a7429&&_0x4a7429[_0x14b17a(0x1d8)]()[_0x14b17a(0x287)]()!==_0x5c54b6[_0x14b17a(0x287)]()?(console['log'](_0x55ff3b),process['exit'](0x1)):(console['log'](''+_0x40fa41),console[_0x14b17a(0x280)](_0x499532['bgBlack'](_0x499532[_0x14b17a(0x25e)](_0x14b17a(0x205)))));}catch(_0xeac76a){console[_0x14b17a(0x1cd)](_0x14b17a(0x1b0),_0xeac76a);}}gandu();const pairingCode=!!global[_0x374239(0x22d)]||process['argv'][_0x374239(0x253)](_0x374239(0x1b9)),useMobile=process[_0x374239(0x276)][_0x374239(0x253)](_0x374239(0x1bd)),useQr=process[_0x374239(0x276)]['includes'](_0x374239(0x1c0)),useStore=![],MAIN_LOGGER=_0x421e30({'timestamp':()=>_0x374239(0x1b2)+new Date()[_0x374239(0x1c8)]()+'\x22'}),logger=MAIN_LOGGER['child']({});logger[_0x374239(0x25c)]=_0x374239(0x1da);const store=useStore?makeInMemoryStore({'logger':logger}):undefined;store?.[_0x374239(0x1f8)]('./session'),setInterval(()=>{const _0x3904c2=_0x374239;store?.['writeToFile'](_0x3904c2(0x1a8));},0x2710*0x6);const msgRetryCounterCache=new _0x4ab311(),rl=_0x162cd5[_0x374239(0x1a4)]({'input':process[_0x374239(0x26e)],'output':process[_0x374239(0x1f4)]}),question=_0x37bcb9=>new Promise(_0x1394ec=>rl[_0x374239(0x1b1)](_0x37bcb9,_0x1394ec)),{CONNECTING}=_0x4e9817,{chain}=_0x119f07,PORT=process[_0x374239(0x207)][_0x374239(0x1a0)]||process['env'][_0x374239(0x238)]||0xbb8;protoType(),serialize(),global[_0x374239(0x1a3)]=(_0x2d7fa4,_0x4a9957='/',_0x3e5033={},_0x44a96c)=>(_0x2d7fa4 in global[_0x374239(0x1a7)]?global[_0x374239(0x1a7)][_0x2d7fa4]:_0x2d7fa4)+_0x4a9957+(_0x3e5033||_0x44a96c?'?'+new URLSearchParams(Object[_0x374239(0x246)]({..._0x3e5033,..._0x44a96c?{[_0x44a96c]:global[_0x374239(0x288)][_0x2d7fa4 in global[_0x374239(0x1a7)]?global['APIs'][_0x2d7fa4]:_0x2d7fa4]}:{}})):''),global[_0x374239(0x235)]={'start':new Date()};const __dirname=global[_0x374239(0x284)](import.meta[_0x374239(0x1fe)]);global[_0x374239(0x285)]=new Object(_0x5f3915(process[_0x374239(0x276)][_0x374239(0x243)](0x2))[_0x374239(0x1ba)](![])[_0x374239(0x1ff)]()),global[_0x374239(0x1e2)]=new RegExp('^['+(process[_0x374239(0x207)][_0x374239(0x1a2)]||'*/i!#$%+ยฃยขโ‚ฌยฅ^ยฐ=ยถโˆ†ร—รทฯ€โˆšโœ“ยฉยฎ:;?&.\x5c-.@')[_0x374239(0x255)](/[|\\{}()[\]^$+*?.\-\^]/g,'\x5c$&')+']'),global[_0x374239(0x285)]['db']=process[_0x374239(0x207)][_0x374239(0x234)],global['db']=new Low(/https?:\/\//['test'](opts['db']||'')?new _0x543439(opts['db']):/mongodb(\+srv)?:\/\//i[_0x374239(0x263)](opts['db'])?new MongoDB(opts['db']):new JSONFile((opts['_'][0x0]?opts['_'][0x0]+'_':'')+_0x374239(0x290))),global['DATABASE']=global['db'],global[_0x374239(0x28f)]=async function loadDatabase(){const _0x4e4056=_0x374239;if(global['db'][_0x4e4056(0x224)])return new Promise(_0x201513=>setInterval(async function(){const _0x2ff9bf=_0x4e4056;!global['db'][_0x2ff9bf(0x224)]&&(clearInterval(this),_0x201513(global['db']['data']==null?global['loadDatabase']():global['db'][_0x2ff9bf(0x1e7)]));},0x1*0x3e8));if(global['db'][_0x4e4056(0x1e7)]!==null)return;global['db'][_0x4e4056(0x224)]=!![],await global['db'][_0x4e4056(0x1b8)]()[_0x4e4056(0x20f)](console['error']),global['db']['READ']=null,global['db'][_0x4e4056(0x1e7)]={'users':{},'chats':{},'stats':{},'msgs':{},'sticker':{},'settings':{},...global['db']['data']||{}},global['db'][_0x4e4056(0x297)]=chain(global['db'][_0x4e4056(0x1e7)]);},loadDatabase(),global[_0x374239(0x20d)]=_0x374239(0x1f3);const {state,saveCreds}=await useMultiFileAuthState(global[_0x374239(0x20d)]);let {version,isLatest}=await fetchLatestBaileysVersion();const connectionOptions={'version':version,'logger':_0x51a471({'level':_0x374239(0x1d4)}),'printQRInTerminal':!pairingCode,'mobile':useMobile,'browser':['chrome\x20(linux)','',''],'auth':{'creds':state[_0x374239(0x1c1)],'keys':makeCacheableSignalKeyStore(state['keys'],_0x51a471()[_0x374239(0x21d)]({'level':_0x374239(0x1d4),'stream':'store'}))},'markOnlineOnConnect':!![],'generateHighQualityLinkPreview':!![],'getMessage':async _0x345f52=>{const _0x45cf0b=_0x374239;let _0x52036e=jidNormalizedUser(_0x345f52['remoteJid']),_0x26a900=await store[_0x45cf0b(0x1d3)](_0x52036e,_0x345f52['id']);return _0x26a900?.['message']||'';},'msgRetryCounterCache':msgRetryCounterCache,'defaultQueryTimeoutMs':undefined};global[_0x374239(0x1f1)]=makeWASocket(connectionOptions),conn[_0x374239(0x278)]=![],store?.[_0x374239(0x230)](conn['ev']);if(pairingCode&&!conn['authState']['creds']['registered']){if(useMobile)throw new Error(_0x374239(0x1e4));let phoneNumber;!!global['pairingNumber']?(phoneNumber=global[_0x374239(0x22d)][_0x374239(0x255)](/[^0-9]/g,''),!Object[_0x374239(0x220)](PHONENUMBER_MCC)[_0x374239(0x1d1)](_0x4e6b31=>phoneNumber[_0x374239(0x23e)](_0x4e6b31))&&(console[_0x374239(0x280)](_0x499532[_0x374239(0x222)](_0x499532[_0x374239(0x25e)](_0x374239(0x216)))),process[_0x374239(0x275)](0x0))):(phoneNumber=await question(_0x499532[_0x374239(0x222)](_0x499532['greenBright']('Please\x20type\x20your\x20WhatsApp\x20number\x20:\x20'))),phoneNumber=phoneNumber[_0x374239(0x255)](/[^0-9]/g,''),!Object[_0x374239(0x220)](PHONENUMBER_MCC)['some'](_0x183b4d=>phoneNumber[_0x374239(0x23e)](_0x183b4d))&&(console['log'](_0x499532[_0x374239(0x222)](_0x499532['redBright']('Start\x20with\x20your\x20country\x27s\x20WhatsApp\x20code,\x20Example\x20:\x2062xxx'))),phoneNumber=await question(_0x499532[_0x374239(0x222)](_0x499532[_0x374239(0x269)](_0x374239(0x1f6)))),phoneNumber=phoneNumber[_0x374239(0x255)](/[^0-9]/g,''),rl[_0x374239(0x1af)]())),setTimeout(async()=>{const _0x3b68d7=_0x374239;let _0x6cba03=await conn[_0x3b68d7(0x260)](phoneNumber);_0x6cba03=_0x6cba03?.[_0x3b68d7(0x1b3)](/.{1,4}/g)?.[_0x3b68d7(0x1c6)]('-')||_0x6cba03;const _0x1919d2=_0x499532[_0x3b68d7(0x1be)][_0x3b68d7(0x269)]('Your\x20Pairing\x20Code:')+'\x20'+_0x499532['bgGreenBright'](_0x499532['black'](_0x6cba03));console[_0x3b68d7(0x280)](_0x1919d2);},0xbb8);}if(useMobile&&!conn[_0x374239(0x1fc)][_0x374239(0x1c1)][_0x374239(0x292)]){const {registration}=conn[_0x374239(0x1fc)][_0x374239(0x1c1)]||{'registration':{}};if(!registration[_0x374239(0x209)]){console[_0x374239(0x280)](_0x374239(0x272)+_0x499532[_0x374239(0x25e)](_0x374239(0x248))+':');let phoneNumber=await question(_0x374239(0x270)+_0x499532['cyan'](_0x374239(0x20c))+':\x20');phoneNumber=phoneNumber[_0x374239(0x255)](/[^0-9]/g,''),!Object[_0x374239(0x220)](PHONENUMBER_MCC)[_0x374239(0x1d1)](_0x16a2ce=>phoneNumber[_0x374239(0x23e)](_0x16a2ce))&&(console['log']('๐Ÿ’ฌ\x20'+_0x499532[_0x374239(0x25e)](_0x374239(0x26a))+':'),console[_0x374239(0x280)](_0x374239(0x272)+_0x499532[_0x374239(0x25e)](_0x374239(0x248))+':'),phoneNumber=await question(_0x374239(0x270)+_0x499532['cyan']('-\x20Number')+':\x20'),phoneNumber=phoneNumber[_0x374239(0x255)](/[^0-9]/g,'')),registration[_0x374239(0x209)]='+'+phoneNumber;}const phoneNumber=parsePhoneNumber(registration[_0x374239(0x209)]);if(!phoneNumber['isValid']())conn['logger']['error'](_0x374239(0x215)+registration['phoneNumber']);registration[_0x374239(0x209)]=phoneNumber['format'](_0x374239(0x27a)),registration[_0x374239(0x22f)]=phoneNumber[_0x374239(0x20a)],registration[_0x374239(0x21a)]=phoneNumber[_0x374239(0x1df)];const mcc=PHONENUMBER_MCC[phoneNumber[_0x374239(0x20a)]];registration[_0x374239(0x298)]=mcc;async function enterCode(){const _0x355bdd=_0x374239;try{console['log'](_0x355bdd(0x272)+_0x499532['redBright'](_0x355bdd(0x23b))+':');const _0x536387=await question(_0x355bdd(0x270)+_0x499532[_0x355bdd(0x27d)](_0x355bdd(0x1c3))+':\x20'),_0x43e2db=await conn[_0x355bdd(0x252)](_0x536387[_0x355bdd(0x255)](/[^0-9]/g,'')[_0x355bdd(0x1d8)]()[_0x355bdd(0x287)]());console[_0x355bdd(0x280)]('๐Ÿ’ฌ\x20'+_0x499532[_0x355bdd(0x25e)](_0x355bdd(0x23f))),console[_0x355bdd(0x280)](_0x43e2db),rl[_0x355bdd(0x1af)]();}catch(_0x14bbcc){conn[_0x355bdd(0x200)][_0x355bdd(0x1cd)](_0x355bdd(0x1e0),_0x14bbcc),await askOTP();}}async function askOTP(){const _0x5eeea5=_0x374239;console[_0x5eeea5(0x280)](_0x5eeea5(0x272)+_0x499532[_0x5eeea5(0x25e)]('What\x20method\x20do\x20you\x20want\x20to\x20use?\x20\x22sms\x22\x20or\x20\x22voice\x22'));let _0x52435c=await question(_0x5eeea5(0x270)+_0x499532['cyan']('-\x20Method')+':\x20');_0x52435c=_0x52435c[_0x5eeea5(0x255)](/["']/g,'')[_0x5eeea5(0x1d8)]()[_0x5eeea5(0x287)]();if(_0x52435c!==_0x5eeea5(0x277)&&_0x52435c!==_0x5eeea5(0x247))return await askOTP();registration['method']=_0x52435c;try{await conn[_0x5eeea5(0x219)](registration),await enterCode();}catch(_0x15a9f6){conn['logger']['error']('\x0aFailed\x20to\x20request\x20registration\x20code.\x20Please\x20try\x20again.\x0a',_0x15a9f6),await askOTP();}}await askOTP();}conn[_0x374239(0x200)]['info']('\x0aWaiting\x20For\x20Login\x0a');!opts[_0x374239(0x263)]&&(global['db']&&setInterval(async()=>{const _0x37f566=_0x374239;if(global['db'][_0x37f566(0x1e7)])await global['db'][_0x37f566(0x1e1)]();if(opts[_0x37f566(0x1f2)]&&(global[_0x37f566(0x283)]||{})[_0x37f566(0x24e)])tmp=[os[_0x37f566(0x1f9)](),_0x37f566(0x1c4)],tmp['forEach'](_0x5c818e=>cp[_0x37f566(0x250)](_0x37f566(0x24e),[_0x5c818e,_0x37f566(0x22a),'3',_0x37f566(0x1e6),'f','-delete']));},0x1e*0x3e8));function _0x4b29(_0x2c228b,_0x13f3e5){const _0x2e13d0=_0x2e13();return _0x4b29=function(_0x4b2926,_0x1f6297){_0x4b2926=_0x4b2926-0x1a0;let _0x493a16=_0x2e13d0[_0x4b2926];return _0x493a16;},_0x4b29(_0x2c228b,_0x13f3e5);}if(opts[_0x374239(0x279)])(await import(_0x374239(0x1ec)))[_0x374239(0x218)](global[_0x374239(0x1f1)],PORT);function runCleanup(){const _0x15c250=_0x374239;_0x456d95()[_0x15c250(0x242)](()=>{const _0x32ba2e=_0x15c250;console['log'](_0x32ba2e(0x1f7));})[_0x15c250(0x20f)](_0x272185=>{const _0x15cfa9=_0x15c250;console[_0x15cfa9(0x1cd)](_0x15cfa9(0x274),_0x272185);})['finally'](()=>{setTimeout(runCleanup,0x3e8*0x3c*0x2);});}runCleanup();function purgeSession(){const _0xe077c2=_0x374239;let _0x39cbec=[];const _0x11bfa7=readdirSync('./session'),_0x4e0f07=_0x11bfa7['filter'](_0x51eb8c=>{const _0x342517=_0x4b29;return _0x51eb8c[_0x342517(0x23e)](_0x342517(0x295));});_0x39cbec=[..._0x39cbec,..._0x4e0f07],_0x4e0f07[_0xe077c2(0x1c2)](_0x346e4f=>{const _0x345df0=_0xe077c2;unlinkSync(_0x345df0(0x1b6)+_0x346e4f);});}async function connectionUpdate(_0x9ef145){const _0x17ce34=_0x374239,{connection:_0x583ae1,lastDisconnect:_0x5fac73,isNewLogin:_0x1576cd,qr:_0x96ffca}=_0x9ef145;global['stopped']=_0x583ae1;if(_0x1576cd)conn['isInit']=!![];const _0xc4479d=_0x5fac73?.[_0x17ce34(0x1cd)]?.[_0x17ce34(0x271)]?.[_0x17ce34(0x1ad)]||_0x5fac73?.[_0x17ce34(0x1cd)]?.['output']?.[_0x17ce34(0x262)]?.[_0x17ce34(0x1ad)];_0xc4479d&&_0xc4479d!==DisconnectReason[_0x17ce34(0x27c)]&&conn?.['ws'][_0x17ce34(0x27e)]==null&&conn[_0x17ce34(0x200)][_0x17ce34(0x21f)](await global[_0x17ce34(0x22c)](!![])[_0x17ce34(0x20f)](console[_0x17ce34(0x1cd)]));if(global['db'][_0x17ce34(0x1e7)]==null)loadDatabase();!pairingCode&&!useMobile&&useQr&&_0x96ffca!=0x0&&_0x96ffca!=undefined&&conn[_0x17ce34(0x200)]['info'](_0x499532[_0x17ce34(0x1fd)](_0x17ce34(0x202)));if(_0x583ae1===_0x17ce34(0x1fa)){const {jid:_0x457f22,name:_0x4676ba}=conn['user'];let _0x33ed46=_0x17ce34(0x267)+_0x4676ba+_0x17ce34(0x210),_0x27425b=conn[_0x17ce34(0x1a1)](_0x457f22,{'text':_0x33ed46,'mentions':[_0x457f22]},{'quoted':null});conn[_0x17ce34(0x200)][_0x17ce34(0x21f)](_0x499532[_0x17ce34(0x1fd)](_0x17ce34(0x1aa)));}_0x583ae1=='close'&&(conn[_0x17ce34(0x200)][_0x17ce34(0x1cd)](_0x499532[_0x17ce34(0x1fd)](_0x17ce34(0x27f))),process[_0x17ce34(0x1d0)](_0x17ce34(0x26c)));}process['on'](_0x374239(0x228),console['error']);let isInit=!![],handler=await import(_0x374239(0x21c));global[_0x374239(0x22c)]=async function(_0x5df9cc){const _0x1571c8=_0x374239;try{const _0x3ab6f4=await import('./handler.js?update='+Date[_0x1571c8(0x1bb)]())[_0x1571c8(0x20f)](console['error']);if(Object[_0x1571c8(0x220)](_0x3ab6f4||{})[_0x1571c8(0x1dc)])handler=_0x3ab6f4;}catch(_0x1bee56){console[_0x1571c8(0x1cd)];}if(_0x5df9cc){const _0x18a8c1=global[_0x1571c8(0x1f1)]['chats'];try{global['conn']['ws'][_0x1571c8(0x1af)]();}catch{}conn['ev'][_0x1571c8(0x259)](),global['conn']=makeWASocket(connectionOptions,{'chats':_0x18a8c1}),isInit=!![];}!isInit&&(conn['ev'][_0x1571c8(0x1c5)](_0x1571c8(0x1ac),conn[_0x1571c8(0x268)]),conn['ev'][_0x1571c8(0x1c5)](_0x1571c8(0x23a),conn['pollUpdate']),conn['ev']['off'](_0x1571c8(0x203),conn[_0x1571c8(0x227)]),conn['ev']['off'](_0x1571c8(0x241),conn[_0x1571c8(0x23d)]),conn['ev'][_0x1571c8(0x1c5)](_0x1571c8(0x1a5),conn['onDelete']),conn['ev']['off'](_0x1571c8(0x23c),conn[_0x1571c8(0x213)]),conn['ev'][_0x1571c8(0x1c5)](_0x1571c8(0x1ab),conn[_0x1571c8(0x25f)]),conn['ev'][_0x1571c8(0x1c5)]('creds.update',conn['credsUpdate']));const _0x4c9163={'welcome':'๐Ÿ‘‹','bye':'๐Ÿ‘‹','promote':_0x1571c8(0x201),'demote':_0x1571c8(0x236),'desc':'๐Ÿ“','subject':'๐Ÿ“Œ','icon':_0x1571c8(0x1b4),'revoke':'๐Ÿ”—','announceOn':'๐Ÿ”’','announceOff':'๐Ÿ”“','restrictOn':'๐Ÿšซ','restrictOff':'โœ…'};conn[_0x1571c8(0x28e)]=_0x4c9163[_0x1571c8(0x28e)]+_0x1571c8(0x204),conn[_0x1571c8(0x294)]=_0x1571c8(0x225)+_0x4c9163[_0x1571c8(0x294)]+'\x0a\x0aSee\x20you\x20later!',conn[_0x1571c8(0x273)]=_0x4c9163[_0x1571c8(0x1bf)]+_0x1571c8(0x296),conn['sdemote']=_0x4c9163[_0x1571c8(0x1bc)]+_0x1571c8(0x1b5),conn[_0x1571c8(0x240)]=_0x4c9163[_0x1571c8(0x217)]+_0x1571c8(0x249),conn[_0x1571c8(0x265)]=_0x4c9163[_0x1571c8(0x1a6)]+_0x1571c8(0x24a),conn['sIcon']=_0x4c9163[_0x1571c8(0x1d6)]+_0x1571c8(0x293),conn[_0x1571c8(0x244)]=_0x4c9163[_0x1571c8(0x1eb)]+'\x20The\x20group\x20link\x20has\x20been\x20changed\x20to:\x0a@revoke',conn['sAnnounceOn']=_0x4c9163['announceOn']+_0x1571c8(0x1f0),conn[_0x1571c8(0x1d9)]=_0x4c9163[_0x1571c8(0x1cf)]+_0x1571c8(0x1ae),conn[_0x1571c8(0x24d)]=_0x4c9163[_0x1571c8(0x1de)]+_0x1571c8(0x24b),conn[_0x1571c8(0x282)]=_0x4c9163[_0x1571c8(0x1e5)]+'\x20Edit\x20Group\x20Info\x20is\x20now\x20available\x20to\x20all\x20participants!',conn['handler']=handler['handler'][_0x1571c8(0x230)](global[_0x1571c8(0x1f1)]),conn[_0x1571c8(0x258)]=handler[_0x1571c8(0x258)]['bind'](global[_0x1571c8(0x1f1)]),conn[_0x1571c8(0x227)]=handler['participantsUpdate'][_0x1571c8(0x230)](global['conn']),conn[_0x1571c8(0x23d)]=handler[_0x1571c8(0x23d)][_0x1571c8(0x230)](global[_0x1571c8(0x1f1)]),conn['onDelete']=handler['deleteUpdate']['bind'](global[_0x1571c8(0x1f1)]),conn[_0x1571c8(0x213)]=handler[_0x1571c8(0x213)][_0x1571c8(0x230)](global[_0x1571c8(0x1f1)]),conn['connectionUpdate']=connectionUpdate[_0x1571c8(0x230)](global[_0x1571c8(0x1f1)]),conn[_0x1571c8(0x24f)]=saveCreds[_0x1571c8(0x230)](global[_0x1571c8(0x1f1)],!![]);const _0x2d83cd=new Date(),_0x3f5b32=new Date(conn['ev']);if(_0x2d83cd>=_0x3f5b32){const _0x284c9d=Object[_0x1571c8(0x246)](conn[_0x1571c8(0x226)])[_0x1571c8(0x281)](([_0xedac31,_0x42f3da])=>!_0xedac31[_0x1571c8(0x28c)](_0x1571c8(0x1cb))&&_0x42f3da[_0x1571c8(0x27b)])[_0x1571c8(0x229)](_0xc723b0=>_0xc723b0[0x0]);}else{const _0x1c79fd=Object['entries'](conn[_0x1571c8(0x226)])['filter'](([_0x169a6c,_0x9817b2])=>!_0x169a6c[_0x1571c8(0x28c)](_0x1571c8(0x1cb))&&_0x9817b2['isChats'])[_0x1571c8(0x229)](_0x47e704=>_0x47e704[0x0]);}return conn['ev']['on'](_0x1571c8(0x1ac),conn[_0x1571c8(0x268)]),conn['ev']['on'](_0x1571c8(0x23a),conn['pollUpdate']),conn['ev']['on'](_0x1571c8(0x203),conn['participantsUpdate']),conn['ev']['on'](_0x1571c8(0x241),conn[_0x1571c8(0x23d)]),conn['ev']['on'](_0x1571c8(0x1a5),conn[_0x1571c8(0x223)]),conn['ev']['on']('presence.update',conn[_0x1571c8(0x213)]),conn['ev']['on'](_0x1571c8(0x1ab),conn[_0x1571c8(0x25f)]),conn['ev']['on'](_0x1571c8(0x291),conn[_0x1571c8(0x24f)]),isInit=![],!![];};const pluginFolder=global[_0x374239(0x284)](join(__dirname,_0x374239(0x256))),pluginFilter=_0x3b4709=>/\.js$/['test'](_0x3b4709);global[_0x374239(0x26b)]={};async function filesInit(){const _0x4f73bb=_0x374239;for(const _0x5b6881 of readdirSync(pluginFolder)[_0x4f73bb(0x281)](pluginFilter)){try{const _0x1ff60d=global[_0x4f73bb(0x25b)](join(pluginFolder,_0x5b6881)),_0x2483fe=await import(_0x1ff60d);global[_0x4f73bb(0x26b)][_0x5b6881]=_0x2483fe['default']||_0x2483fe;}catch(_0x5190da){conn[_0x4f73bb(0x200)][_0x4f73bb(0x1cd)](_0x5190da),delete global['plugins'][_0x5b6881];}}}filesInit()['then'](_0x2ff588=>Object[_0x374239(0x220)](global[_0x374239(0x26b)]))[_0x374239(0x20f)](console[_0x374239(0x1cd)]),global[_0x374239(0x1ee)]=async(_0x2fde86,_0x588cee)=>{const _0x4ef5b3=_0x374239;if(pluginFilter(_0x588cee)){const _0x834481=global[_0x4ef5b3(0x25b)](join(pluginFolder,_0x588cee),!![]);if(_0x588cee in global[_0x4ef5b3(0x26b)]){if(existsSync(_0x834481))conn[_0x4ef5b3(0x200)]['info'](_0x4ef5b3(0x208)+_0x588cee+'\x27');else return conn[_0x4ef5b3(0x200)][_0x4ef5b3(0x237)](_0x4ef5b3(0x22b)+_0x588cee+'\x27'),delete global[_0x4ef5b3(0x26b)][_0x588cee];}else conn[_0x4ef5b3(0x200)][_0x4ef5b3(0x21f)](_0x4ef5b3(0x1d7)+_0x588cee+'\x27');const _0x5acbf3=_0x37cb86(readFileSync(_0x834481),_0x588cee,{'sourceType':'module','allowAwaitOutsideFunction':!![]});if(_0x5acbf3)conn[_0x4ef5b3(0x200)][_0x4ef5b3(0x1cd)]('\x0aSyntax\x20error\x20while\x20loading\x20\x27'+_0x588cee+'\x27\x0a'+format(_0x5acbf3));else try{const _0x3049b0=await import(global[_0x4ef5b3(0x25b)](_0x834481)+_0x4ef5b3(0x266)+Date['now']());global['plugins'][_0x588cee]=_0x3049b0[_0x4ef5b3(0x218)]||_0x3049b0;}catch(_0x8a1ff7){conn[_0x4ef5b3(0x200)][_0x4ef5b3(0x1cd)](_0x4ef5b3(0x1fb)+_0x588cee+'\x0a'+format(_0x8a1ff7)+'\x27');}finally{global[_0x4ef5b3(0x26b)]=Object[_0x4ef5b3(0x22e)](Object[_0x4ef5b3(0x246)](global[_0x4ef5b3(0x26b)])[_0x4ef5b3(0x1ea)](([_0x58d538],[_0x168b1c])=>_0x58d538[_0x4ef5b3(0x264)](_0x168b1c)));}}},Object[_0x374239(0x25a)](global[_0x374239(0x1ee)]),watch(pluginFolder,global['reload']),await global[_0x374239(0x22c)]();async function _quickTest(){const _0x26cbcf=_0x374239,_0x1b809a=await Promise[_0x26cbcf(0x214)]([spawn(_0x26cbcf(0x1e9)),spawn(_0x26cbcf(0x289)),spawn('ffmpeg',[_0x26cbcf(0x221),_0x26cbcf(0x21b),'error',_0x26cbcf(0x1c9),_0x26cbcf(0x1d2),_0x26cbcf(0x233),'1','-f',_0x26cbcf(0x1cc),'-']),spawn(_0x26cbcf(0x231)),spawn(_0x26cbcf(0x245)),spawn('gm'),spawn(_0x26cbcf(0x24e),[_0x26cbcf(0x1ed)])][_0x26cbcf(0x229)](_0x4bafa9=>{const _0x113f9e=_0x26cbcf;return Promise[_0x113f9e(0x232)]([new Promise(_0x17cf1f=>{_0x4bafa9['on']('close',_0x4039e7=>{_0x17cf1f(_0x4039e7!==0x7f);});}),new Promise(_0x107d15=>{const _0x341715=_0x113f9e;_0x4bafa9['on'](_0x341715(0x1cd),_0x5aa277=>_0x107d15(![]));})]);})),[_0xa56249,_0x4c3d93,_0x5029b6,_0x407095,_0x33ebe3,_0x49cf13,_0x334cdc]=_0x1b809a,_0x37a54f=global[_0x26cbcf(0x283)]={'ffmpeg':_0xa56249,'ffprobe':_0x4c3d93,'ffmpegWebp':_0x5029b6,'convert':_0x407095,'magick':_0x33ebe3,'gm':_0x49cf13,'find':_0x334cdc};Object[_0x26cbcf(0x25a)](global[_0x26cbcf(0x283)]);}const actions=[{'func':purgeSession,'message':_0x374239(0x1d5)}];for(const action of actions){setInterval(async()=>{const _0x58a5df=_0x374239;if(stopped==='close'||!conn||!conn['user'])return;await action[_0x58a5df(0x20e)](),console[_0x58a5df(0x280)](_0x499532['cyanBright'](action[_0x58a5df(0x257)]+'\x0a'));},0xa*0x3c*0x3e8);}_quickTest()[_0x374239(0x20f)](console[_0x374239(0x1cd)]); \ No newline at end of file