-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.js
1 lines (1 loc) · 13 KB
/
index.js
1
const _0x45480f=_0xc669;(function(_0x355544,_0x50fb4b){const _0x44ff99=_0xc669,_0x3e776f=_0x355544();while(!![]){try{const _0x173964=parseInt(_0x44ff99(0xf1))/(0x1*0xcf5+-0xa*0x21b+-0x81a*-0x1)*(-parseInt(_0x44ff99(0x17b))/(0xe49*-0x1+-0x1402+0x224d))+-parseInt(_0x44ff99(0x194))/(-0x53*-0x42+0x1*0x1f97+-0x34fa)+-parseInt(_0x44ff99(0xee))/(0x2465+-0x14ed+-0xf74)*(parseInt(_0x44ff99(0x150))/(0xf00+-0x1*0xb59+-0x3a2))+parseInt(_0x44ff99(0x121))/(0x23*-0x7e+0x227*-0x5+0x1c03)*(parseInt(_0x44ff99(0x107))/(-0xcf4+0x2*-0xb3e+-0x1*-0x2377))+-parseInt(_0x44ff99(0x184))/(-0x1ca8+-0x22c5+0x3f75)*(-parseInt(_0x44ff99(0x146))/(0x2707+0x16fc+-0x3dfa))+parseInt(_0x44ff99(0x15b))/(0x905+-0x2090+-0x1795*-0x1)+parseInt(_0x44ff99(0x154))/(0x1d39+-0x23e9*0x1+0x6bb)*(parseInt(_0x44ff99(0x144))/(-0x2322+0xe8*0x1a+0xb9e));if(_0x173964===_0x50fb4b)break;else _0x3e776f['push'](_0x3e776f['shift']());}catch(_0x294b5){_0x3e776f['push'](_0x3e776f['shift']());}}}(_0x5143,0x2d670+-0x238d9+-0x1*-0x1d783));const chalk=require(_0x45480f(0x195)),dotenv=require(_0x45480f(0x10e)),fs=require('fs'),path=require(_0x45480f(0x174)),TelegramBot=require(_0x45480f(0x178)+_0x45480f(0x17f)+'i'),{mongoDB,mongoDBV2}=require(_0x45480f(0xf8)+_0x45480f(0x18d)),CloudDBAdapter=require(_0x45480f(0x145)+_0x45480f(0x11b)),syntaxerror=require(_0x45480f(0x140)+'or');dotenv[_0x45480f(0x161)]();const DATABASE_URL=process[_0x45480f(0x189)][_0x45480f(0xfb)+'RL'],BOT_TOKEN=process[_0x45480f(0x189)][_0x45480f(0x167)],PREFIX=process[_0x45480f(0x189)][_0x45480f(0x10c)]?process[_0x45480f(0x189)][_0x45480f(0x10c)][_0x45480f(0x12c)](','):['/','!','.','#'];function _0xc669(_0x3643f0,_0x31e0d8){const _0x3ac404=_0x5143();return _0xc669=function(_0x13a0fa,_0x48052f){_0x13a0fa=_0x13a0fa-(-0x147*0x1d+0x1*0x53f+0x20a6);let _0x1351ff=_0x3ac404[_0x13a0fa];return _0x1351ff;},_0xc669(_0x3643f0,_0x31e0d8);}!BOT_TOKEN&&(console[_0x45480f(0x134)](chalk[_0x45480f(0x173)](_0x45480f(0x176)+_0x45480f(0xf7)+_0x45480f(0x190)+_0x45480f(0x101)+_0x45480f(0x14c)+'es')),process[_0x45480f(0x15d)](0x235*-0x6+0x10*0x1d3+0x7*-0x247));const bot=new TelegramBot(BOT_TOKEN,{'polling':!![]}),pluginsPath=path[_0x45480f(0x119)](__dirname,_0x45480f(0x141)),dbConfig={'type':DATABASE_URL?_0x45480f(0x11c):_0x45480f(0x18b),'version':'v2','url':DATABASE_URL||_0x45480f(0xea)+_0x45480f(0x160)},ensureLowDbExists=async()=>{const _0x3fc473=_0x45480f,_0x294d47={'oMWUM':_0x3fc473(0xea)+_0x3fc473(0x160),'jXsJh':_0x3fc473(0xea)+_0x3fc473(0xfc)+_0x3fc473(0x186)+_0x3fc473(0xf4)+_0x3fc473(0x175)+_0x3fc473(0x117)},_0x1ce2d0=path[_0x3fc473(0x119)](__dirname,_0x294d47[_0x3fc473(0x116)]);if(!fs[_0x3fc473(0x12f)](_0x1ce2d0)){const _0x29fa92={'data':[]};fs[_0x3fc473(0x137)+_0x3fc473(0xe4)](_0x1ce2d0,JSON[_0x3fc473(0x199)](_0x29fa92,null,0xfc*0xc+-0x1fb5+0x3fb*0x5)),console[_0x3fc473(0xe3)](chalk[_0x3fc473(0x158)](_0x294d47[_0x3fc473(0x14d)]));}},initDatabase=async()=>{const _0xd970d0=_0x45480f,_0xd10fd9={'iiGsm':function(_0x1bc21a,_0x531b7a){return _0x1bc21a===_0x531b7a;},'XUuIp':_0xd970d0(0x18b),'MgVYd':function(_0x5ad244){return _0x5ad244();},'jVUHj':_0xd970d0(0xea)+_0xd970d0(0x160),'bMbIv':_0xd970d0(0x13f)+_0xd970d0(0x16e)+_0xd970d0(0x177)+_0xd970d0(0x109)+_0xd970d0(0x143),'xYnjg':_0xd970d0(0x11c),'fmCFI':_0xd970d0(0x197),'bdMsw':function(_0x6821d8,_0x1503b9){return _0x6821d8(_0x1503b9);},'ccmKW':_0xd970d0(0x11f)+_0xd970d0(0x18f)+_0xd970d0(0x13e)+_0xd970d0(0xe6),'KTQvI':_0xd970d0(0xdd)+_0xd970d0(0x18c)+_0xd970d0(0xec)};let _0x477390;if(!dbConfig[_0xd970d0(0xdb)]||_0xd10fd9[_0xd970d0(0x108)](dbConfig[_0xd970d0(0x128)],_0xd10fd9[_0xd970d0(0x11e)])){await _0xd10fd9[_0xd970d0(0xdf)](ensureLowDbExists);const {Low:_0x4b07a6,JSONFile:_0x95cd81}=await import(_0xd10fd9[_0xd970d0(0x11e)]);_0x477390=new _0x4b07a6(new _0x95cd81(_0xd10fd9[_0xd970d0(0xff)])),await _0x477390[_0xd970d0(0x136)](),console[_0xd970d0(0xe3)](chalk[_0xd970d0(0x158)](_0xd10fd9[_0xd970d0(0x112)]));}else try{if(_0xd10fd9[_0xd970d0(0x108)](dbConfig[_0xd970d0(0x128)],_0xd10fd9[_0xd970d0(0x12b)]))_0xd10fd9[_0xd970d0(0x108)](dbConfig[_0xd970d0(0x155)],'v2')?_0x477390=new mongoDBV2(dbConfig[_0xd970d0(0xdb)]):_0x477390=new mongoDB(dbConfig[_0xd970d0(0xdb)]);else _0xd10fd9[_0xd970d0(0x108)](dbConfig[_0xd970d0(0x128)],_0xd10fd9[_0xd970d0(0x110)])&&(_0x477390=await _0xd10fd9[_0xd970d0(0x19b)](CloudDBAdapter,dbConfig[_0xd970d0(0xdb)]));console[_0xd970d0(0xe3)](chalk[_0xd970d0(0x158)](_0xd10fd9[_0xd970d0(0x187)]));}catch(_0x31b9b0){console[_0xd970d0(0x134)](chalk[_0xd970d0(0x173)](_0xd10fd9[_0xd970d0(0x192)]),_0x31b9b0),process[_0xd970d0(0x15d)](-0x11ce+-0x1ef8+0x30c7);}return _0x477390;};let db=null;initDatabase()[_0x45480f(0x17a)](_0x5b99d0=>{const _0x47a79e=_0x45480f,_0x804450={'Yfzvo':_0x47a79e(0x11f)+_0x47a79e(0x18f)+_0x47a79e(0x13e)+_0x47a79e(0xe6),'xruHa':_0x47a79e(0x19a)+_0x47a79e(0xf6)+_0x47a79e(0x123)};_0x5b99d0?(db=_0x5b99d0,console[_0x47a79e(0xe3)](chalk[_0x47a79e(0x158)](_0x804450[_0x47a79e(0xe2)]))):console[_0x47a79e(0xe3)](chalk[_0x47a79e(0x173)](_0x804450[_0x47a79e(0xe5)]));})[_0x45480f(0x15e)](_0x329e77=>{const _0x22cb00=_0x45480f,_0x448cf7={'OivKF':_0x22cb00(0xdd)+_0x22cb00(0x18c)+_0x22cb00(0xec)};console[_0x22cb00(0x134)](chalk[_0x22cb00(0x173)](_0x448cf7[_0x22cb00(0x17e)]),_0x329e77);});const loadPlugins=()=>{const _0x373300=_0x45480f,_0x513c7e={'NRDaq':_0x373300(0xe7),'zTgRm':function(_0x58e8fb,_0xbddce0){return _0x58e8fb(_0xbddce0);},'AZeWl':function(_0x59540b,_0x5abfda,_0x5cb832){return _0x59540b(_0x5abfda,_0x5cb832);},'OSnKX':_0x373300(0x18a)},_0x6ceb86=fs[_0x373300(0x133)+'c'](pluginsPath),_0x5536b5={};return _0x6ceb86[_0x373300(0xe9)](_0x4e48c1=>{const _0x30ea7c=_0x373300,_0x32d9cc=path[_0x30ea7c(0x119)](pluginsPath,_0x4e48c1),_0x49f9c1=fs[_0x30ea7c(0x165)](_0x32d9cc);if(_0x49f9c1[_0x30ea7c(0x172)]()&&_0x4e48c1[_0x30ea7c(0x10d)](_0x513c7e[_0x30ea7c(0x103)])){const _0x302449=path[_0x30ea7c(0x193)](_0x4e48c1,_0x513c7e[_0x30ea7c(0x103)]);try{const _0x22ee23=_0x513c7e[_0x30ea7c(0xe8)](require,_0x32d9cc);_0x22ee23[_0x30ea7c(0x196)]&&_0x22ee23[_0x30ea7c(0x196)][_0x30ea7c(0xe9)](_0x393dee=>{const _0x231c4a=_0x30ea7c;_0x5536b5[_0x393dee[_0x231c4a(0x183)+'e']()]=_0x22ee23;}),_0x22ee23[_0x30ea7c(0x15f)+_0x30ea7c(0x180)]&&_0x22ee23[_0x30ea7c(0x15f)+_0x30ea7c(0x180)][_0x30ea7c(0xe9)](_0x4d9cbf=>{const _0x18192c=_0x30ea7c;_0x5536b5[_0x18192c(0xef)+_0x4d9cbf[_0x18192c(0x183)+'e']()]=_0x22ee23;}),console[_0x30ea7c(0xe3)](chalk[_0x30ea7c(0x10f)](_0x30ea7c(0x12e)+_0x30ea7c(0x16a)+_0x30ea7c(0x179)+_0x302449));}catch(_0x532881){const _0x2e3c1e=_0x513c7e[_0x30ea7c(0xdc)](syntaxerror,fs[_0x30ea7c(0x102)+'nc'](_0x32d9cc,_0x513c7e[_0x30ea7c(0x15c)]),_0x4e48c1);_0x2e3c1e?console[_0x30ea7c(0x134)](chalk[_0x30ea7c(0x173)](_0x30ea7c(0x124)+_0x30ea7c(0x188)+_0x30ea7c(0x152)+_0x302449+'\x27:'),_0x2e3c1e):console[_0x30ea7c(0x134)](chalk[_0x30ea7c(0x120)](_0x30ea7c(0x111)+_0x30ea7c(0x114)+'\x20\x27'+_0x302449+'\x27:'),_0x532881);}}else console[_0x30ea7c(0x127)](chalk[_0x30ea7c(0x120)](_0x30ea7c(0x164)+_0x30ea7c(0x10b)+_0x30ea7c(0xde)+_0x30ea7c(0x191)+_0x4e48c1));}),_0x5536b5;},plugins=loadPlugins(),logUserActivity=(_0x567f6a,_0x19a9ae)=>{const _0x5cc1e9=_0x45480f,_0x261e03={'hvZbi':_0x5cc1e9(0xda)+'og'},_0x3e3b42='['+new Date()[_0x5cc1e9(0x15a)+'g']()+_0x5cc1e9(0x147)+_0x567f6a+(_0x5cc1e9(0x17c)+_0x5cc1e9(0x198))+_0x19a9ae+'\x0a';fs[_0x5cc1e9(0x126)+_0x5cc1e9(0x13b)](_0x261e03[_0x5cc1e9(0x12d)],_0x3e3b42);};function _0x5143(){const _0x1c1947=['mongodb','o\x20plugin\x20a','XUuIp','Database\x20i','yellow','2556JYotrG','mmand:\x20','\x20database','Syntax\x20err','ommand\x20\x27','appendFile','warn','type','lugin:\x20','Handling\x20c','xYnjg','split','hvZbi','Successful','existsSync','or\x20command','gins:','or\x20that\x20co','readdirSyn','error','chat','read','writeFileS','ErqOh','\x27.\x20Please\x20','Executing\x20','Sync','vailable\x20f','sendMessag','\x20successfu','LowDB\x20init','syntax-err','plugins','length','base.json','69144DDQwGz','./lib/clou','9JfKFDU',']\x20User:\x20','find','trim','keys','An\x20error\x20o','nt\x20variabl','jXsJh','startsWith','uery','2615THVCvn','er\x20\x27','in\x20\x27','later.','77OVfwaW','version','\x20from\x20chat','try\x20again\x20','green','ile\x20proces','toISOStrin','2278200TsWtOA','OSnKX','exit','catch','callbackQu','son','config','sing\x20the\x20c','uting\x20call','Skipping\x20d','lstatSync','\x20handler\x20f','BOT_TOKEN','\x20to\x20invoke','ccurred\x20wh','ly\x20loaded\x20','substring','Id:\x20','CLANE','ialized\x20su','\x20command:\x20','Unknown\x20ca','mmand\x20or\x20n','isFile','red','path','default\x20st','Error:\x20BOT','ccessfully','node-teleg','plugin:\x20','then','1884lCLsdd','\x20executed\x20','llback\x20que','OivKF','ram-bot-ap','ery','plugin\x20for','data','toLowerCas','2571432IZSBcZ','ery\x20\x27','d\x20successf','ccmKW','or\x20in\x20plug','env','utf-8','lowdb','ializing\x20d','oDB','Loaded\x20plu','nitialized','missing\x20in','ile:\x20','KTQvI','basename','932028yHlCVt','chalk','command','cloud','command:\x20','stringify','Failed\x20to\x20','bdMsw','allback\x20qu','activity.l','url','AZeWl','Error\x20init','r\x20non-JS\x20f','MgVYd','ndler:\x20','ery:\x20','Yfzvo','log','ync','xruHa','lly','.js','zTgRm','forEach','database.j','d:\x20','atabase:','\x20callback\x20','932XpBiZe','callback_','\x20for\x20chatI','107pRodeR','uting\x20plug','OGhQn','ully\x20with\x20','Attempting','initialize','_TOKEN\x20is\x20','./lib/mong','back\x20handl','message','DATABASE_U','son\x20create','allback\x20ha','ry:\x20','jVUHj','Unknown\x20co','\x20environme','readFileSy','NRDaq','text','callback_q','Executed\x20c','1722ekpfyP','iiGsm','\x20with\x20data','Error\x20exec','irectory\x20o','PREFIX','endsWith','dotenv','blue','fmCFI','Error\x20load','bMbIv','query:\x20','ing\x20plugin','mmand.','oMWUM','ructure.','Executed\x20p','join','gCyeE','dDBAdapter'];_0x5143=function(){return _0x1c1947;};return _0x5143();}bot['on'](_0x45480f(0xfa),_0x57e555=>{const _0x3c167f=_0x45480f,_0x16a086={'OGhQn':_0x3c167f(0x18e)+_0x3c167f(0x131),'gCyeE':function(_0x11638b,_0x21aad7){return _0x11638b(_0x21aad7);},'CLANE':_0x3c167f(0x100)+_0x3c167f(0x171)+_0x3c167f(0x11d)+_0x3c167f(0x13c)+_0x3c167f(0x132)+_0x3c167f(0x115)},_0x19ee8e=_0x57e555[_0x3c167f(0x135)]['id'],_0x4fa2de=_0x57e555[_0x3c167f(0x104)][_0x3c167f(0x149)](),_0x466b8f=PREFIX[_0x3c167f(0x148)](_0x7e657f=>_0x4fa2de[_0x3c167f(0x14e)](_0x7e657f));if(_0x466b8f){const _0x5e75c4=_0x4fa2de[_0x3c167f(0x16b)](_0x466b8f[_0x3c167f(0x142)])[_0x3c167f(0x149)](),[_0x208f3e,..._0x3203a9]=_0x5e75c4[_0x3c167f(0x12c)]('\x20'),_0x4e01ce=_0x3203a9[_0x3c167f(0x119)]('\x20')[_0x3c167f(0x149)](),_0x5115d8=_0x208f3e[_0x3c167f(0x183)+'e']();console[_0x3c167f(0xe3)](_0x16a086[_0x3c167f(0xf3)],Object[_0x3c167f(0x14a)](plugins)),console[_0x3c167f(0xe3)](_0x3c167f(0xf5)+_0x3c167f(0x168)+_0x3c167f(0x166)+_0x3c167f(0x130)+':\x20'+_0x5115d8);const _0x1b0e65=plugins[_0x5115d8];if(_0x1b0e65){let _0x562213={'bot':bot,'m':_0x57e555,'text':_0x4fa2de,'query':_0x4e01ce,'usedPrefix':_0x466b8f,'command':_0x5115d8,'db':db,'args':_0x3203a9};try{console[_0x3c167f(0xe3)](_0x3c167f(0x13a)+_0x3c167f(0x181)+_0x3c167f(0x16f)+_0x5115d8),_0x16a086[_0x3c167f(0x11a)](_0x1b0e65,_0x562213),console[_0x3c167f(0xe3)](chalk[_0x3c167f(0x158)](_0x3c167f(0x118)+_0x3c167f(0x129)+_0x5115d8+(_0x3c167f(0xf0)+_0x3c167f(0xeb))+_0x19ee8e));}catch(_0x5d53f2){console[_0x3c167f(0x134)](chalk[_0x3c167f(0x173)](_0x3c167f(0x10a)+_0x3c167f(0xf2)+_0x3c167f(0x152)+_0x5115d8+'\x27:'),_0x5d53f2),bot[_0x3c167f(0x13d)+'e'](_0x19ee8e,_0x3c167f(0x14b)+_0x3c167f(0x169)+_0x3c167f(0x159)+_0x3c167f(0x162)+_0x3c167f(0x125)+_0x5115d8+(_0x3c167f(0x139)+_0x3c167f(0x157)+_0x3c167f(0x153)));}}else bot[_0x3c167f(0x13d)+'e'](_0x19ee8e,_0x16a086[_0x3c167f(0x16d)]),console[_0x3c167f(0x134)](chalk[_0x3c167f(0x173)](_0x3c167f(0x100)+_0x3c167f(0x122)+_0x5115d8+(_0x3c167f(0x156)+_0x3c167f(0x16c))+_0x19ee8e));}}),bot['on'](_0x45480f(0x105)+_0x45480f(0x14f),async _0x274279=>{const _0xf43f11=_0x45480f,_0x572deb={'ErqOh':function(_0x2a6beb,_0x21b670){return _0x2a6beb(_0x21b670);}},_0x3d349b=_0x274279[_0xf43f11(0xfa)][_0xf43f11(0x135)]['id'],_0x48a1de=_0x274279[_0xf43f11(0x182)],_0x13e966=_0x48a1de[_0xf43f11(0x183)+'e']();console[_0xf43f11(0xe3)](_0xf43f11(0x12a)+_0xf43f11(0x19c)+_0xf43f11(0xe1)+_0x13e966);const _0x7b9bb7=plugins[_0xf43f11(0xef)+_0x13e966];if(_0x7b9bb7){let _0x648922={'bot':bot,'callbackQuery':_0x274279,'chatId':_0x3d349b,'callbackData':_0x13e966,'message':_0x274279[_0xf43f11(0xfa)]};try{console[_0xf43f11(0xe3)](_0xf43f11(0x13a)+_0xf43f11(0x181)+_0xf43f11(0xed)+_0xf43f11(0x113)+_0x13e966),await _0x572deb[_0xf43f11(0x138)](_0x7b9bb7,_0x648922),console[_0xf43f11(0xe3)](chalk[_0xf43f11(0x158)](_0xf43f11(0x106)+_0xf43f11(0xfd)+_0xf43f11(0xe0)+_0x13e966+(_0xf43f11(0xf0)+_0xf43f11(0xeb))+_0x3d349b));}catch(_0x1900c3){console[_0xf43f11(0x134)](chalk[_0xf43f11(0x173)](_0xf43f11(0x10a)+_0xf43f11(0x163)+_0xf43f11(0xf9)+_0xf43f11(0x151)+_0x13e966+'\x27:'),_0x1900c3),bot[_0xf43f11(0x13d)+'e'](_0x3d349b,_0xf43f11(0x14b)+_0xf43f11(0x169)+_0xf43f11(0x159)+_0xf43f11(0x162)+_0xf43f11(0x19c)+_0xf43f11(0x185)+_0x13e966+(_0xf43f11(0x139)+_0xf43f11(0x157)+_0xf43f11(0x153)));}}else console[_0xf43f11(0x134)](chalk[_0xf43f11(0x173)](_0xf43f11(0x170)+_0xf43f11(0x17d)+_0xf43f11(0xfe)+_0x13e966+(_0xf43f11(0x156)+_0xf43f11(0x16c))+_0x3d349b));});