forked from shizothetechie/Wiley-md
-
Notifications
You must be signed in to change notification settings - Fork 0
/
handler.js
1 lines (1 loc) · 28 KB
/
handler.js
1
const _0x16f03d=_0xc79e;(function(_0x5762fd,_0x537249){const _0xd918da=_0xc79e,_0x21e639=_0x5762fd();while(!![]){try{const _0x22fe18=-parseInt(_0xd918da(0x1bc))/0x1*(-parseInt(_0xd918da(0x1fc))/0x2)+-parseInt(_0xd918da(0x18c))/0x3*(-parseInt(_0xd918da(0x204))/0x4)+parseInt(_0xd918da(0x1d8))/0x5+parseInt(_0xd918da(0x201))/0x6*(-parseInt(_0xd918da(0x21b))/0x7)+-parseInt(_0xd918da(0x1ea))/0x8*(parseInt(_0xd918da(0x1e0))/0x9)+-parseInt(_0xd918da(0x1f0))/0xa*(parseInt(_0xd918da(0x203))/0xb)+-parseInt(_0xd918da(0x212))/0xc*(-parseInt(_0xd918da(0x17d))/0xd);if(_0x22fe18===_0x537249)break;else _0x21e639['push'](_0x21e639['shift']());}catch(_0x8e9a48){_0x21e639['push'](_0x21e639['shift']());}}}(_0x18b1,0x89462));import{smsg}from'./lib/simple.js';import{plugins}from'./lib/plugins.js';import{format}from'util';import{fileURLToPath}from'url';import _0x511aed,{join}from'path';import{unwatchFile,watchFile}from'fs';import _0x146a87 from'chalk';import _0xba341a from'./lib/connection.js';import _0x3cb5d8 from'./lib/print.js';import _0x132bff from'./lib/helper.js';import _0xca3030,{loadDatabase}from'./lib/database.js';import _0x4dd9bf from'./lib/queque.js';const {getContentType,proto}=(await import('@adiwajshing/baileys'))[_0x16f03d(0x1c8)],isNumber=_0x68cd3c=>typeof _0x68cd3c===_0x16f03d(0x175)&&!isNaN(_0x68cd3c);export async function handler(_0x131ccb,_0x3ca354){const _0x19f5ca=_0x16f03d;this[_0x19f5ca(0x1a7)]=this['msgqueque']||new _0x4dd9bf();if(!_0x131ccb)return;let _0x23a881=_0x131ccb[_0x19f5ca(0x18d)][_0x131ccb[_0x19f5ca(0x18d)][_0x19f5ca(0x241)]-0x1];if(!_0x23a881)return;if(_0xca3030[_0x19f5ca(0x1f6)]==null)await loadDatabase();try{_0x23a881=smsg(this,_0x23a881)||_0x23a881;if(!_0x23a881)return;_0x23a881['exp']=0x0,_0x23a881[_0x19f5ca(0x1a8)]=![];try{let _0x2eb9f6=_0xca3030['data'][_0x19f5ca(0x250)][_0x23a881[_0x19f5ca(0x247)]];if(typeof _0x2eb9f6!==_0x19f5ca(0x1d9))_0xca3030[_0x19f5ca(0x1f6)][_0x19f5ca(0x250)][_0x23a881[_0x19f5ca(0x247)]]={};if(_0x2eb9f6){if(!isNumber(_0x2eb9f6[_0x19f5ca(0x22c)]))_0x2eb9f6[_0x19f5ca(0x22c)]=0x0;if(!isNumber(_0x2eb9f6[_0x19f5ca(0x1a8)]))_0x2eb9f6[_0x19f5ca(0x1a8)]=0xa;if(!isNumber(_0x2eb9f6[_0x19f5ca(0x1f7)]))_0x2eb9f6[_0x19f5ca(0x1f7)]=0x0;if(!('registered'in _0x2eb9f6))_0x2eb9f6[_0x19f5ca(0x17b)]=![];if(!_0x2eb9f6[_0x19f5ca(0x17b)]){if(!('name'in _0x2eb9f6))_0x2eb9f6[_0x19f5ca(0x1b2)]=_0x23a881[_0x19f5ca(0x1b2)];if(!isNumber(_0x2eb9f6['age']))_0x2eb9f6[_0x19f5ca(0x19a)]=-0x1;if(!isNumber(_0x2eb9f6[_0x19f5ca(0x24a)]))_0x2eb9f6[_0x19f5ca(0x24a)]=-0x1;}if(!(_0x19f5ca(0x243)in _0x2eb9f6))_0x2eb9f6[_0x19f5ca(0x243)]=![];if(!('owner'in _0x2eb9f6))_0x2eb9f6[_0x19f5ca(0x218)]=![];if(!isNumber(_0x2eb9f6[_0x19f5ca(0x1c6)]))_0x2eb9f6[_0x19f5ca(0x1c6)]=0x0;if(!isNumber(_0x2eb9f6['afk']))_0x2eb9f6['afk']=-0x1;if(!(_0x19f5ca(0x1a3)in _0x2eb9f6))_0x2eb9f6[_0x19f5ca(0x1a3)]='';if(!(_0x19f5ca(0x230)in _0x2eb9f6))_0x2eb9f6[_0x19f5ca(0x230)]=![];if(!isNumber(_0x2eb9f6['warn']))_0x2eb9f6[_0x19f5ca(0x1e1)]=0x0;if(!isNumber(_0x2eb9f6[_0x19f5ca(0x22b)]))_0x2eb9f6['level']=0x0;if(!(_0x19f5ca(0x1b4)in _0x2eb9f6))_0x2eb9f6[_0x19f5ca(0x1b4)]=_0x19f5ca(0x225);if(!(_0x19f5ca(0x1ca)in _0x2eb9f6))_0x2eb9f6[_0x19f5ca(0x1ca)]=!![];}else _0xca3030[_0x19f5ca(0x1f6)][_0x19f5ca(0x250)][_0x23a881[_0x19f5ca(0x247)]]={'registered':![],'name':_0x23a881['name'],'age':-0x1,'regTime':-0x1,'afk':-0x1,'afkReason':'','banned':![],'warn':0x0,'level':0x0,'role':_0x19f5ca(0x225),'autolevelup':!![],'premium':![]};let _0x4c6ca6=_0xca3030[_0x19f5ca(0x1f6)][_0x19f5ca(0x1bf)][_0x23a881[_0x19f5ca(0x197)]];if(typeof _0x4c6ca6!==_0x19f5ca(0x1d9))_0xca3030['data'][_0x19f5ca(0x1bf)][_0x23a881[_0x19f5ca(0x197)]]={};if(_0x4c6ca6){if(!('isBanned'in _0x4c6ca6))_0x4c6ca6[_0x19f5ca(0x253)]=![];if(!(_0x19f5ca(0x202)in _0x4c6ca6))_0x4c6ca6[_0x19f5ca(0x202)]=![];if(!(_0x19f5ca(0x19c)in _0x4c6ca6))_0x4c6ca6[_0x19f5ca(0x19c)]=![];if(!(_0x19f5ca(0x23a)in _0x4c6ca6))_0x4c6ca6[_0x19f5ca(0x23a)]=![];if(!(_0x19f5ca(0x198)in _0x4c6ca6))_0x4c6ca6['sWelcome']='';if(!(_0x19f5ca(0x234)in _0x4c6ca6))_0x4c6ca6[_0x19f5ca(0x234)]='';if(!('sPromote'in _0x4c6ca6))_0x4c6ca6[_0x19f5ca(0x210)]='';if(!(_0x19f5ca(0x229)in _0x4c6ca6))_0x4c6ca6[_0x19f5ca(0x229)]='';if(!('delete'in _0x4c6ca6))_0x4c6ca6[_0x19f5ca(0x219)]=!![];if(!(_0x19f5ca(0x1ec)in _0x4c6ca6))_0x4c6ca6['antiLink']=![];if(!(_0x19f5ca(0x249)in _0x4c6ca6))_0x4c6ca6[_0x19f5ca(0x249)]=![];if(!('viewonce'in _0x4c6ca6))_0x4c6ca6['viewonce']=![];if(!(_0x19f5ca(0x1b3)in _0x4c6ca6))_0x4c6ca6[_0x19f5ca(0x1b3)]=![];if(!isNumber(_0x4c6ca6['expired']))_0x4c6ca6[_0x19f5ca(0x24b)]=0x0;}else _0xca3030[_0x19f5ca(0x1f6)][_0x19f5ca(0x1bf)][_0x23a881[_0x19f5ca(0x197)]]={'isBanned':![],'welcome':![],'react':![],'detect':![],'sWelcome':'','sBye':'','sPromote':'','sDemote':'','delete':!![],'antiLink':![],'antiToxic':![],'viewonce':![],'autoSticker':!![],'expired':0x0};let _0x38896e=_0xca3030[_0x19f5ca(0x1f6)][_0x19f5ca(0x1f8)][this['user'][_0x19f5ca(0x1fb)]];if(typeof _0x38896e!==_0x19f5ca(0x1d9))_0xca3030[_0x19f5ca(0x1f6)][_0x19f5ca(0x1f8)][this[_0x19f5ca(0x17c)][_0x19f5ca(0x1fb)]]={};if(_0x38896e){if(!('self'in _0x38896e))_0x38896e['self']=![];if(!(_0x19f5ca(0x1cd)in _0x38896e))_0x38896e[_0x19f5ca(0x1cd)]=![];if(!('saver'in _0x38896e))_0x38896e['saver']=![];if(!(_0x19f5ca(0x190)in _0x38896e))_0x38896e['autoread']=![];if(!(_0x19f5ca(0x1ad)in _0x38896e))_0x38896e[_0x19f5ca(0x1ad)]=!![];if(!(_0x19f5ca(0x1cb)in _0x38896e))_0x38896e[_0x19f5ca(0x1cb)]=![];}else _0xca3030[_0x19f5ca(0x1f6)][_0x19f5ca(0x1f8)][this[_0x19f5ca(0x17c)][_0x19f5ca(0x1fb)]]={'antiCall':![],'self':![],'autochat':![],'saver':![],'autoread':![],'restrict':![]};}catch(_0x147c68){console[_0x19f5ca(0x1f1)](_0x147c68);}if(opts[_0x19f5ca(0x220)])return;if(!_0x23a881[_0x19f5ca(0x18a)]&&opts[_0x19f5ca(0x1dd)])return;if(opts['pconly']&&_0x23a881[_0x19f5ca(0x197)]['endsWith'](_0x19f5ca(0x1af)))return;if(opts[_0x19f5ca(0x1bd)]&&!_0x23a881['chat'][_0x19f5ca(0x22a)]('g.us'))return;if(opts[_0x19f5ca(0x1da)]&&_0x23a881[_0x19f5ca(0x197)]!==_0x19f5ca(0x1aa))return;if(typeof _0x23a881['text']!==_0x19f5ca(0x1fe))_0x23a881[_0x19f5ca(0x235)]='';let _0x4e28cb=_0xca3030[_0x19f5ca(0x1f6)][_0x19f5ca(0x250)][_0x23a881[_0x19f5ca(0x247)]];const _0xd4094a=[this[_0x19f5ca(0x23f)](this['user']['id']),...global[_0x19f5ca(0x218)][_0x19f5ca(0x1e2)](([_0x26b203])=>_0x26b203)][_0x19f5ca(0x1e2)](_0x419b50=>_0x419b50?.[_0x19f5ca(0x20b)](/[^0-9]/g,'')+_0x19f5ca(0x21c))[_0x19f5ca(0x207)](_0x23a881[_0x19f5ca(0x247)]),_0x28aaa8=_0xd4094a||_0x23a881[_0x19f5ca(0x18a)],_0x30f774=_0xd4094a||_0xca3030['data'][_0x19f5ca(0x250)][_0x23a881['sender']][_0x19f5ca(0x1c2)]>0x0;if(opts[_0x19f5ca(0x20c)]&&_0x23a881['text']&&!_0x23a881[_0x19f5ca(0x18a)]&&!_0x30f774){const _0x3273bf=_0x23a881['id'];this['msgqueque'][_0x19f5ca(0x1a0)](_0x3273bf),await this[_0x19f5ca(0x1a7)][_0x19f5ca(0x21d)](_0x3273bf);}if(_0x23a881['isBaileys'])return;_0x23a881['exp']+=Math['ceil'](Math[_0x19f5ca(0x1fa)]()*0xa);let _0xe57a4a,_0x49974d=_0xca3030[_0x19f5ca(0x1f6)]?.['users']?.[_0x23a881[_0x19f5ca(0x247)]];const _0x589f20=(_0x23a881[_0x19f5ca(0x1c9)]?await _0xba341a[_0x19f5ca(0x23b)][_0x19f5ca(0x24f)](_0x23a881[_0x19f5ca(0x197)],this[_0x19f5ca(0x1b9)]):{})||{},_0x250f95=(_0x23a881[_0x19f5ca(0x1c9)]?_0x589f20['participants']:[])||[],_0x1abc0a=(_0x23a881[_0x19f5ca(0x1c9)]?_0x250f95[_0x19f5ca(0x1a6)](_0x2a0fb9=>this[_0x19f5ca(0x23f)](_0x2a0fb9['id'])===_0x23a881[_0x19f5ca(0x247)]):{})||{},_0x458b45=(_0x23a881[_0x19f5ca(0x1c9)]?_0x250f95[_0x19f5ca(0x1a6)](_0x249956=>this[_0x19f5ca(0x23f)](_0x249956['id'])==this[_0x19f5ca(0x17c)]['jid']):{})||{},_0x49cfc7=_0x1abc0a?.['admin']==_0x19f5ca(0x223)||![],_0x4507a5=_0x49cfc7||_0x1abc0a?.[_0x19f5ca(0x1c7)]==_0x19f5ca(0x1c7)||![],_0x9ad49c=_0x458b45?.[_0x19f5ca(0x1c7)]||![],_0x16c09b=_0x511aed[_0x19f5ca(0x1cc)](_0x511aed[_0x19f5ca(0x24e)](fileURLToPath(import.meta[_0x19f5ca(0x196)])),'./plugins');for(let _0x59275d in plugins){let _0x1e7338=plugins[_0x59275d];if(!_0x1e7338)continue;if(_0x1e7338[_0x19f5ca(0x246)])continue;const _0xc20cd=join(_0x16c09b,_0x59275d);if(typeof _0x1e7338[_0x19f5ca(0x19f)]==='function')try{await _0x1e7338[_0x19f5ca(0x19f)]['call'](this,_0x23a881,{'chatUpdate':_0x131ccb,'__dirname':_0x16c09b,'__filename':_0xc20cd});}catch(_0x5303ea){console[_0x19f5ca(0x1f1)](_0x5303ea);for(let [_0x5e8ae4]of global['owner'][_0x19f5ca(0x1ce)](([_0x586caa,_0x1fe034,_0x1eb26d])=>_0x1eb26d&&_0x586caa)){let _0x556a1c=(await this[_0x19f5ca(0x183)](_0x5e8ae4))[0x0]||{};if(_0x556a1c[_0x19f5ca(0x252)])_0x23a881[_0x19f5ca(0x23d)](('*Plugin:*\x20'+_0x59275d+_0x19f5ca(0x1ae)+_0x23a881[_0x19f5ca(0x247)]+_0x19f5ca(0x1ac)+_0x23a881['chat']+'\x0a*Command:*\x20'+_0x23a881[_0x19f5ca(0x235)]+_0x19f5ca(0x251)+format(_0x5303ea)+_0x19f5ca(0x1eb))[_0x19f5ca(0x239)](),_0x556a1c['jid']);}}if(!opts[_0x19f5ca(0x1cb)]){if(_0x1e7338[_0x19f5ca(0x1c0)]&&_0x1e7338['tags'][_0x19f5ca(0x207)](_0x19f5ca(0x1c7))){global[_0x19f5ca(0x1e7)](_0x19f5ca(0x1cb),_0x23a881,this);continue;}}const _0x1f68dd=_0x2f6363=>_0x2f6363[_0x19f5ca(0x20b)](/[|\\{}()[\]^$+*?.]/g,'\x5c$&');let _0x1a2677=_0x1e7338[_0x19f5ca(0x200)]?_0x1e7338[_0x19f5ca(0x200)]:this['prefix']?this[_0x19f5ca(0x186)]:global['prefix'],_0x4ced40=(_0x1a2677 instanceof RegExp?[[_0x1a2677['exec'](_0x23a881[_0x19f5ca(0x235)]),_0x1a2677]]:Array[_0x19f5ca(0x215)](_0x1a2677)?_0x1a2677[_0x19f5ca(0x1e2)](_0x4cd843=>{let _0x2af86b=_0x4cd843 instanceof RegExp?_0x4cd843:new RegExp(_0x1f68dd(_0x4cd843));return[_0x2af86b['exec'](_0x23a881['text']),_0x2af86b];}):typeof _0x1a2677===_0x19f5ca(0x1fe)?[[new RegExp(_0x1f68dd(_0x1a2677))['exec'](_0x23a881['text']),new RegExp(_0x1f68dd(_0x1a2677))]]:[[[],new RegExp()]])[_0x19f5ca(0x1a6)](_0x3acc8e=>_0x3acc8e[0x1]);if(typeof _0x1e7338[_0x19f5ca(0x19b)]==='function'){if(await _0x1e7338[_0x19f5ca(0x19b)][_0x19f5ca(0x194)](this,_0x23a881,{'match':_0x4ced40,'conn':this,'participants':_0x250f95,'groupMetadata':_0x589f20,'user':_0x1abc0a,'bot':_0x458b45,'isROwner':_0xd4094a,'isOwner':_0x28aaa8,'isRAdmin':_0x49cfc7,'isAdmin':_0x4507a5,'isBotAdmin':_0x9ad49c,'isPrems':_0x30f774,'chatUpdate':_0x131ccb,'__dirname':_0x16c09b,'__filename':_0xc20cd}))continue;}if(typeof _0x1e7338!==_0x19f5ca(0x1b7))continue;if(_0xe57a4a=(_0x4ced40[0x0]||'')[0x0]){let _0xaedd1a=_0x23a881['text'][_0x19f5ca(0x20b)](_0xe57a4a,''),[_0x59a7e4,..._0x16d6bc]=_0xaedd1a['trim']()[_0x19f5ca(0x192)]` `[_0x19f5ca(0x1ce)](_0x411f2b=>_0x411f2b);_0x16d6bc=_0x16d6bc||[];let _0x8cdb37=_0xaedd1a[_0x19f5ca(0x239)]()[_0x19f5ca(0x192)]` `[_0x19f5ca(0x191)](0x1),_0x558e31=_0x8cdb37['join']` `;_0x59a7e4=(_0x59a7e4||'')[_0x19f5ca(0x213)]();let _0x3eafd3=_0x1e7338[_0x19f5ca(0x227)]||global[_0x19f5ca(0x1e7)],_0x124fe0=_0x1e7338[_0x19f5ca(0x226)]instanceof RegExp?_0x1e7338['command'][_0x19f5ca(0x184)](_0x59a7e4):Array[_0x19f5ca(0x215)](_0x1e7338[_0x19f5ca(0x226)])?_0x1e7338[_0x19f5ca(0x226)][_0x19f5ca(0x18f)](_0x3f3001=>_0x3f3001 instanceof RegExp?_0x3f3001[_0x19f5ca(0x184)](_0x59a7e4):_0x3f3001===_0x59a7e4):typeof _0x1e7338['command']==='string'?_0x1e7338['command']===_0x59a7e4:![];if(!_0x124fe0)continue;_0x23a881[_0x19f5ca(0x1d4)]=_0x59275d;if(_0x23a881['chat']in _0xca3030[_0x19f5ca(0x1f6)]['chats']||_0x23a881[_0x19f5ca(0x247)]in _0xca3030[_0x19f5ca(0x1f6)][_0x19f5ca(0x250)]){let _0x595815=_0xca3030['data'][_0x19f5ca(0x1bf)][_0x23a881[_0x19f5ca(0x197)]],_0x2bcf5e=_0xca3030[_0x19f5ca(0x1f6)][_0x19f5ca(0x250)][_0x23a881['sender']];if(_0x2bcf5e[_0x19f5ca(0x230)])return this['reply'](_0x23a881[_0x19f5ca(0x197)],_0x19f5ca(0x22d)+_0x23a881[_0x19f5ca(0x247)][_0x19f5ca(0x192)]`@`[0x0]+_0x19f5ca(0x18b)+bname+_0x19f5ca(0x1cf)+oname+_0x19f5ca(0x1b0),_0x23a881,{'mentions':[_0x23a881['sender']]});if(_0x59275d!=_0x19f5ca(0x1d2)&&_0x2bcf5e?.['banned'])return;}if(_0x1e7338[_0x19f5ca(0x242)]&&_0x1e7338[_0x19f5ca(0x218)]&&!(_0xd4094a||_0x28aaa8)){_0x3eafd3(_0x19f5ca(0x218),_0x23a881,this);continue;}if(_0x1e7338[_0x19f5ca(0x242)]&&!_0xd4094a){_0x3eafd3(_0x19f5ca(0x242),_0x23a881,this);continue;}if(_0x1e7338[_0x19f5ca(0x218)]&&!_0x28aaa8){_0x3eafd3(_0x19f5ca(0x218),_0x23a881,this);continue;}if(_0x1e7338['premium']&&!_0x30f774){_0x3eafd3(_0x19f5ca(0x243),_0x23a881,this);continue;}if(_0x1e7338[_0x19f5ca(0x180)]&&!_0x23a881[_0x19f5ca(0x1c9)]){_0x3eafd3(_0x19f5ca(0x180),_0x23a881,this);continue;}else{if(_0x1e7338[_0x19f5ca(0x1a1)]&&!_0x9ad49c){_0x3eafd3(_0x19f5ca(0x1a1),_0x23a881,this);continue;}else{if(_0x1e7338['admin']&&!_0x4507a5){_0x3eafd3(_0x19f5ca(0x1c7),_0x23a881,this);continue;}}}if(_0x1e7338[_0x19f5ca(0x20a)]&&_0x23a881[_0x19f5ca(0x1c9)]){_0x3eafd3(_0x19f5ca(0x20a),_0x23a881,this);continue;}if(_0x1e7338[_0x19f5ca(0x216)]==!![]&&_0x49974d[_0x19f5ca(0x17b)]==![]){_0x3eafd3(_0x19f5ca(0x24d),_0x23a881,this);continue;}_0x23a881[_0x19f5ca(0x221)]=!![];let _0x3e5d3d=_0x19f5ca(0x22c)in _0x1e7338?parseInt(_0x1e7338['exp']):0x11;if(_0x3e5d3d>0xc8)_0x23a881[_0x19f5ca(0x23d)]('hehe-_-');else _0x23a881[_0x19f5ca(0x22c)]+=_0x3e5d3d;if(!_0x30f774&&_0x1e7338['limit']&&_0xca3030[_0x19f5ca(0x1f6)]['users'][_0x23a881[_0x19f5ca(0x247)]]['limit']<_0x1e7338[_0x19f5ca(0x1a8)]*0x1){this['reply'](_0x23a881['chat'],'Your\x20limit\x20runs\x20out,\x20please\x20buy\x20via\x20*'+_0xe57a4a+'buy*',_0x23a881);continue;}if(_0x1e7338[_0x19f5ca(0x22b)]>_0x49974d[_0x19f5ca(0x22b)]){this[_0x19f5ca(0x23d)](_0x23a881['chat'],_0x1e7338[_0x19f5ca(0x22b)]+_0x19f5ca(0x1d0)+_0x49974d[_0x19f5ca(0x22b)],_0x23a881);continue;}let _0x6bd361={'match':_0x4ced40,'usedPrefix':_0xe57a4a,'noPrefix':_0xaedd1a,'_args':_0x8cdb37,'args':_0x16d6bc,'command':_0x59a7e4,'text':_0x558e31,'conn':this,'participants':_0x250f95,'groupMetadata':_0x589f20,'user':_0x1abc0a,'bot':_0x458b45,'isROwner':_0xd4094a,'isOwner':_0x28aaa8,'isRAdmin':_0x49cfc7,'isAdmin':_0x4507a5,'isBotAdmin':_0x9ad49c,'isPrems':_0x30f774,'chatUpdate':_0x131ccb,'__dirname':_0x16c09b,'__filename':_0xc20cd};try{await _0x1e7338[_0x19f5ca(0x194)](this,_0x23a881,_0x6bd361);if(!_0x30f774)_0x23a881[_0x19f5ca(0x1a8)]=_0x23a881['limit']||_0x1e7338[_0x19f5ca(0x1a8)]||![];}catch(_0xf78399){_0x23a881[_0x19f5ca(0x1f1)]=_0xf78399,console['error'](_0xf78399);if(_0xf78399){let _0x593cf8=format(_0xf78399);for(let _0x7495ba of Object[_0x19f5ca(0x237)](global[_0x19f5ca(0x217)]))_0x593cf8=_0x593cf8[_0x19f5ca(0x20b)](new RegExp(_0x7495ba,'g'),'#HIDDEN#');if(_0xf78399['name'])for(let [_0x38fa1f]of global[_0x19f5ca(0x218)]['filter'](([_0xf2af61,_0x335583,_0x1fd871])=>_0x1fd871&&_0xf2af61)){let _0x1f1b65=(await this[_0x19f5ca(0x183)](_0x38fa1f))[0x0]||{};if(_0x1f1b65[_0x19f5ca(0x252)])_0x23a881[_0x19f5ca(0x23d)](('*Plugin:*\x20'+_0x23a881[_0x19f5ca(0x1d4)]+_0x19f5ca(0x1ae)+_0x23a881[_0x19f5ca(0x247)]+_0x19f5ca(0x1ac)+_0x23a881[_0x19f5ca(0x197)]+_0x19f5ca(0x209)+_0xe57a4a+_0x59a7e4+'\x20'+_0x16d6bc[_0x19f5ca(0x1cc)]('\x20')+_0x19f5ca(0x251)+_0x593cf8+'```')[_0x19f5ca(0x239)](),_0x1f1b65[_0x19f5ca(0x1fb)]);}_0x23a881['reply'](_0x593cf8);}}finally{if(typeof _0x1e7338['after']===_0x19f5ca(0x1b7))try{await _0x1e7338['after'][_0x19f5ca(0x194)](this,_0x23a881,_0x6bd361);}catch(_0xf2ac0d){console[_0x19f5ca(0x1f1)](_0xf2ac0d);}if(_0x23a881[_0x19f5ca(0x1a8)])_0x23a881[_0x19f5ca(0x23d)](+_0x23a881[_0x19f5ca(0x1a8)]+_0x19f5ca(0x185));}break;}}}catch(_0x27027b){console['error'](_0x27027b);}finally{if(opts[_0x19f5ca(0x20c)]&&_0x23a881[_0x19f5ca(0x235)]){const _0x302344=_0x23a881['id'];this['msgqueque']['unqueue'](_0x302344);}let _0xc6ee7,_0x5cfc5c=_0xca3030['data'][_0x19f5ca(0x1e5)];if(_0x23a881){_0x23a881[_0x19f5ca(0x247)]&&(_0xc6ee7=_0xca3030[_0x19f5ca(0x1f6)][_0x19f5ca(0x250)][_0x23a881[_0x19f5ca(0x247)]])&&(_0xc6ee7[_0x19f5ca(0x22c)]+=_0x23a881[_0x19f5ca(0x22c)],_0xc6ee7[_0x19f5ca(0x1a8)]-=_0x23a881[_0x19f5ca(0x1a8)]*0x1);let _0x16e9d7;if(_0x23a881[_0x19f5ca(0x1d4)]){let _0x854114=+new Date();if(_0x23a881[_0x19f5ca(0x1d4)]in _0x5cfc5c){_0x16e9d7=_0x5cfc5c[_0x23a881[_0x19f5ca(0x1d4)]];if(!isNumber(_0x16e9d7[_0x19f5ca(0x1e3)]))_0x16e9d7[_0x19f5ca(0x1e3)]=0x1;if(!isNumber(_0x16e9d7[_0x19f5ca(0x231)]))_0x16e9d7['success']=_0x23a881['error']!=null?0x0:0x1;if(!isNumber(_0x16e9d7[_0x19f5ca(0x1d1)]))_0x16e9d7[_0x19f5ca(0x1d1)]=_0x854114;if(!isNumber(_0x16e9d7[_0x19f5ca(0x232)]))_0x16e9d7['lastSuccess']=_0x23a881[_0x19f5ca(0x1f1)]!=null?0x0:_0x854114;}else _0x16e9d7=_0x5cfc5c[_0x23a881[_0x19f5ca(0x1d4)]]={'total':0x1,'success':_0x23a881[_0x19f5ca(0x1f1)]!=null?0x0:0x1,'last':_0x854114,'lastSuccess':_0x23a881['error']!=null?0x0:_0x854114};_0x16e9d7[_0x19f5ca(0x1e3)]+=0x1,_0x16e9d7[_0x19f5ca(0x1d1)]=_0x854114,_0x23a881['error']==null&&(_0x16e9d7[_0x19f5ca(0x231)]+=0x1,_0x16e9d7[_0x19f5ca(0x232)]=_0x854114);}}try{if(!opts['noprint'])await _0x3cb5d8(_0x23a881,this);}catch(_0x212b37){console['log'](_0x23a881,_0x23a881[_0x19f5ca(0x195)],_0x212b37);}if(opts[_0x19f5ca(0x190)])await this[_0x19f5ca(0x19e)]([_0x23a881[_0x19f5ca(0x22f)]]);if(!_0x23a881[_0x19f5ca(0x244)]&&_0x23a881[_0x19f5ca(0x235)]['match'](/(#script|#repository|#deploy|#Script|#Repository|#Deploy)/)){let _0x46d533=(_0x19f5ca(0x224)+bname+_0x19f5ca(0x1f3)+oname+'\x0a'+bname+_0x19f5ca(0x228)+oname+_0x19f5ca(0x20f)+oname+_0x19f5ca(0x1c5)+bname+_0x19f5ca(0x1c4)+oname+'\x0a')['trim']();this[_0x19f5ca(0x23d)](_0x23a881[_0x19f5ca(0x197)],_0x46d533,_0x23a881);}this[_0x19f5ca(0x1ee)]=this[_0x19f5ca(0x1ee)]?this['lastSetStatus']:{},this[_0x19f5ca(0x1ee)]=this[_0x19f5ca(0x1ee)]?this['lastSetStatus']:{},this[_0x19f5ca(0x1f9)]=this['lastBackup']?this['lastBackup']:{};if(!this[_0x19f5ca(0x1ee)]||!isNumber(this[_0x19f5ca(0x1ee)]))this[_0x19f5ca(0x1ee)]=0x0;if(new Date()-this['lastSetStatus']>0x2710){let _0x3b5ea1=process[_0x19f5ca(0x1e8)]()*0x3e8,_0x4ce2a0=clockString(_0x3b5ea1),_0x180739=await muptime(),_0x4dceeb=[bname+_0x19f5ca(0x18e)+_0x4ce2a0+_0x19f5ca(0x1d6)];await this[_0x19f5ca(0x1e9)](pickRandom(_0x4dceeb))['catch'](_0x444918=>_0x444918),this[_0x19f5ca(0x1ee)]=new Date()*0x1;}}}export async function participantsUpdate({id:_0x5702aa,participants:_0xc4f12a,action:_0x30c5fb}){const _0x432f80=_0x16f03d;if(opts[_0x432f80(0x1dd)])return;if(this[_0x432f80(0x176)])return;if(_0xca3030[_0x432f80(0x1f6)]==null)await loadDatabase();let _0x4948a2=_0xca3030['data'][_0x432f80(0x1bf)][_0x5702aa]||{},_0x2961cd='';switch(_0x30c5fb){case _0x432f80(0x1a0):case _0x432f80(0x1c1):if(_0x4948a2[_0x432f80(0x202)]){let _0x59b0ad=await _0xba341a[_0x432f80(0x23b)][_0x432f80(0x24f)](_0x5702aa,this['groupMetadata']);for(let _0x2dc19a of _0xc4f12a){let _0x4beaf0=_0x432f80(0x1b8);try{_0x4beaf0=await this['profilePictureUrl'](_0x2dc19a,_0x432f80(0x1d3));}catch(_0x306969){}finally{_0x2961cd=(_0x30c5fb===_0x432f80(0x1a0)?(_0x4948a2['sWelcome']||this[_0x432f80(0x202)]||_0xba341a[_0x432f80(0x1ed)][_0x432f80(0x202)]||_0x432f80(0x178))[_0x432f80(0x20b)](_0x432f80(0x205),await this[_0x432f80(0x248)](_0x5702aa))[_0x432f80(0x20b)](_0x432f80(0x211),_0x59b0ad[_0x432f80(0x214)]?.['toString']()||_0x432f80(0x20d)):_0x4948a2[_0x432f80(0x234)]||this[_0x432f80(0x199)]||_0xba341a['conn']['bye']||_0x432f80(0x22e))[_0x432f80(0x20b)]('@user','@'+_0x2dc19a[_0x432f80(0x192)]('@')[0x0]),this[_0x432f80(0x189)](_0x5702aa,_0x4beaf0,'pp.jpg',_0x2961cd,null,![],{'mentions':[_0x2dc19a]});}}}break;case _0x432f80(0x1fd):_0x2961cd=_0x4948a2['sPromote']||this[_0x432f80(0x1a4)]||_0xba341a[_0x432f80(0x1ed)][_0x432f80(0x1a4)]||_0x432f80(0x1b1);case _0x432f80(0x245):if(!_0x2961cd)_0x2961cd=_0x4948a2[_0x432f80(0x229)]||this['sdemote']||_0xba341a[_0x432f80(0x1ed)][_0x432f80(0x1dc)]||_0x432f80(0x1bb);_0x2961cd=_0x2961cd[_0x432f80(0x20b)](_0x432f80(0x1db),'@'+_0xc4f12a[0x0][_0x432f80(0x192)]('@')[0x0]);if(_0x4948a2[_0x432f80(0x23a)])this['sendMessage'](_0x5702aa,{'text':_0x2961cd,'mentions':this[_0x432f80(0x23c)](_0x2961cd)});break;}}export async function groupsUpdate(_0x479e2e){const _0x4d7488=_0x16f03d;if(opts[_0x4d7488(0x1dd)])return;for(const _0xd59bfd of _0x479e2e){const _0x3e1716=_0xd59bfd['id'];if(!_0x3e1716)continue;let _0x665398=_0xca3030['data']['chats'][_0x3e1716],_0x483440='';if(!_0x665398['detect'])continue;if(_0xd59bfd[_0x4d7488(0x214)])_0x483440=(_0x665398['sDesc']||this['sDesc']||_0xba341a[_0x4d7488(0x1ed)][_0x4d7488(0x177)]||_0x4d7488(0x1f5))[_0x4d7488(0x20b)](_0x4d7488(0x211),_0xd59bfd[_0x4d7488(0x214)]);if(_0xd59bfd[_0x4d7488(0x206)])_0x483440=(_0x665398['sSubject']||this[_0x4d7488(0x1df)]||_0xba341a[_0x4d7488(0x1ed)][_0x4d7488(0x1df)]||_0x4d7488(0x1d7))[_0x4d7488(0x20b)](_0x4d7488(0x205),_0xd59bfd[_0x4d7488(0x206)]);if(_0xd59bfd[_0x4d7488(0x1a2)])_0x483440=(_0x665398[_0x4d7488(0x233)]||this[_0x4d7488(0x233)]||_0xba341a[_0x4d7488(0x1ed)][_0x4d7488(0x233)]||_0x4d7488(0x188))[_0x4d7488(0x20b)](_0x4d7488(0x1ba),_0xd59bfd[_0x4d7488(0x1a2)]);if(_0xd59bfd[_0x4d7488(0x1ff)])_0x483440=(_0x665398['sRevoke']||this[_0x4d7488(0x1a9)]||_0xba341a[_0x4d7488(0x1ed)][_0x4d7488(0x1a9)]||_0x4d7488(0x240))[_0x4d7488(0x20b)](_0x4d7488(0x1d5),_0xd59bfd['revoke']);if(!_0x483440)continue;await this[_0x4d7488(0x1e4)](_0x3e1716,{'text':_0x483440,'mentions':this[_0x4d7488(0x23c)](_0x483440)});}}export async function callUpdate(_0x173ec4){const _0x2139d0=_0x16f03d;let _0x38e2ea=global['db']['data'][_0x2139d0(0x1f8)][this['user'][_0x2139d0(0x1fb)]]['antiCall'];if(!_0x38e2ea)return;for(let _0x24b618 of _0x173ec4){if(_0x24b618[_0x2139d0(0x1c9)]==![]){if(_0x24b618['status']==_0x2139d0(0x21e)){let _0x2868cc=await this[_0x2139d0(0x23d)](_0x24b618[_0x2139d0(0x17e)],'.',![],{'mentions':[_0x24b618[_0x2139d0(0x17e)]]}),_0x13f72d=global[_0x2139d0(0x218)][_0x2139d0(0x1ce)](([_0x2254ef,_0x5d2462])=>_0x2254ef&&_0x5d2462);await this['updateBlockStatus'](_0x24b618[_0x2139d0(0x17e)],_0x2139d0(0x23e));}}}}export async function deleteUpdate(_0x12c43f){const _0x4e5160=_0x16f03d;if(Array[_0x4e5160(0x215)](_0x12c43f['keys'])&&_0x12c43f[_0x4e5160(0x187)][_0x4e5160(0x241)]>0x0){const _0x57c4fe=await Promise['allSettled'](_0x12c43f[_0x4e5160(0x187)]['map'](async _0x299bbd=>{const _0x9a8d5b=_0x4e5160;if(_0x299bbd[_0x9a8d5b(0x18a)])return;const _0x4a6958=this[_0x9a8d5b(0x174)](_0x299bbd[_0x9a8d5b(0x1de)],_0x299bbd['id'])||this['loadMessage'](_0x299bbd['id']);if(!_0x4a6958||!_0x4a6958[_0x9a8d5b(0x20e)])return;let _0xee05eb=_0xca3030[_0x9a8d5b(0x1f6)]['chats'][_0x299bbd[_0x9a8d5b(0x1de)]];if(!_0xee05eb||_0xee05eb[_0x9a8d5b(0x219)])return;const _0x312a06=getContentType(_0x4a6958[_0x9a8d5b(0x20e)]);_0x312a06===_0x9a8d5b(0x238)&&(_0x4a6958[_0x9a8d5b(0x20e)][_0x9a8d5b(0x24c)]={'text':_0x4a6958[_0x9a8d5b(0x20e)][_0x312a06]},delete _0x4a6958[_0x9a8d5b(0x20e)][_0x312a06]);const _0x2d6908=_0x4a6958[_0x9a8d5b(0x1ef)]||_0x4a6958[_0x9a8d5b(0x22f)][_0x9a8d5b(0x1ef)]||_0x4a6958[_0x9a8d5b(0x22f)]['remoteJid'];return await this[_0x9a8d5b(0x23d)](_0x299bbd[_0x9a8d5b(0x1de)],(_0x9a8d5b(0x173)+_0x2d6908[_0x9a8d5b(0x192)]`@`[0x0]+_0x9a8d5b(0x1b5))[_0x9a8d5b(0x239)](),_0x4a6958,{'mentions':[_0x2d6908]}),await this[_0x9a8d5b(0x193)](_0x299bbd[_0x9a8d5b(0x1de)],_0x4a6958)['catch'](_0x431665=>console[_0x9a8d5b(0x1ab)](_0x431665,_0x4a6958));}));_0x57c4fe[_0x4e5160(0x1e2)](_0x2150fe=>_0x2150fe[_0x4e5160(0x17f)]===_0x4e5160(0x181)&&console[_0x4e5160(0x1f1)](_0x2150fe[_0x4e5160(0x1be)]));}}global['dfail']=(_0x5ce3a1,_0x4ca0e7,_0x2350b4)=>{const _0x437085=_0x16f03d;let _0x6e48f2={'rowner':'This\x20command\x20can\x20only\x20be\x20used\x20by\x20_*Bot\x20Owner*_\x20!','owner':_0x437085(0x1c3),'premium':_0x437085(0x19d),'group':_0x437085(0x1b6),'private':_0x437085(0x1f4),'admin':_0x437085(0x208),'botAdmin':_0x437085(0x17a),'unreg':_0x437085(0x236),'restrict':'*This\x20Feature\x20is\x20disable\x20by\x20Owner*'}[_0x5ce3a1];if(_0x6e48f2)return _0x4ca0e7[_0x437085(0x23d)](_0x6e48f2);};function clockString(_0x4c6a43){const _0x4aceeb=_0x16f03d;let _0x26d42d=isNaN(_0x4c6a43)?'--':Math[_0x4aceeb(0x21a)](_0x4c6a43/0x36ee80),_0x1da3d4=isNaN(_0x4c6a43)?'--':Math[_0x4aceeb(0x21a)](_0x4c6a43/0xea60)%0x3c,_0x1966ed=isNaN(_0x4c6a43)?'--':Math['floor'](_0x4c6a43/0x3e8)%0x3c;return[_0x26d42d,_0x1da3d4,_0x1966ed]['map'](_0x3aa40b=>_0x3aa40b['toString']()[_0x4aceeb(0x1e6)](0x2,0x0))[_0x4aceeb(0x1cc)](':');}function _0xc79e(_0x6b2ff6,_0x5ddf5e){const _0x18b10e=_0x18b1();return _0xc79e=function(_0xc79e81,_0x1b6369){_0xc79e81=_0xc79e81-0x173;let _0x510b4e=_0x18b10e[_0xc79e81];return _0x510b4e;},_0xc79e(_0x6b2ff6,_0x5ddf5e);}function pickRandom(_0x399e9c){const _0x5d1107=_0x16f03d;return _0x399e9c[Math['round'](_0x399e9c[_0x5d1107(0x241)]*Math[_0x5d1107(0x1fa)]())];}function _0x18b1(){const _0x32d2e7=['sPromote','@desc','108CslNTn','toLowerCase','desc','isArray','register','APIKeys','owner','delete','floor','80591joefme','@s.whatsapp.net','waitQueue','offer','redBright','nobot','isCommand','Update\x20\x27handler.js\x27','superadmin','Hey\x20Dear,\x0a','Beginner','command','fail','\x20Work\x20on\x20the\x20Principal\x20of\x20Wiley-MD\x20script\x20which\x20is\x20actually\x20Created\x20by\x20TEDevelopers.\x0aScript:\x20https://github.com/shizothetechie/wiley-md\x0aThe\x20Results\x20i.e.\x20','sDemote','endsWith','level','exp','Sorry\x20@','Bye,\x20@user!','key','banned','success','lastSuccess','sIcon','sBye','text','Please\x20register\x20to\x20use\x20this\x20feature\x20by\x20typing:\x0a\x0a*#register\x20name|age*\x0a\x0aExample:\x20*#register\x20human.16*','values','conversation','trim','detect','store','parseMention','reply','block','decodeJid','```Group\x20link\x20has\x20been\x20changed\x20to```\x0a@revoke','length','rowner','premium','fromMem','demote','disabled','sender','getName','antiToxic','regTime','expired','extendedTextMessage','unreg','dirname','fetchGroupMetadata','users','\x0a\x0a```','exists','isBanned','\x0a\x20\x20\x20\x20\x20\x20\x20\x20@','loadMessage','number','isInit','sDesc','Welcome,\x20@user!','reload','Make\x20the\x20bot\x20an\x20*Admin*\x20to\x20use\x20this\x20command!','registered','user','647023lKTBmB','from','status','group','rejected','__filename','onWhatsApp','test','\x20Limit\x20used','prefix','keys','```Icon\x20has\x20been\x20changed\x20to```','sendFile','fromMe','\x20\x0aYou\x20are\x20restricted\x20from\x20using\x20','911658rMMFeL','messages','\x20is\x20running\x20from\x20','some','autoread','slice','split','copyNForward','call','quoted','url','chat','sWelcome','bye','age','before','react','This\x20command\x20is\x20only\x20for\x20the\x20_*Premium*_\x20User!','readMessages','all','add','botAdmin','icon','afkReason','spromote','send','find','msgqueque','limit','sRevoke','status@broadcast','log','\x0a*Chat:*\x20','antiCall','\x0a*Sender:*\x20','g.us','\x20to\x20unban','@user\x20```is\x20now\x20Admin```','name','autoSticker','role','\x20just\x20delete\x20a\x20message\x20\x0a','This\x20command\x20Can\x20be\x20used\x20only\x20in\x20Groups','function','./media/contact.png','groupMetadata','@icon','@user\x20```is\x20no\x20longer\x20Admin```','4HMYfYS','gconly','reason','chats','tags','remove','premiumTime','This\x20command\x20can\x20only\x20be\x20used\x20by\x20_*Bot\x20Owner*_\x20!','\x20Team\x0aRegards\x20\x0a','\x20smoothly.\x20\x0a\x0aScript:\x20\x20https://github.com/shizothetechie/wiley-md\x0a\x0aThanks,\x0a','premiumDate','admin','default','isGroup','autolevelup','restrict','join','autochat','filter','.\x20Please\x20','\x20level\x20is\x20required\x20to\x20use\x20this\x20command.\x20Your\x20level\x20is\x20','last','owner-unbanuser.js','image','plugin','@revoke','\x20\x20||\x20Type\x20#script','```Subject\x20has\x20been\x20changed\x20to```\x0a@subject','3677050UnOfXX','object','swonly','@user','sdemote','self','remoteJid','sSubject','7569exJCyu','warn','map','total','sendMessage','stats','padStart','dfail','uptime','updateProfileStatus','2792WYGfTn','```','antiLink','conn','lastSetStatus','participant','10LztbiS','error','once','\x20is\x20Installed\x20by\x20','This\x20Command\x20can\x20be\x20used\x20only\x20in\x20_*Private*_\x20Chat','```Description\x20has\x20been\x20changed\x20to```\x0a@desc','data','lastclaim','settings','lastBackup','random','jid','258656FniBGY','promote','string','revoke','customPrefix','474ufxrPv','welcome','2631607SKlImW','4nPWdju','@subject','subject','includes','This\x20command\x20is\x20only\x20for\x20the\x20*Admin*\x20of\x20group!','\x0a*Command:*\x20','private','replace','queque','unknow','message','\x20deploy\x20this\x20script\x20and\x20running\x20'];_0x18b1=function(){return _0x32d2e7;};return _0x18b1();}async function muptime(){const _0x432b72=_0x16f03d;let _0x2b4dfb;return process[_0x432b72(0x1a5)]&&(process[_0x432b72(0x1a5)](_0x432b72(0x1e8)),_0x2b4dfb=await new Promise(_0x44e60e=>{const _0x3260bd=_0x432b72;process[_0x3260bd(0x1f2)](_0x3260bd(0x20e),_0x44e60e),setTimeout(_0x44e60e,0x3e8);})*0x3e8),clockString(_0x2b4dfb);}let file=_0x132bff[_0x16f03d(0x182)](import.meta[_0x16f03d(0x196)],!![]);watchFile(file,async()=>{const _0x1a36ed=_0x16f03d;unwatchFile(file),console[_0x1a36ed(0x1ab)](_0x146a87[_0x1a36ed(0x21f)](_0x1a36ed(0x222)));if(_0xba341a[_0x1a36ed(0x179)])console[_0x1a36ed(0x1ab)](await _0xba341a[_0x1a36ed(0x179)](await _0xba341a[_0x1a36ed(0x1ed)]));});