forked from salmanytofficial/XLICON-V2-MD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Guru.js
1 lines (1 loc) · 26.8 KB
/
Guru.js
1
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://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\x20XLICON-BOT\x0aJoin\x20my\x20support\x20Group\x20for\x20any\x20Query\x0a\x20https://chat.whatsapp.com/Kchd5WS2UmILfGEP523DqL','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)]);