jsdecryptor 4.0.3 → 4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/Database/database.js +1 -446
  2. package/Database/migration.js +1 -327
  3. package/Database/pgSync.js +1 -229
  4. package/Database/settingsStore.js +1 -305
  5. package/config.js +1 -32
  6. package/dave.js +1 -3063
  7. package/davelib/botConfig.js +1 -71
  8. package/davelib/greetings.js +1 -47
  9. package/davelib/id.js +1 -11
  10. package/davelib/index.js +1 -577
  11. package/davelib/isAdmin.js +1 -32
  12. package/davelib/isBanned.js +1 -12
  13. package/davelib/isOwner.js +1 -15
  14. package/davelib/messageConfig.js +1 -15
  15. package/davelib/messageHandler.js +1 -87
  16. package/davelib/reactions.js +1 -180
  17. package/davelib/welcome.js +1 -100
  18. package/daveset.js +1 -16
  19. package/davexcore/anti/antiaudio.js +1 -106
  20. package/davexcore/anti/antibadword.js +1 -313
  21. package/davexcore/anti/antibug.js +1 -156
  22. package/davexcore/anti/anticall.js +1 -219
  23. package/davexcore/anti/antichart.js +1 -280
  24. package/davexcore/anti/antidelete.js +1 -673
  25. package/davexcore/anti/antideletestatus.js +1 -535
  26. package/davexcore/anti/antidemote.js +1 -352
  27. package/davexcore/anti/antidocument.js +1 -105
  28. package/davexcore/anti/antiedit.js +1 -410
  29. package/davexcore/anti/antifiles.js +1 -109
  30. package/davexcore/anti/antigroupmention.js +1 -206
  31. package/davexcore/anti/antiimage.js +1 -105
  32. package/davexcore/anti/antikick.js +1 -125
  33. package/davexcore/anti/antilink.js +1 -237
  34. package/davexcore/anti/antimention.js +1 -143
  35. package/davexcore/anti/antipromote.js +1 -320
  36. package/davexcore/anti/antisticker.js +1 -105
  37. package/davexcore/anti/antitag.js +1 -191
  38. package/davexcore/anti/antivideo.js +1 -105
  39. package/davexcore/anti/antiviewonce.js +1 -396
  40. package/davexcore/anti/groupanticall.js +1 -262
  41. package/davexcore/anti/mention.js +1 -242
  42. package/davexcore/automation/alwaysonline.js +1 -226
  43. package/davexcore/automation/autoReadReciepts.js +1 -96
  44. package/davexcore/automation/autoread.js +1 -104
  45. package/davexcore/automation/autorecording.js +1 -197
  46. package/davexcore/automation/autostatus.js +1 -317
  47. package/davexcore/automation/autotyping.js +1 -197
  48. package/davexcore/automation/chatbot.js +1 -444
  49. package/davexcore/automation/chatmanage.js +1 -199
  50. package/davexcore/automation/devReact.js +1 -43
  51. package/davexcore/automation/goodbye.js +1 -181
  52. package/davexcore/automation/greetings.js +1 -154
  53. package/davexcore/automation/welcome.js +1 -187
  54. package/davexcore/group/addmember.js +1 -101
  55. package/davexcore/group/ban.js +1 -63
  56. package/davexcore/group/blockUnblock.js +1 -177
  57. package/davexcore/group/clear.js +1 -196
  58. package/davexcore/group/creategroup.js +1 -43
  59. package/davexcore/group/demote.js +1 -115
  60. package/davexcore/group/disappear.js +1 -67
  61. package/davexcore/group/groupinfo.js +1 -167
  62. package/davexcore/group/groupmanage.js +1 -133
  63. package/davexcore/group/hidetag.js +1 -108
  64. package/davexcore/group/joinrequests.js +1 -145
  65. package/davexcore/group/kick.js +1 -92
  66. package/davexcore/group/kickall.js +1 -63
  67. package/davexcore/group/leave.js +1 -38
  68. package/davexcore/group/linkgroup.js +1 -63
  69. package/davexcore/group/mute.js +1 -57
  70. package/davexcore/group/online.js +1 -117
  71. package/davexcore/group/pmblocker.js +1 -65
  72. package/davexcore/group/promote.js +1 -93
  73. package/davexcore/group/resetlink.js +1 -57
  74. package/davexcore/group/staff.js +1 -99
  75. package/davexcore/group/tag.js +1 -111
  76. package/davexcore/group/tagadmins.js +1 -88
  77. package/davexcore/group/tagall.js +1 -99
  78. package/davexcore/group/tagnotadmin.js +1 -92
  79. package/davexcore/group/topmembers.js +1 -202
  80. package/davexcore/group/unban.js +1 -64
  81. package/davexcore/group/unmute.js +1 -45
  82. package/davexcore/group/warn.js +1 -83
  83. package/davexcore/group/warnings.js +1 -26
  84. package/davexcore/owner/alive.js +1 -67
  85. package/davexcore/owner/bio.js +1 -49
  86. package/davexcore/owner/broadcast.js +1 -74
  87. package/davexcore/owner/chanel.js +1 -79
  88. package/davexcore/owner/channelid.js +1 -50
  89. package/davexcore/owner/clearsession.js +1 -86
  90. package/davexcore/owner/help.js +1 -649
  91. package/davexcore/owner/hijack.js +1 -69
  92. package/davexcore/owner/menuManage.js +1 -173
  93. package/davexcore/owner/menuSettings.js +1 -1
  94. package/davexcore/owner/owner.js +1 -17
  95. package/davexcore/owner/pair.js +1 -160
  96. package/davexcore/owner/pinchat.js +1 -44
  97. package/davexcore/owner/ping.js +1 -65
  98. package/davexcore/owner/profilepic.js +1 -61
  99. package/davexcore/owner/resetmenuimage.js +1 -16
  100. package/davexcore/owner/setGroupStatus.js +1 -315
  101. package/davexcore/owner/setbotconfig.js +1 -306
  102. package/davexcore/owner/setfont.js +1 -79
  103. package/davexcore/owner/setowner.js +1 -144
  104. package/davexcore/owner/setprefix.js +1 -131
  105. package/davexcore/owner/settings.js +1 -98
  106. package/davexcore/owner/startupwelcome.js +1 -94
  107. package/davexcore/owner/sudo.js +1 -138
  108. package/davexcore/owner/update.js +1 -282
  109. package/davexcore/utility/bible.js +1 -239
  110. package/davexcore/utility/encrypt.js +1 -99
  111. package/davexcore/utility/sports.js +1 -403
  112. package/index.js +1 -994
  113. package/package.json +1 -1
@@ -1,86 +1 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const os = require('os');
4
- const { createFakeContact, getBotName } = require('../../davelib/fakeContact');
5
-
6
- async function clearSessionCommand(sock, chatId, msg) {
7
- try {
8
- const senderId = msg.key.participant || msg.key.remoteJid;
9
- const fake = createFakeContact(senderId);
10
- const botName = getBotName();
11
-
12
- // Check if sender is owner
13
- if (!msg.key.fromMe) {
14
- await sock.sendMessage(chatId, {
15
- text: `*${botName}*\n❌ This command can only be used by the owner!`
16
- }, { quoted: fake });
17
- return;
18
- }
19
-
20
- // Fix: Go up 2 levels to reach /botcode, then into session
21
- const sessionDir = path.join(__dirname, '../../session'); // /botcode/session
22
-
23
- if (!fs.existsSync(sessionDir)) {
24
- await sock.sendMessage(chatId, {
25
- text: `*${botName}*\n❌ Session directory not found at: ${sessionDir}`
26
- }, { quoted: fake });
27
- return;
28
- }
29
-
30
- let filesCleared = 0;
31
- let errors = 0;
32
- let errorDetails = [];
33
-
34
- // Send initial status
35
- await sock.sendMessage(chatId, {
36
- text: `*${botName}*\nOptimizing session files for better performance...`
37
- }, { quoted: fake });
38
-
39
- const files = fs.readdirSync(sessionDir);
40
-
41
- // Count files by type for optimization
42
- let appStateSyncCount = 0;
43
- let preKeyCount = 0;
44
-
45
- for (const file of files) {
46
- if (file.startsWith('app-state-sync-')) appStateSyncCount++;
47
- if (file.startsWith('pre-key-')) preKeyCount++;
48
- }
49
-
50
- // Delete files
51
- for (const file of files) {
52
- if (file === 'creds.json') {
53
- // Skip creds.json file
54
- continue;
55
- }
56
- try {
57
- const filePath = path.join(sessionDir, file);
58
- fs.unlinkSync(filePath);
59
- filesCleared++;
60
- } catch (error) {
61
- errors++;
62
- errorDetails.push(`Failed to delete ${file}: ${error.message}`);
63
- }
64
- }
65
-
66
- // Send completion message
67
- const message = `*${botName}*\n✅ Session files cleared successfully!\n\n` +
68
- `📊 Statistics:\n` +
69
- `• Total files cleared: ${filesCleared}\n` +
70
- `• App state sync files: ${appStateSyncCount}\n` +
71
- `• Pre-key files: ${preKeyCount}\n` +
72
- (errors > 0 ? `\n⚠️ Errors encountered: ${errors}\n${errorDetails.join('\n')}` : '');
73
-
74
- await sock.sendMessage(chatId, {
75
- text: message
76
- }, { quoted: fake });
77
-
78
- } catch (error) {
79
- console.error('Error in clearsession command:', error);
80
- await sock.sendMessage(chatId, {
81
- text: `*${botName}*\n❌ Failed to clear session files!`
82
- }, { quoted: fake });
83
- }
84
- }
85
-
86
- module.exports = clearSessionCommand;
1
+ const _0x43dbf9=_0x1549;function _0xd94b(){const _0x40e3f0=['mJCYmwjVzK5IDa','Cgf0Aa','AM9PBG','rxjYB3iGAw4GyW','4OcIifbYzs1RzxKG','igzPBgvZigzVCG','mtaXnJKWmvjMCfLHua','zNjVBu1L','zwfYzwqGC3vJyW','mZuWmJjLD0nHCey','CgfYDgLJAxbHBG','4OcIiefWCcbZDgf0','kGRINyWGu2vZC2LV','C2vUze1LC3nHzW','BIbKAxjLy3rVCG','ihrVignSzwfYia','ig93BMvYiq','zdOG','mZbIy1DOwwy','mZe2Dg5Uwhr6','BIbJB21Tyw5KoG','mtmZmtG4y1vKrMLj','Aw9U','EsbUB3qGzM91BG','8j+tIIbtDgf0Axn0Aq','BgvHCNnLC3nPBW','BwvZC2fNzq','igjLDhrLCIbWzq','BIbMAwXLCYbJBa','lI4VlI4VC2vZCW','BgvZignSzwfYzq','kGRINiuGu2vZC2LV','BgLIl2zHA2vdBW','mJa4ofnmA213rq','zgvSzxrLia','C3LUyY0','y3m6cG','mte2ntu3u3nHrKfe','mtC2BxbeEgfi','kGRINyWGvgHPCYbJ','mty2zhnys3Pu','ig9UBhKGyMuGDq','mtnzAgTprMu','zw5JB3vUDgvYzq','CMvHzgrPCLn5BG','zcbHDdOG','B21Tyw5KignHBG','rMfPBgvKihrVia','kGPpChrPBwL6Aq','lI4VlI4Vzgf2zq','mtq1BurzEfDY','ChvZAa','4OcIifrVDgfSigzP','C2vKigj5ihrOzq','C2vZC2LVBIbMAq','zsbZEw5JigzPBa','zxHPC3rZu3LUyW','mtuYCxHTruHZ','y3jLzhmUANnVBG','CMzVCM1HBMnLlG','ChjLlwTLEs0','A2v5','mtaXnJe2nZzQCffbzLK','zxjYB3i','zxnZzNvSBhKHcG','zxHWB3j0CW','kGRINyWGrMfPBgvK','zxm6ia','BNrHy3q'];_0xd94b=function(){return _0x40e3f0;};return _0xd94b();}(function(_0x111ed7,_0x3e51d8){const _0x51279a=_0x1549,_0x318dd1=_0x111ed7();while(!![]){try{const _0x16ac12=parseInt(_0x51279a(0x198))/(-0x1033+0x163c*-0x1+0x2670)*(parseInt(_0x51279a(0x19f))/(-0x3*0xccd+0x45a*-0x1+-0x2ac3*-0x1))+parseInt(_0x51279a(0x1bc))/(0x51e+0x10af+-0x15ca)*(-parseInt(_0x51279a(0x1cf))/(0xb93*0x1+0x9*-0x377+0x274*0x8))+-parseInt(_0x51279a(0x1a9))/(0x2039*-0x1+-0x192b+0x3969)*(parseInt(_0x51279a(0x1c5))/(0x28*-0xef+0xf6d+0x15f1))+-parseInt(_0x51279a(0x19c))/(0x2202+-0x255a+-0x1*-0x35f)*(parseInt(_0x51279a(0x1b0))/(0xc9d*0x2+-0x241*0xa+-0x11*0x28))+parseInt(_0x51279a(0x1c2))/(-0x1*0x124a+0xf3b*-0x2+0x30c9)*(-parseInt(_0x51279a(0x1ce))/(0x2b*0x30+-0x68f*-0x2+-0x1524))+-parseInt(_0x51279a(0x19d))/(0xe8b*-0x1+0x241e+-0x8*0x2b1)*(-parseInt(_0x51279a(0x1d1))/(0x3*0x45d+0x20bb+-0x2dc6))+parseInt(_0x51279a(0x1a1))/(0x88*0x2+-0x404*-0x2+-0x90b)*(parseInt(_0x51279a(0x1b5))/(-0x21a+-0x34a*-0x1+-0x1d*0xa));if(_0x16ac12===_0x3e51d8)break;else _0x318dd1['push'](_0x318dd1['shift']());}catch(_0x280556){_0x318dd1['push'](_0x318dd1['shift']());}}}(_0xd94b,0x281*0x1f3+0x1bf54+0x2b*-0x1711));const fs=require('fs'),path=require(_0x43dbf9(0x1bd)),os=require('os'),{createFakeContact,getBotName}=require(_0x43dbf9(0x1a8)+_0x43dbf9(0x197)+_0x43dbf9(0x1bb));function _0x1549(_0x28c9f2,_0x387a78){_0x28c9f2=_0x28c9f2-(0x13ed+0x253b+-0x3791);const _0x6ea2d3=_0xd94b();let _0x226e59=_0x6ea2d3[_0x28c9f2];if(_0x1549['DmtVOn']===undefined){var _0x5a7b9d=function(_0x3a991b){const _0x1aa9d0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x950803='',_0x479eb6='';for(let _0x3ac374=0x2447*0x1+0x798+-0x2bdf*0x1,_0x232f45,_0x22e55e,_0x187586=0xaff*-0x2+0x1202+0xa*0x66;_0x22e55e=_0x3a991b['charAt'](_0x187586++);~_0x22e55e&&(_0x232f45=_0x3ac374%(-0x13e7+0x1*0x28+0x13c3)?_0x232f45*(-0x1341+-0x3*-0x47c+-0x1*-0x60d)+_0x22e55e:_0x22e55e,_0x3ac374++%(-0x1363*-0x2+0x7db*-0x2+0x5*-0x49c))?_0x950803+=String['fromCharCode'](-0x16db+0x1*-0x194+0x196e&_0x232f45>>(-(0x760+-0x162d+0xecf)*_0x3ac374&0x1602+0x259e+-0x2*0x1dcd)):-0x6b5+-0x1b1e+0x21d3*0x1){_0x22e55e=_0x1aa9d0['indexOf'](_0x22e55e);}for(let _0x198b28=0x73f+-0x4*0x7ff+0x18bd,_0x5b9d3c=_0x950803['length'];_0x198b28<_0x5b9d3c;_0x198b28++){_0x479eb6+='%'+('00'+_0x950803['charCodeAt'](_0x198b28)['toString'](0xb6a*-0x3+0x8*-0x496+0x3*0x17aa))['slice'](-(-0xa9a+0x95c*0x3+-0xd*0x158));}return decodeURIComponent(_0x479eb6);};_0x1549['VpkJbn']=_0x5a7b9d,_0x1549['OWMiAB']={},_0x1549['DmtVOn']=!![];}const _0x425dfa=_0x6ea2d3[0x15*0xad+0x156+-0xf87],_0x2e34aa=_0x28c9f2+_0x425dfa,_0x52deee=_0x1549['OWMiAB'][_0x2e34aa];return!_0x52deee?(_0x226e59=_0x1549['VpkJbn'](_0x226e59),_0x1549['OWMiAB'][_0x2e34aa]=_0x226e59):_0x226e59=_0x52deee,_0x226e59;}async function clearSessionCommand(_0x38b06f,_0x149f7b,_0x262cb2){const _0x3258b6=_0x1549;try{const _0x1914b3=_0x262cb2[_0x3258b6(0x1b4)][_0x3258b6(0x1c6)+'t']||_0x262cb2[_0x3258b6(0x1b4)]['remoteJid'],_0x264b58=createFakeContact(_0x1914b3),_0x4a8cb8=getBotName();if(!_0x262cb2[_0x3258b6(0x1b4)][_0x3258b6(0x1c3)]){await _0x38b06f[_0x3258b6(0x1c9)+'e'](_0x149f7b,{'text':'*'+_0x4a8cb8+(_0x3258b6(0x19e)+_0x3258b6(0x1a5)+_0x3258b6(0x1a0)+_0x3258b6(0x1ac)+_0x3258b6(0x1cc))},{'quoted':_0x264b58});return;}const _0x5d9987=path[_0x3258b6(0x1be)](__dirname,_0x3258b6(0x1d9)+_0x3258b6(0x1d2));if(!fs[_0x3258b6(0x1af)](_0x5d9987)){await _0x38b06f[_0x3258b6(0x1c9)+'e'](_0x149f7b,{'text':'*'+_0x4a8cb8+(_0x3258b6(0x1c8)+_0x3258b6(0x1ca)+_0x3258b6(0x1d3)+_0x3258b6(0x1a4))+_0x5d9987},{'quoted':_0x264b58});return;}let _0x120665=0x72a+0x1ea*-0x13+-0x10b*-0x1c,_0x2a0f0a=0x39+-0x5*-0x232+0x1*-0xb33,_0x48c5ed=[];await _0x38b06f[_0x3258b6(0x1c9)+'e'](_0x149f7b,{'text':'*'+_0x4a8cb8+(_0x3258b6(0x1a7)+'ng\x20session'+_0x3258b6(0x1c1)+_0x3258b6(0x1d7)+_0x3258b6(0x1b2)+'..')},{'quoted':_0x264b58});const _0x28b659=fs[_0x3258b6(0x1a3)+'c'](_0x5d9987);let _0x278070=-0x18*0x157+-0x1*0x1341+-0x1*-0x3369,_0xe97375=-0x1363*-0x2+0x7db*-0x2+0x9*-0x290;for(const _0x1f53cc of _0x28b659){if(_0x1f53cc['startsWith']('app-state-'+_0x3258b6(0x19a)))_0x278070++;if(_0x1f53cc['startsWith'](_0x3258b6(0x1b3)))_0xe97375++;}for(const _0x5ed8a5 of _0x28b659){if(_0x5ed8a5===_0x3258b6(0x1b1))continue;try{const _0x57a967=path[_0x3258b6(0x1be)](_0x5d9987,_0x5ed8a5);fs['unlinkSync'](_0x57a967),_0x120665++;}catch(_0x388823){_0x2a0f0a++,_0x48c5ed[_0x3258b6(0x1aa)](_0x3258b6(0x1a6)+_0x3258b6(0x199)+_0x5ed8a5+':\x20'+_0x388823[_0x3258b6(0x1d6)]);}}const _0xcec302='*'+_0x4a8cb8+(_0x3258b6(0x1db)+_0x3258b6(0x1d8)+_0x3258b6(0x1c4)+_0x3258b6(0x1b7)+'\x0a')+(_0x3258b6(0x1d4)+_0x3258b6(0x19b))+(_0x3258b6(0x1ab)+_0x3258b6(0x1da)+_0x3258b6(0x1cd)+_0x120665+'\x0a')+(_0x3258b6(0x1c7)+_0x3258b6(0x1ae)+_0x3258b6(0x1ba)+_0x278070+'\x0a')+(_0x3258b6(0x1c0)+'files:\x20'+_0xe97375+'\x0a')+(_0x2a0f0a>-0x16db+0x1*-0x194+0x186f?'\x0a⚠️\x20Errors\x20'+_0x3258b6(0x1a2)+_0x3258b6(0x1cd)+_0x2a0f0a+'\x0a'+_0x48c5ed[_0x3258b6(0x1be)]('\x0a'):'');await _0x38b06f[_0x3258b6(0x1c9)+'e'](_0x149f7b,{'text':_0xcec302},{'quoted':_0x264b58});}catch(_0x8a7103){console[_0x3258b6(0x1b6)](_0x3258b6(0x1bf)+_0x3258b6(0x1d5)+_0x3258b6(0x1d0),_0x8a7103),await _0x38b06f[_0x3258b6(0x1c9)+'e'](_0x149f7b,{'text':'*'+botName+(_0x3258b6(0x1b9)+_0x3258b6(0x1cb)+_0x3258b6(0x1ad)+'les!')},{'quoted':fake});}}module[_0x43dbf9(0x1b8)]=clearSessionCommand;