forked from ERLANRAHMAT/BETABOTZ-MD2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
1 lines (1 loc) · 12.8 KB
/
main.js
1
(function(_0x2f77af,_0x293964){const _0x14bb01=_0x2a61,_0x235e76=_0x2f77af();while(!![]){try{const _0x199899=parseInt(_0x14bb01(0x191))/0x1+-parseInt(_0x14bb01(0x170))/0x2+-parseInt(_0x14bb01(0x1b5))/0x3+-parseInt(_0x14bb01(0x14e))/0x4*(-parseInt(_0x14bb01(0x1bf))/0x5)+-parseInt(_0x14bb01(0x166))/0x6+parseInt(_0x14bb01(0x189))/0x7+parseInt(_0x14bb01(0x156))/0x8;if(_0x199899===_0x293964)break;else _0x235e76['push'](_0x235e76['shift']());}catch(_0x1e36b9){_0x235e76['push'](_0x235e76['shift']());}}}(_0x363c,0x4e817),((async()=>{const _0x4aea53=_0x2a61;require(_0x4aea53(0x199));const {useMultiFileAuthState:_0x588fc6,DisconnectReason:_0x766a07,generateForwardMessageContent:_0x486642,prepareWAMessageMedia:_0x41b5ff,generateWAMessageFromContent:_0x2ba9bd,generateMessageID:_0x3ac623,downloadContentFromMessage:_0x52e2b2,makeInMemoryStore:_0x2e479e,jidDecode:_0x23c043,proto:_0x4f3650}=require(_0x4aea53(0x192)),_0x3262f1=require(_0x4aea53(0x1b8)),_0xd5ffbf=require('ws'),_0x596bb9=require('path'),_0x255164=require('fs'),_0x20031a=require(_0x4aea53(0x18f)),_0x290319=require(_0x4aea53(0x184)),_0x256ec2=require(_0x4aea53(0x14f)),_0x40df0b=require(_0x4aea53(0x188)),_0x14e52d=require(_0x4aea53(0x1b8)),_0x40970a=require('os');let _0x41eec1=require(_0x4aea53(0x14a));var _0x180bbf;try{_0x180bbf=require(_0x4aea53(0x146));}catch(_0x587942){_0x180bbf=require(_0x4aea53(0x1bb));}const {Low:_0x466482,JSONFile:_0x1aab83}=_0x180bbf,_0x457f6d=require(_0x4aea53(0x169));global[_0x4aea53(0x19c)]=(_0x2e39f0,_0x56586c='/',_0x415b1b={},_0x965f5)=>(_0x2e39f0 in global[_0x4aea53(0x1b1)]?global[_0x4aea53(0x1b1)][_0x2e39f0]:_0x2e39f0)+_0x56586c+(_0x415b1b||_0x965f5?'?'+new URLSearchParams(Object[_0x4aea53(0x164)]({..._0x415b1b,..._0x965f5?{[_0x965f5]:global[_0x4aea53(0x196)][_0x2e39f0 in global['APIs']?global[_0x4aea53(0x1b1)][_0x2e39f0]:_0x2e39f0]}:{}})):''),global[_0x4aea53(0x1a5)]={'start':new Date()};const _0x554081=process['env'][_0x4aea53(0x18b)]||0xbb8;global[_0x4aea53(0x177)]=new Object(_0x20031a(process[_0x4aea53(0x180)]['slice'](0x2))[_0x4aea53(0x1a0)](![])[_0x4aea53(0x175)]()),global[_0x4aea53(0x187)]=new RegExp('^['+(opts[_0x4aea53(0x187)]||'xzXZ/i!#$%+£¢€¥^°=¶∆×÷π√✓©®:;?&.\x5c-')[_0x4aea53(0x183)](/[|\\{}()[\]^$+*?.\-\^]/g,_0x4aea53(0x17a))+']'),global['db']=new _0x466482(/https?:\/\//[_0x4aea53(0x173)](opts['db']||'')?new cloudDBAdapter(opts['db']):/mongodb/[_0x4aea53(0x173)](opts['db'])?new _0x457f6d(opts['db']):new _0x1aab83((opts['_'][0x0]?opts['_'][0x0]+'_':'')+'database.json')),global[_0x4aea53(0x1a1)]=global['db'],global[_0x4aea53(0x168)]=async function _0x325ac3(){const _0x4d6ad0=_0x4aea53;if(global['db'][_0x4d6ad0(0x1c3)])return new Promise(_0x522c25=>setInterval(function(){const _0x43ddb1=_0x4d6ad0;!global['db'][_0x43ddb1(0x1c3)]?(clearInterval(this),_0x522c25(global['db'][_0x43ddb1(0x1b4)]==null?global[_0x43ddb1(0x168)]():global['db'][_0x43ddb1(0x1b4)])):null;},0x1*0x3e8));if(global['db'][_0x4d6ad0(0x1b4)]!==null)return;global['db'][_0x4d6ad0(0x1c3)]=!![],await global['db'][_0x4d6ad0(0x165)](),global['db'][_0x4d6ad0(0x1c3)]=![],global['db'][_0x4d6ad0(0x1b4)]={'users':{},'chats':{},'stats':{},'msgs':{},'sticker':{},...global['db'][_0x4d6ad0(0x1b4)]||{}},global['db'][_0x4d6ad0(0x18d)]=_0x256ec2['chain'](global['db'][_0x4d6ad0(0x1b4)]);},loadDatabase();const _0x44e67d=''+(opts['_'][0x0]||_0x4aea53(0x153));global[_0x4aea53(0x1a9)]=!_0x255164[_0x4aea53(0x15d)](_0x44e67d);const {state:_0x235f99,saveState:_0x32d8b1,saveCreds:_0x4bc243}=await _0x588fc6(_0x44e67d),_0x265e65={'printQRInTerminal':!![],'syncFullHistory':!![],'markOnlineOnConnect':!![],'connectTimeoutMs':0xea60,'defaultQueryTimeoutMs':0x0,'keepAliveIntervalMs':0x2710,'generateHighQualityLinkPreview':!![],'patchMessageBeforeSending':_0x4ce0b4=>{const _0xf3d26=_0x4aea53,_0x3c310f=!!(_0x4ce0b4[_0xf3d26(0x198)]||_0x4ce0b4[_0xf3d26(0x1b6)]||_0x4ce0b4[_0xf3d26(0x1b3)]);return _0x3c310f&&(_0x4ce0b4={'viewOnceMessage':{'message':{'messageContextInfo':{'deviceListMetadataVersion':0x2,'deviceListMetadata':{}},..._0x4ce0b4}}}),_0x4ce0b4;},'auth':_0x235f99,'browser':[_0x4aea53(0x19d),_0x4aea53(0x1a2),''],'logger':_0x3262f1({'level':_0x4aea53(0x14c)}),'version':[0x2,0x89c,0xd]};global[_0x4aea53(0x182)]=_0x41eec1[_0x4aea53(0x17c)](_0x265e65);if(!opts[_0x4aea53(0x173)]){if(global['db'])setInterval(async()=>{const _0x5183c8=_0x4aea53;if(global['db']['data'])await global['db'][_0x5183c8(0x1ac)]();if(!opts[_0x5183c8(0x174)]&&(global[_0x5183c8(0x181)]||{})[_0x5183c8(0x1aa)])tmp=[_0x40970a[_0x5183c8(0x163)](),_0x5183c8(0x174)],tmp[_0x5183c8(0x157)](_0x16dd4f=>_0x290319[_0x5183c8(0x151)](_0x5183c8(0x1aa),[_0x16dd4f,_0x5183c8(0x1ae),'3',_0x5183c8(0x186),'f',_0x5183c8(0x15a)]));},0x1e*0x3e8);}async function _0x297aaf(_0x353e6c){const _0xee7ac=_0x4aea53,{connection:_0x134e54,lastDisconnect:_0x274ce5}=_0x353e6c;global[_0xee7ac(0x1a5)]['connect']=new Date();_0x274ce5&&_0x274ce5[_0xee7ac(0x1c0)]&&_0x274ce5['error'][_0xee7ac(0x179)]&&_0x274ce5[_0xee7ac(0x1c0)][_0xee7ac(0x179)][_0xee7ac(0x167)]!==_0x766a07[_0xee7ac(0x1c4)]&&conn['ws']['readyState']!==_0xd5ffbf['CONNECTING']&&console['log'](global[_0xee7ac(0x15f)](!![]));if(global['db']['data']==null)await loadDatabase();if(_0x353e6c[_0xee7ac(0x190)])conn['sendMessage'](_0xee7ac(0x16a),{'text':_0xee7ac(0x1c2)},{'quoted':null});}process['on'](_0x4aea53(0x149),console[_0x4aea53(0x1c0)]);const _0x54f280=_0xa534cc=>{const _0x346af4=_0x4aea53;_0xa534cc=require[_0x346af4(0x1b2)](_0xa534cc);let _0x307f2e,_0x3f5740=0x0;do{if(_0xa534cc in require[_0x346af4(0x1a7)])delete require[_0x346af4(0x1a7)][_0xa534cc];_0x307f2e=require(_0xa534cc),_0x3f5740++;}while((!_0x307f2e||(Array['isArray'](_0x307f2e)||_0x307f2e instanceof String)?!(_0x307f2e||[])[_0x346af4(0x148)]:typeof _0x307f2e==_0x346af4(0x19f)&&!Buffer[_0x346af4(0x1ad)](_0x307f2e)?!Object[_0x346af4(0x162)](_0x307f2e||{})[_0x346af4(0x148)]:!![])&&_0x3f5740<=0xa);return _0x307f2e;};let _0x2c38fd=!![];global[_0x4aea53(0x15f)]=function(_0x4aed4b){const _0xb15ace=_0x4aea53;let _0x310f1f=_0x54f280(_0xb15ace(0x197));if(_0x4aed4b){try{global[_0xb15ace(0x182)]['ws'][_0xb15ace(0x14d)]();}catch{}global[_0xb15ace(0x182)]={...global['conn'],..._0x41eec1[_0xb15ace(0x17c)](_0x265e65)};}return!_0x2c38fd&&(conn['ev']['off']('messages.upsert',conn[_0xb15ace(0x158)]),conn['ev'][_0xb15ace(0x1ab)](_0xb15ace(0x171),conn[_0xb15ace(0x15c)]),conn['ev'][_0xb15ace(0x1ab)]('message.delete',conn[_0xb15ace(0x1a8)]),conn['ev'][_0xb15ace(0x1ab)](_0xb15ace(0x1b9),conn[_0xb15ace(0x178)]),conn['ev'][_0xb15ace(0x1ab)](_0xb15ace(0x1af),conn['credsUpdate'])),conn['welcome']=_0xb15ace(0x144),conn[_0xb15ace(0x17e)]=_0xb15ace(0x1ba),conn[_0xb15ace(0x145)]=_0xb15ace(0x17b),conn[_0xb15ace(0x147)]=_0xb15ace(0x1a4),conn[_0xb15ace(0x158)]=_0x310f1f[_0xb15ace(0x158)]['bind'](conn),conn[_0xb15ace(0x15c)]=_0x310f1f[_0xb15ace(0x15c)][_0xb15ace(0x16e)](conn),conn[_0xb15ace(0x1a8)]=_0x310f1f[_0xb15ace(0x161)][_0xb15ace(0x16e)](conn),conn[_0xb15ace(0x178)]=_0x297aaf[_0xb15ace(0x16e)](conn),conn[_0xb15ace(0x1c1)]=_0x4bc243[_0xb15ace(0x16e)](conn),conn['ev']['on'](_0xb15ace(0x160),conn[_0xb15ace(0x158)]),conn['ev']['on'](_0xb15ace(0x171),conn[_0xb15ace(0x15c)]),conn['ev']['on'](_0xb15ace(0x195),conn[_0xb15ace(0x1a8)]),conn['ev']['on'](_0xb15ace(0x1b9),conn[_0xb15ace(0x178)]),conn['ev']['on'](_0xb15ace(0x1af),conn[_0xb15ace(0x1c1)]),_0x2c38fd=![],!![];};let _0x158540=_0x596bb9['join'](__dirname,_0x4aea53(0x1b7)),_0x1c1835=_0x5e33b1=>/\.js$/[_0x4aea53(0x173)](_0x5e33b1);global[_0x4aea53(0x1b7)]={};for(let _0x5d96ba of _0x255164[_0x4aea53(0x150)](_0x158540)['filter'](_0x1c1835)){try{global[_0x4aea53(0x1b7)][_0x5d96ba]=require(_0x596bb9[_0x4aea53(0x1a3)](_0x158540,_0x5d96ba));}catch(_0x8856b7){conn[_0x4aea53(0x19b)]['error'](_0x8856b7),delete global[_0x4aea53(0x1b7)][_0x5d96ba];}}console[_0x4aea53(0x176)](Object['keys'](global['plugins'])),global[_0x4aea53(0x19a)]=(_0x32667b,_0xeee824)=>{const _0x35b513=_0x4aea53;if(_0x1c1835(_0xeee824)){let _0x1a939b=_0x596bb9['join'](_0x158540,_0xeee824);if(_0x1a939b in require[_0x35b513(0x1a7)]){delete require[_0x35b513(0x1a7)][_0x1a939b];if(_0x255164['existsSync'](_0x1a939b))conn[_0x35b513(0x19b)][_0x35b513(0x16b)]('re\x20-\x20require\x20plugin\x20\x27'+_0xeee824+'\x27');else return conn['logger'][_0x35b513(0x159)](_0x35b513(0x1b0)+_0xeee824+'\x27'),delete global['plugins'][_0xeee824];}else conn['logger'][_0x35b513(0x16b)](_0x35b513(0x172)+_0xeee824+'\x27');let _0x3a3171=_0x40df0b(_0x255164['readFileSync'](_0x1a939b),_0xeee824);if(_0x3a3171)conn[_0x35b513(0x19b)][_0x35b513(0x1c0)](_0x35b513(0x17f)+_0xeee824+'\x27\x0a'+_0x3a3171);else try{global[_0x35b513(0x1b7)][_0xeee824]=require(_0x1a939b);}catch(_0x225e65){conn[_0x35b513(0x19b)][_0x35b513(0x1c0)](_0x225e65);}finally{global['plugins']=Object[_0x35b513(0x1bd)](Object[_0x35b513(0x164)](global[_0x35b513(0x1b7)])[_0x35b513(0x194)](([_0xf3ee78],[_0x1a97f8])=>_0xf3ee78[_0x35b513(0x193)](_0x1a97f8)));}}},Object[_0x4aea53(0x16f)](global['reload']),_0x255164[_0x4aea53(0x1a6)](_0x596bb9[_0x4aea53(0x1a3)](__dirname,_0x4aea53(0x1b7)),global['reload']),global[_0x4aea53(0x15f)]();async function _0x59eddb(){const _0x5e43a8=_0x4aea53;let _0x418a3a=await Promise['all']([_0x290319[_0x5e43a8(0x151)](_0x5e43a8(0x15e)),_0x290319['spawn']('ffprobe'),_0x290319[_0x5e43a8(0x151)](_0x5e43a8(0x15e),[_0x5e43a8(0x1bc),_0x5e43a8(0x152),_0x5e43a8(0x1c0),_0x5e43a8(0x16d),_0x5e43a8(0x155),_0x5e43a8(0x19e),'1','-f','webp','-']),_0x290319[_0x5e43a8(0x151)](_0x5e43a8(0x14b)),_0x290319[_0x5e43a8(0x151)](_0x5e43a8(0x185)),_0x290319[_0x5e43a8(0x151)]('gm'),_0x290319[_0x5e43a8(0x151)](_0x5e43a8(0x1aa),['--version'])][_0x5e43a8(0x1c5)](_0x5d82aa=>{const _0x3d3b1a=_0x5e43a8;return Promise[_0x3d3b1a(0x15b)]([new Promise(_0x27621d=>{_0x5d82aa['on']('close',_0x5addec=>{_0x27621d(_0x5addec!==0x7f);});}),new Promise(_0x560a0e=>{const _0x5e8581=_0x3d3b1a;_0x5d82aa['on'](_0x5e8581(0x1c0),_0x58cfe5=>_0x560a0e(![]));})]);})),[_0x12b1a2,_0x2a7939,_0x3afb29,_0x5005b3,_0x5418fc,_0x2c6366,_0x2387a4]=_0x418a3a;console[_0x5e43a8(0x176)](_0x418a3a);let _0x3c4e2d=global[_0x5e43a8(0x181)]={'ffmpeg':_0x12b1a2,'ffprobe':_0x2a7939,'ffmpegWebp':_0x3afb29,'convert':_0x5005b3,'magick':_0x5418fc,'gm':_0x2c6366,'find':_0x2387a4};Object[_0x5e43a8(0x16f)](global[_0x5e43a8(0x181)]);if(!_0x3c4e2d[_0x5e43a8(0x15e)])conn[_0x5e43a8(0x19b)][_0x5e43a8(0x159)](_0x5e43a8(0x18a));if(_0x3c4e2d['ffmpeg']&&!_0x3c4e2d[_0x5e43a8(0x1be)])conn[_0x5e43a8(0x19b)]['warn'](_0x5e43a8(0x154));if(!_0x3c4e2d['convert']&&!_0x3c4e2d[_0x5e43a8(0x185)]&&!_0x3c4e2d['gm'])conn[_0x5e43a8(0x19b)][_0x5e43a8(0x159)](_0x5e43a8(0x18c));}_0x59eddb()[_0x4aea53(0x17d)](()=>conn[_0x4aea53(0x19b)][_0x4aea53(0x16b)]('Quick\x20Test\x20Done'))[_0x4aea53(0x18e)](_0x4aea53(0x16c));})()));function _0x2a61(_0x14cc65,_0x31d40a){const _0x363cf5=_0x363c();return _0x2a61=function(_0x2a613b,_0x50781e){_0x2a613b=_0x2a613b-0x144;let _0x45c5d3=_0x363cf5[_0x2a613b];return _0x45c5d3;},_0x2a61(_0x14cc65,_0x31d40a);}function _0x363c(){const _0x2b43fc=['listMessage','data','623454KkWpbe','templateMessage','plugins','pino','connection.update','Selamat\x20tinggal\x20@user\x20👋','./lib/lowdb','-hide_banner','fromEntries','ffmpegWebp','350615FMCmrf','error','credsUpdate','Bot\x20connection\x20update✔️','READ','loggedOut','map','Selamat\x20datang\x20@user\x20di\x20group\x20@subject\x20utamakan\x20baca\x20desk\x20ya\x20\x0a@desc','promote','lowdb','demote','length','uncaughtException','./lib/simple','convert','silent','close','8CeSMeW','lodash','readdirSync','spawn','-loglevel','sessions','Stickers\x20may\x20not\x20animated\x20without\x20libwebp\x20on\x20ffmpeg\x20(--enable-ibwebp\x20while\x20compiling\x20ffmpeg)','color','1362616sEBcxz','forEach','handler','warn','-delete','race','participantsUpdate','existsSync','ffmpeg','reloadHandler','messages.upsert','delete','keys','tmpdir','entries','read','2273940GzOwrU','statusCode','loadDatabase','./lib/mongoDB','[email protected]','info','done','-filter_complex','bind','freeze','915030nwiAoc','group-participants.update','requiring\x20new\x20plugin\x20\x27','test','tmp','parse','log','opts','connectionUpdate','output','\x5c$&','@user\x20sekarang\x20admin!','makeWASocket','then','bye','syntax\x20error\x20while\x20loading\x20\x27','argv','support','conn','replace','child_process','magick','-type','prefix','syntax-error','3472322lPMaeG','Please\x20install\x20ffmpeg\x20for\x20sending\x20videos\x20(pkg\x20install\x20ffmpeg)','PORT','Stickers\x20may\x20not\x20work\x20without\x20imagemagick\x20if\x20libwebp\x20on\x20ffmpeg\x20doesnt\x20isntalled\x20(pkg\x20install\x20imagemagick)','chain','catch','yargs/yargs','receivedPendingNotifications','559263pMkIXL','@adiwajshing/baileys','localeCompare','sort','message.delete','APIKeys','./handler','buttonsMessage','./config','reload','logger','API','BOTCAHX','-frames:v','object','exitProcess','DATABASE','Safari','join','@user\x20sekarang\x20bukan\x20admin!','timestamp','watch','cache','onDelete','isInit','find','off','write','isBuffer','-amin','creds.update','deleted\x20plugin\x20\x27','APIs','resolve'];_0x363c=function(){return _0x2b43fc;};return _0x363c();}