jsdecryptor 4.0.3 → 4.0.5
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.
- package/Database/database.js +1 -446
- package/Database/migration.js +1 -327
- package/Database/pgSync.js +1 -229
- package/Database/settingsStore.js +1 -305
- package/config.js +1 -32
- package/dave.js +1 -3063
- package/davelib/botConfig.js +1 -71
- package/davelib/greetings.js +1 -47
- package/davelib/id.js +1 -11
- package/davelib/index.js +1 -577
- package/davelib/isAdmin.js +1 -32
- package/davelib/isBanned.js +1 -12
- package/davelib/isOwner.js +1 -15
- package/davelib/messageConfig.js +1 -15
- package/davelib/messageHandler.js +1 -87
- package/davelib/reactions.js +1 -180
- package/davelib/welcome.js +1 -100
- package/daveset.js +1 -16
- package/davexcore/anti/antiaudio.js +1 -106
- package/davexcore/anti/antibadword.js +1 -313
- package/davexcore/anti/antibug.js +1 -156
- package/davexcore/anti/anticall.js +1 -219
- package/davexcore/anti/antichart.js +1 -280
- package/davexcore/anti/antidelete.js +1 -673
- package/davexcore/anti/antideletestatus.js +1 -535
- package/davexcore/anti/antidemote.js +1 -352
- package/davexcore/anti/antidocument.js +1 -105
- package/davexcore/anti/antiedit.js +1 -410
- package/davexcore/anti/antifiles.js +1 -109
- package/davexcore/anti/antigroupmention.js +1 -206
- package/davexcore/anti/antiimage.js +1 -105
- package/davexcore/anti/antikick.js +1 -125
- package/davexcore/anti/antilink.js +1 -237
- package/davexcore/anti/antimention.js +1 -143
- package/davexcore/anti/antipromote.js +1 -320
- package/davexcore/anti/antisticker.js +1 -105
- package/davexcore/anti/antitag.js +1 -191
- package/davexcore/anti/antivideo.js +1 -105
- package/davexcore/anti/antiviewonce.js +1 -396
- package/davexcore/anti/groupanticall.js +1 -262
- package/davexcore/anti/mention.js +1 -242
- package/davexcore/automation/alwaysonline.js +1 -226
- package/davexcore/automation/autoReadReciepts.js +1 -96
- package/davexcore/automation/autoread.js +1 -104
- package/davexcore/automation/autorecording.js +1 -197
- package/davexcore/automation/autostatus.js +1 -317
- package/davexcore/automation/autotyping.js +1 -197
- package/davexcore/automation/chatbot.js +1 -444
- package/davexcore/automation/chatmanage.js +1 -199
- package/davexcore/automation/devReact.js +1 -43
- package/davexcore/automation/goodbye.js +1 -181
- package/davexcore/automation/greetings.js +1 -154
- package/davexcore/automation/welcome.js +1 -187
- package/davexcore/group/addmember.js +1 -101
- package/davexcore/group/ban.js +1 -63
- package/davexcore/group/blockUnblock.js +1 -177
- package/davexcore/group/clear.js +1 -196
- package/davexcore/group/creategroup.js +1 -43
- package/davexcore/group/demote.js +1 -115
- package/davexcore/group/disappear.js +1 -67
- package/davexcore/group/groupinfo.js +1 -167
- package/davexcore/group/groupmanage.js +1 -133
- package/davexcore/group/hidetag.js +1 -108
- package/davexcore/group/joinrequests.js +1 -145
- package/davexcore/group/kick.js +1 -92
- package/davexcore/group/kickall.js +1 -63
- package/davexcore/group/leave.js +1 -38
- package/davexcore/group/linkgroup.js +1 -63
- package/davexcore/group/mute.js +1 -57
- package/davexcore/group/online.js +1 -117
- package/davexcore/group/pmblocker.js +1 -65
- package/davexcore/group/promote.js +1 -93
- package/davexcore/group/resetlink.js +1 -57
- package/davexcore/group/staff.js +1 -99
- package/davexcore/group/tag.js +1 -111
- package/davexcore/group/tagadmins.js +1 -88
- package/davexcore/group/tagall.js +1 -99
- package/davexcore/group/tagnotadmin.js +1 -92
- package/davexcore/group/topmembers.js +1 -202
- package/davexcore/group/unban.js +1 -64
- package/davexcore/group/unmute.js +1 -45
- package/davexcore/group/warn.js +1 -83
- package/davexcore/group/warnings.js +1 -26
- package/davexcore/owner/alive.js +1 -67
- package/davexcore/owner/bio.js +1 -49
- package/davexcore/owner/broadcast.js +1 -74
- package/davexcore/owner/chanel.js +1 -79
- package/davexcore/owner/channelid.js +1 -50
- package/davexcore/owner/clearsession.js +1 -86
- package/davexcore/owner/help.js +1 -649
- package/davexcore/owner/hijack.js +1 -69
- package/davexcore/owner/menuManage.js +1 -173
- package/davexcore/owner/menuSettings.js +1 -1
- package/davexcore/owner/owner.js +1 -17
- package/davexcore/owner/pair.js +1 -160
- package/davexcore/owner/pinchat.js +1 -44
- package/davexcore/owner/ping.js +1 -65
- package/davexcore/owner/profilepic.js +1 -61
- package/davexcore/owner/resetmenuimage.js +1 -16
- package/davexcore/owner/setGroupStatus.js +1 -315
- package/davexcore/owner/setbotconfig.js +1 -306
- package/davexcore/owner/setfont.js +1 -79
- package/davexcore/owner/setowner.js +1 -144
- package/davexcore/owner/setprefix.js +1 -131
- package/davexcore/owner/settings.js +1 -98
- package/davexcore/owner/startupwelcome.js +1 -94
- package/davexcore/owner/sudo.js +1 -138
- package/davexcore/owner/update.js +1 -282
- package/davexcore/utility/bible.js +1 -239
- package/davexcore/utility/encrypt.js +1 -99
- package/davexcore/utility/sports.js +1 -403
- package/index.js +1 -994
- package/package.json +1 -1
|
@@ -1,88 +1 @@
|
|
|
1
|
-
const {
|
|
2
|
-
|
|
3
|
-
async function resolveToPhone(sock, jid) {
|
|
4
|
-
if (!jid) return 'unknown';
|
|
5
|
-
const raw = jid.split('@')[0].split(':')[0];
|
|
6
|
-
if (/^\d{7,15}$/.test(raw)) return raw;
|
|
7
|
-
try {
|
|
8
|
-
if (sock?.signalRepository?.lidMapping?.getPNForLID) {
|
|
9
|
-
const formats = [jid, `${raw}:0@lid`, `${raw}@lid`];
|
|
10
|
-
for (const fmt of formats) {
|
|
11
|
-
try {
|
|
12
|
-
const pn = await sock.signalRepository.lidMapping.getPNForLID(fmt);
|
|
13
|
-
if (pn) {
|
|
14
|
-
const num = String(pn).split('@')[0].replace(/[^0-9]/g, '');
|
|
15
|
-
if (num.length >= 7 && num.length <= 15 && num !== raw) return num;
|
|
16
|
-
}
|
|
17
|
-
} catch {}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
const groups = await sock.groupFetchAllParticipating();
|
|
21
|
-
for (const gid of Object.keys(groups)) {
|
|
22
|
-
for (const p of (groups[gid].participants || [])) {
|
|
23
|
-
const pid = (p.id || '').split('@')[0].split(':')[0];
|
|
24
|
-
const pLid = (p.lid || '').split('@')[0].split(':')[0];
|
|
25
|
-
if ((pLid === raw || pid === raw) && pid && /^\d{7,15}$/.test(pid) && pid !== raw) return pid;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
} catch {}
|
|
29
|
-
return raw;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async function tagAdminsCommand(sock, chatId, senderId, message, fullArgs) {
|
|
33
|
-
try {
|
|
34
|
-
const meta = await sock.groupMetadata(chatId);
|
|
35
|
-
const participants = meta.participants;
|
|
36
|
-
const botName = getBotName();
|
|
37
|
-
const fake = createFakeContact(message);
|
|
38
|
-
|
|
39
|
-
const superAdmins = [];
|
|
40
|
-
const admins = [];
|
|
41
|
-
|
|
42
|
-
for (const p of participants) {
|
|
43
|
-
if (p.admin === 'superadmin') {
|
|
44
|
-
superAdmins.push(p.id);
|
|
45
|
-
} else if (p.admin === 'admin') {
|
|
46
|
-
admins.push(p.id);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const allAdmins = [...superAdmins, ...admins];
|
|
51
|
-
|
|
52
|
-
if (allAdmins.length === 0) {
|
|
53
|
-
await sock.sendMessage(chatId, { text: 'No admins found in this group!' }, { quoted: fake });
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const mentions = [...allAdmins, senderId];
|
|
58
|
-
|
|
59
|
-
let text = `*${botName} TAG ADMINS*\n\n`;
|
|
60
|
-
|
|
61
|
-
if (fullArgs && fullArgs.trim()) {
|
|
62
|
-
text += `*Message:* ${fullArgs.trim()}\n\n`;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const resolvedSender = await resolveToPhone(sock, senderId);
|
|
66
|
-
text += `*Tagged By:* @${resolvedSender}\n\n`;
|
|
67
|
-
text += `*Admins:*\n`;
|
|
68
|
-
|
|
69
|
-
for (const id of superAdmins) {
|
|
70
|
-
const resolved = await resolveToPhone(sock, id);
|
|
71
|
-
text += `@${resolved}\n`;
|
|
72
|
-
}
|
|
73
|
-
for (const id of admins) {
|
|
74
|
-
const resolved = await resolveToPhone(sock, id);
|
|
75
|
-
text += `@${resolved}\n`;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
await sock.sendMessage(chatId, {
|
|
79
|
-
text: text.trim(),
|
|
80
|
-
mentions
|
|
81
|
-
}, { quoted: fake });
|
|
82
|
-
} catch (error) {
|
|
83
|
-
console.error('Tagadmins error:', error);
|
|
84
|
-
await sock.sendMessage(chatId, { text: `Failed to tag admins: ${error.message}` });
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
module.exports = tagAdminsCommand;
|
|
1
|
+
function _0x109c(_0x587c38,_0x3be952){_0x587c38=_0x587c38-(0x1d1d+-0x188e+-0x2d3);const _0x24b9c0=_0xf7fb();let _0x5bf948=_0x24b9c0[_0x587c38];if(_0x109c['kQodGO']===undefined){var _0x2c0e89=function(_0x35b1b7){const _0x1e95b2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x430132='',_0x3cd147='';for(let _0x5a98cb=0x10d8+0x503+0x5*-0x45f,_0x5801e1,_0x17e11c,_0xc41b1c=-0x14e*-0x13+-0x56*-0x6d+-0x3d68;_0x17e11c=_0x35b1b7['charAt'](_0xc41b1c++);~_0x17e11c&&(_0x5801e1=_0x5a98cb%(0xf02+-0x1*0x1c1+-0xd3d)?_0x5801e1*(-0x1*0x1d91+0xd*-0x29d+0x2e*0x163)+_0x17e11c:_0x17e11c,_0x5a98cb++%(-0xd37+-0x2c1*0x7+-0x2*-0x1041))?_0x430132+=String['fromCharCode'](0x69c+-0x24ab+0x1f0e&_0x5801e1>>(-(0x287*0x1+-0x7bb*0x1+0x536)*_0x5a98cb&0x6d*0x26+-0x1725+0x6fd)):-0xa3d+-0xac2+0x1*0x14ff){_0x17e11c=_0x1e95b2['indexOf'](_0x17e11c);}for(let _0x26182a=0x18be+-0x65d+-0x1261,_0x1d7bbe=_0x430132['length'];_0x26182a<_0x1d7bbe;_0x26182a++){_0x3cd147+='%'+('00'+_0x430132['charCodeAt'](_0x26182a)['toString'](0x169f+-0x1*0xc6+-0x15c9))['slice'](-(0x14f+0xdd3+-0xf20));}return decodeURIComponent(_0x3cd147);};_0x109c['VjFUGF']=_0x2c0e89,_0x109c['gdAFpf']={},_0x109c['kQodGO']=!![];}const _0x592709=_0x24b9c0[0x1ba+-0x12b2+-0x2d4*-0x6],_0x5529ea=_0x587c38+_0x592709,_0x58fdd1=_0x109c['gdAFpf'][_0x5529ea];return!_0x58fdd1?(_0x5bf948=_0x109c['VjFUGF'](_0x5bf948),_0x109c['gdAFpf'][_0x5529ea]=_0x5bf948):_0x5bf948=_0x58fdd1,_0x5bf948;}const _0xf2b6d8=_0x109c;(function(_0x553734,_0x3ccd58){const _0x4a373f=_0x109c,_0x103432=_0x553734();while(!![]){try{const _0x2b8e22=-parseInt(_0x4a373f(0x1ce))/(-0x10cf*-0x1+-0x1dfb+0xd2d)*(-parseInt(_0x4a373f(0x1c0))/(0x2a*0xb0+-0x11a6+-0xb38*0x1))+-parseInt(_0x4a373f(0x1d7))/(-0xb6d+-0x13f7*-0x1+-0x887)*(parseInt(_0x4a373f(0x1d2))/(0xa4*0x13+0x2195*0x1+0x3*-0xf3f))+-parseInt(_0x4a373f(0x1bd))/(0x11cd+-0x1160+-0x68)*(parseInt(_0x4a373f(0x1cd))/(0x10fd*0x1+-0x60a+0xaed*-0x1))+-parseInt(_0x4a373f(0x1cc))/(0x2554+0x35*0xe+-0x2833*0x1)+-parseInt(_0x4a373f(0x1c7))/(-0x69e+-0xd17*-0x1+0x1*-0x671)*(-parseInt(_0x4a373f(0x1d6))/(-0x1aa+0x26c7+-0x2514))+parseInt(_0x4a373f(0x1c3))/(-0x97b+0x816+0x16f)*(-parseInt(_0x4a373f(0x1d4))/(-0x12d3+0x23e7+-0x31*0x59))+parseInt(_0x4a373f(0x1e1))/(0x2088+0x1e46+-0x3ec2);if(_0x2b8e22===_0x3ccd58)break;else _0x103432['push'](_0x103432['shift']());}catch(_0x1d6d97){_0x103432['push'](_0x103432['shift']());}}}(_0xf7fb,0x15eca3+0x1*-0x15ea71+0xb9130));const {createFakeContact,getBotName}=require(_0xf2b6d8(0x1d8)+_0xf2b6d8(0x1e2)+'ntact');async function resolveToPhone(_0x1ff350,_0x3149a1){const _0x263301=_0x109c;if(!_0x3149a1)return'unknown';const _0x409023=_0x3149a1[_0x263301(0x1c4)]('@')[0x556*0x2+0x18ca+-0x59*0x66][_0x263301(0x1c4)](':')[-0x10ee+0xf02+-0x3*-0xa4];if(/^\d{7,15}$/[_0x263301(0x1c6)](_0x409023))return _0x409023;try{if(_0x1ff350?.['signalRepo'+_0x263301(0x1d9)]?.[_0x263301(0x1de)]?.[_0x263301(0x1cb)+'D']){const _0x6b0675=[_0x3149a1,_0x409023+_0x263301(0x1d5),_0x409023+_0x263301(0x1db)];for(const _0x743503 of _0x6b0675){try{const _0x31cb8b=await _0x1ff350[_0x263301(0x1e3)+'sitory'][_0x263301(0x1de)][_0x263301(0x1cb)+'D'](_0x743503);if(_0x31cb8b){const _0x18df27=String(_0x31cb8b)[_0x263301(0x1c4)]('@')[-0x2663+-0x1*0x1d91+0x2*0x21fa][_0x263301(0x1d0)](/[^0-9]/g,'');if(_0x18df27[_0x263301(0x1e7)]>=0x19e1+0xc43+-0x261d&&_0x18df27['length']<=-0x1*-0x15c5+-0x1f2d*0x1+0x977&&_0x18df27!==_0x409023)return _0x18df27;}}catch{}}}const _0x14915d=await _0x1ff350['groupFetch'+_0x263301(0x1bf)+'pating']();for(const _0xe33aa5 of Object['keys'](_0x14915d)){for(const _0x137fec of _0x14915d[_0xe33aa5][_0x263301(0x1c2)+'ts']||[]){const _0x41de91=(_0x137fec['id']||'')[_0x263301(0x1c4)]('@')[-0x1*0x2361+0x1219*-0x2+-0xfb*-0x49][_0x263301(0x1c4)](':')[-0x1732+0x6d*0x26+0x704],_0xc55fb0=(_0x137fec[_0x263301(0x1be)]||'')[_0x263301(0x1c4)]('@')[-0x13c2+-0xa3d+0x1dff]['split'](':')[-0x4*-0x87c+0x1e1+-0x23d1];if((_0xc55fb0===_0x409023||_0x41de91===_0x409023)&&_0x41de91&&/^\d{7,15}$/[_0x263301(0x1c6)](_0x41de91)&&_0x41de91!==_0x409023)return _0x41de91;}}}catch{}return _0x409023;}async function tagAdminsCommand(_0x587c38,_0x3be952,_0x24b9c0,_0x5bf948,_0x2c0e89){const _0x8fd3d8=_0x109c;try{const _0x592709=await _0x587c38[_0x8fd3d8(0x1c9)+_0x8fd3d8(0x1df)](_0x3be952),_0x5529ea=_0x592709[_0x8fd3d8(0x1c2)+'ts'],_0x58fdd1=getBotName(),_0x35b1b7=createFakeContact(_0x5bf948),_0x1e95b2=[],_0x430132=[];for(const _0xc41b1c of _0x5529ea){if(_0xc41b1c[_0x8fd3d8(0x1cf)]==='superadmin')_0x1e95b2['push'](_0xc41b1c['id']);else _0xc41b1c[_0x8fd3d8(0x1cf)]===_0x8fd3d8(0x1cf)&&_0x430132[_0x8fd3d8(0x1dc)](_0xc41b1c['id']);}const _0x3cd147=[..._0x1e95b2,..._0x430132];if(_0x3cd147[_0x8fd3d8(0x1e7)]===-0xaae+0x169f+-0x1*0xbf1){await _0x587c38['sendMessag'+'e'](_0x3be952,{'text':_0x8fd3d8(0x1e4)+_0x8fd3d8(0x1da)+_0x8fd3d8(0x1d1)},{'quoted':_0x35b1b7});return;}const _0x5a98cb=[..._0x3cd147,_0x24b9c0];let _0x5801e1='*'+_0x58fdd1+(_0x8fd3d8(0x1e6)+_0x8fd3d8(0x1ca));_0x2c0e89&&_0x2c0e89['trim']()&&(_0x5801e1+='*Message:*'+'\x20'+_0x2c0e89[_0x8fd3d8(0x1c8)]()+'\x0a\x0a');const _0x17e11c=await resolveToPhone(_0x587c38,_0x24b9c0);_0x5801e1+='*Tagged\x20By'+':*\x20@'+_0x17e11c+'\x0a\x0a',_0x5801e1+=_0x8fd3d8(0x1e5);for(const _0x26182a of _0x1e95b2){const _0x1d7bbe=await resolveToPhone(_0x587c38,_0x26182a);_0x5801e1+='@'+_0x1d7bbe+'\x0a';}for(const _0x7af773 of _0x430132){const _0x57de42=await resolveToPhone(_0x587c38,_0x7af773);_0x5801e1+='@'+_0x57de42+'\x0a';}await _0x587c38['sendMessag'+'e'](_0x3be952,{'text':_0x5801e1[_0x8fd3d8(0x1c8)](),'mentions':_0x5a98cb},{'quoted':_0x35b1b7});}catch(_0x423dbc){console[_0x8fd3d8(0x1c5)](_0x8fd3d8(0x1dd)+'error:',_0x423dbc),await _0x587c38['sendMessag'+'e'](_0x3be952,{'text':_0x8fd3d8(0x1c1)+_0x8fd3d8(0x1bc)+':\x20'+_0x423dbc[_0x8fd3d8(0x1e0)]});}}module[_0xf2b6d8(0x1d3)]=tagAdminsCommand;function _0xf7fb(){const _0x419c1a=['mtu1odqXn2rbwxDxrq','mZiYnZyXmg1eq3Prtq','ntC4mJK3v0fNvKL4','ywrTAw4','CMvWBgfJzq','AgLZigDYB3vWiq','mJrRBLzYrwe','zxHWB3j0CW','mZmXoda2mKfZugT1EG','oJbaBgLK','oxzZwMP6sa','ntC2nJCYC05bsgrW','lI4VlI4Vzgf2zq','C2L0B3j5','zM91BMqGAw4GDa','qgXPza','ChvZAa','vgfNywrTAw5Zia','BgLKtwfWCgLUzW','yxrH','BwvZC2fNzq','mZm1ndu0nJbuy0HLu3y','BgLIl2zHA2vdBW','C2LNBMfSuMvWBW','tM8GywrTAw5Zia','kKfKBwLUCZOQcG','ifrbrYbbre1jtG','BgvUz3rO','DgfNigfKBwLUCW','mtbKqMHsswC','BgLK','qwXSugfYDgLJAq','nfjxD2LrDq','rMfPBgvKihrVia','CgfYDgLJAxbHBG','ndbXExb5sLC','C3bSAxq','zxjYB3i','DgvZDa','mZCXotKYmfvHywr4Aq','DhjPBq','z3jVDxbnzxrHza','uYOkcG','z2v0ue5gB3jmsq'];_0xf7fb=function(){return _0x419c1a;};return _0xf7fb();}
|
|
@@ -1,99 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
const db = require('../../Database/database');
|
|
3
|
-
const { createFakeContact, getBotName } = require('../../davelib/fakeContact');
|
|
4
|
-
|
|
5
|
-
async function resolveToPhone(sock, jid) {
|
|
6
|
-
if (!jid) return 'unknown';
|
|
7
|
-
const raw = jid.split('@')[0].split(':')[0];
|
|
8
|
-
if (/^\d{7,15}$/.test(raw)) return raw;
|
|
9
|
-
try {
|
|
10
|
-
if (sock?.signalRepository?.lidMapping?.getPNForLID) {
|
|
11
|
-
const formats = [jid, `${raw}:0@lid`, `${raw}@lid`];
|
|
12
|
-
for (const fmt of formats) {
|
|
13
|
-
try {
|
|
14
|
-
const pn = await sock.signalRepository.lidMapping.getPNForLID(fmt);
|
|
15
|
-
if (pn) {
|
|
16
|
-
const num = String(pn).split('@')[0].replace(/[^0-9]/g, '');
|
|
17
|
-
if (num.length >= 7 && num.length <= 15 && num !== raw) return num;
|
|
18
|
-
}
|
|
19
|
-
} catch {}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const groups = await sock.groupFetchAllParticipating();
|
|
23
|
-
for (const gid of Object.keys(groups)) {
|
|
24
|
-
for (const p of (groups[gid].participants || [])) {
|
|
25
|
-
const pid = (p.id || '').split('@')[0].split(':')[0];
|
|
26
|
-
const pLid = (p.lid || '').split('@')[0].split(':')[0];
|
|
27
|
-
if ((pLid === raw || pid === raw) && pid && /^\d{7,15}$/.test(pid) && pid !== raw) return pid;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
} catch {}
|
|
31
|
-
return raw;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
async function tagAllCommand(sock, chatId, senderId, message) {
|
|
35
|
-
const fake = createFakeContact(senderId);
|
|
36
|
-
const botName = getBotName();
|
|
37
|
-
|
|
38
|
-
try {
|
|
39
|
-
const { isSenderAdmin, isBotAdmin } = await isAdmin(sock, chatId, senderId);
|
|
40
|
-
|
|
41
|
-
if (!isSenderAdmin && !isBotAdmin && !message?.key?.fromMe && !db.isSudo(senderId)) {
|
|
42
|
-
await sock.sendMessage(chatId, {
|
|
43
|
-
text: `*${botName}*\nAdmin only command!`
|
|
44
|
-
}, { quoted: fake });
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const groupMetadata = await sock.groupMetadata(chatId);
|
|
49
|
-
const participants = groupMetadata.participants;
|
|
50
|
-
|
|
51
|
-
if (!participants || participants.length === 0) {
|
|
52
|
-
await sock.sendMessage(chatId, {
|
|
53
|
-
text: `*${botName}*\nNo participants found!`
|
|
54
|
-
}, { quoted: fake });
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
let profilePictureUrl = null;
|
|
59
|
-
try {
|
|
60
|
-
profilePictureUrl = await sock.profilePictureUrl(chatId, 'image');
|
|
61
|
-
} catch (error) {}
|
|
62
|
-
|
|
63
|
-
let textContent = `╭─❖ *${botName} TAGALL* ❖─╮\n`;
|
|
64
|
-
textContent += `│ Group : ${groupMetadata.subject}\n`;
|
|
65
|
-
textContent += `│ Members : ${participants.length}\n`;
|
|
66
|
-
textContent += `╰────────────────────────╯\n\n`;
|
|
67
|
-
|
|
68
|
-
for (let index = 0; index < participants.length; index++) {
|
|
69
|
-
const participant = participants[index];
|
|
70
|
-
const number = (index + 1).toString().padStart(2, '0');
|
|
71
|
-
const resolved = await resolveToPhone(sock, participant.id);
|
|
72
|
-
const displayName = participant.name || participant.notify || resolved;
|
|
73
|
-
textContent += `${number}. @${resolved} (${displayName})\n`;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const mentions = participants.map(p => p.id);
|
|
77
|
-
|
|
78
|
-
if (profilePictureUrl) {
|
|
79
|
-
await sock.sendMessage(chatId, {
|
|
80
|
-
image: { url: profilePictureUrl },
|
|
81
|
-
caption: textContent,
|
|
82
|
-
mentions: mentions
|
|
83
|
-
}, { quoted: fake });
|
|
84
|
-
} else {
|
|
85
|
-
await sock.sendMessage(chatId, {
|
|
86
|
-
text: textContent,
|
|
87
|
-
mentions: mentions
|
|
88
|
-
}, { quoted: fake });
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
} catch (error) {
|
|
92
|
-
console.error('TagAll error:', error.message, 'Line:', error.stack?.split('\n')[1]);
|
|
93
|
-
await sock.sendMessage(chatId, {
|
|
94
|
-
text: `*${botName}*\nFailed to tag members.`
|
|
95
|
-
}, { quoted: fake });
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
module.exports = { tagAllCommand };
|
|
1
|
+
function _0x3889(_0x22e591,_0x5a0f06){_0x22e591=_0x22e591-(0x194f+-0xf61*-0x1+-0x27a1);const _0xff29bb=_0x4810();let _0x3b0c19=_0xff29bb[_0x22e591];if(_0x3889['ddUUsk']===undefined){var _0x31c712=function(_0x5f1e6e){const _0x3fce0b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2a3077='',_0x4a1f12='';for(let _0x55f3b4=0x79*0xf+0x4f6*-0x1+-0x221,_0x4862ae,_0x477207,_0x4aa202=-0x1e32+-0xbf*0x9+0x24e9;_0x477207=_0x5f1e6e['charAt'](_0x4aa202++);~_0x477207&&(_0x4862ae=_0x55f3b4%(-0xd81+0x4*0x10f+0x949)?_0x4862ae*(0x13f3*0x1+0x102f*0x1+-0x6*0x5fb)+_0x477207:_0x477207,_0x55f3b4++%(0x2*-0x12f+0x1d5f+-0x1afd))?_0x2a3077+=String['fromCharCode'](0x3*0x33b+0xa78+0x132a*-0x1&_0x4862ae>>(-(0xe*0x8+-0x2309*-0x1+-0x2377)*_0x55f3b4&-0xf68+-0x3*-0x6df+-0x52f*0x1)):0x1e73*0x1+-0x379*-0x7+0x1b61*-0x2){_0x477207=_0x3fce0b['indexOf'](_0x477207);}for(let _0x4cdd90=-0xff3*-0x2+0x1d*0x14e+-0x45bc,_0x50f118=_0x2a3077['length'];_0x4cdd90<_0x50f118;_0x4cdd90++){_0x4a1f12+='%'+('00'+_0x2a3077['charCodeAt'](_0x4cdd90)['toString'](-0x17a9+-0x1d26+-0x5*-0xa93))['slice'](-(-0xf*-0x15c+-0xd4e+0xc*-0x97));}return decodeURIComponent(_0x4a1f12);};_0x3889['WdpZFN']=_0x31c712,_0x3889['WQntbW']={},_0x3889['ddUUsk']=!![];}const _0x5cbd4a=_0xff29bb[-0xcb*-0x17+-0x7+-0x1236],_0x291bb7=_0x22e591+_0x5cbd4a,_0x22a7b9=_0x3889['WQntbW'][_0x291bb7];return!_0x22a7b9?(_0x3b0c19=_0x3889['WdpZFN'](_0x3b0c19),_0x3889['WQntbW'][_0x291bb7]=_0x3b0c19):_0x3b0c19=_0x22a7b9,_0x3b0c19;}const _0x3c9ea2=_0x3889;(function(_0x244c7f,_0x23fe8f){const _0x40a03d=_0x3889,_0x21b488=_0x244c7f();while(!![]){try{const _0xf24049=parseInt(_0x40a03d(0x120))/(0x1*-0x256a+0xbb7*-0x1+0x3122)*(-parseInt(_0x40a03d(0x112))/(0x1003+-0x3fc+-0xc05))+-parseInt(_0x40a03d(0x13c))/(0x20dc*0x1+-0xc61*-0x1+-0x33b*0xe)*(-parseInt(_0x40a03d(0x14e))/(0x1ae8+-0x14bd+0x20d*-0x3))+-parseInt(_0x40a03d(0x11a))/(-0xd3a*0x2+0x1a*-0x1+-0x1a93*-0x1)*(parseInt(_0x40a03d(0x111))/(0xf12+-0x21e*-0x11+0x2f*-0x116))+parseInt(_0x40a03d(0x14b))/(-0x1*0x2574+-0x1*-0x47d+0x20fe)+-parseInt(_0x40a03d(0x116))/(0xf8b+0x1ac*-0x1+-0xdd7)+-parseInt(_0x40a03d(0x118))/(-0x2*0xa4c+-0x63*-0x36+-0x41)*(-parseInt(_0x40a03d(0x132))/(0x94*0x2c+0x281*0x2+-0x8*0x3cd))+parseInt(_0x40a03d(0x12c))/(-0x1813+-0xa71+0x228f);if(_0xf24049===_0x23fe8f)break;else _0x21b488['push'](_0x21b488['shift']());}catch(_0x2bf687){_0x21b488['push'](_0x21b488['shift']());}}}(_0x4810,0x1421*-0x14+-0x1*-0xc0e23+0x1*0x1229e));const isAdmin=require(_0x3c9ea2(0x136)+_0x3c9ea2(0x13a)+'n'),db=require(_0x3c9ea2(0x146)+_0x3c9ea2(0x131)+_0x3c9ea2(0x13f)),{createFakeContact,getBotName}=require(_0x3c9ea2(0x136)+_0x3c9ea2(0x117)+'ntact');async function resolveToPhone(_0x22a7b9,_0x5f1e6e){const _0x2445c6=_0x3889;if(!_0x5f1e6e)return _0x2445c6(0x148);const _0x3fce0b=_0x5f1e6e[_0x2445c6(0x130)]('@')[0x1c0e+0x225d+-0x3e6b]['split'](':')[-0x37c+0x10ee+-0xd72];if(/^\d{7,15}$/[_0x2445c6(0x121)](_0x3fce0b))return _0x3fce0b;try{if(_0x22a7b9?.[_0x2445c6(0x127)+_0x2445c6(0x128)]?.['lidMapping']?.[_0x2445c6(0x119)+'D']){const _0x4a1f12=[_0x5f1e6e,_0x3fce0b+_0x2445c6(0x14a),_0x3fce0b+_0x2445c6(0x125)];for(const _0x55f3b4 of _0x4a1f12){try{const _0x4862ae=await _0x22a7b9[_0x2445c6(0x127)+_0x2445c6(0x128)]['lidMapping'][_0x2445c6(0x119)+'D'](_0x55f3b4);if(_0x4862ae){const _0x477207=String(_0x4862ae)['split']('@')[0x4*0x10f+-0x3d+0x1f*-0x21][_0x2445c6(0x138)](/[^0-9]/g,'');if(_0x477207[_0x2445c6(0x115)]>=0x9b7*0x2+-0x5*-0x425+-0x2820&&_0x477207[_0x2445c6(0x115)]<=-0x49*-0x67+0x7a9+0x5*-0x765&&_0x477207!==_0x3fce0b)return _0x477207;}}catch{}}}const _0x2a3077=await _0x22a7b9[_0x2445c6(0x123)+_0x2445c6(0x11e)+_0x2445c6(0x13b)]();for(const _0x4aa202 of Object[_0x2445c6(0x133)](_0x2a3077)){for(const _0x4cdd90 of _0x2a3077[_0x4aa202][_0x2445c6(0x113)+'ts']||[]){const _0x50f118=(_0x4cdd90['id']||'')[_0x2445c6(0x130)]('@')[0x20fe+0xcab*0x1+0x2da9*-0x1][_0x2445c6(0x130)](':')[-0xb3*-0x37+0x173e+-0x3db3],_0x55c0e9=(_0x4cdd90[_0x2445c6(0x12d)]||'')['split']('@')[-0x3*-0x6df+-0xfd1*0x2+0x5b*0x1f]['split'](':')[-0x2169*-0x1+0x1e9e*0x1+0x4007*-0x1];if((_0x55c0e9===_0x3fce0b||_0x50f118===_0x3fce0b)&&_0x50f118&&/^\d{7,15}$/[_0x2445c6(0x121)](_0x50f118)&&_0x50f118!==_0x3fce0b)return _0x50f118;}}}catch{}return _0x3fce0b;}async function tagAllCommand(_0x103945,_0x3bab06,_0x13229b,_0x10e7de){const _0x44f760=_0x3889,_0x15b7a5=createFakeContact(_0x13229b),_0xf1200a=getBotName();try{const {isSenderAdmin:_0x1148d9,isBotAdmin:_0x30fb52}=await isAdmin(_0x103945,_0x3bab06,_0x13229b);if(!_0x1148d9&&!_0x30fb52&&!_0x10e7de?.['key']?.[_0x44f760(0x139)]&&!db[_0x44f760(0x122)](_0x13229b)){await _0x103945[_0x44f760(0x12f)+'e'](_0x3bab06,{'text':'*'+_0xf1200a+(_0x44f760(0x12e)+_0x44f760(0x124)+'!')},{'quoted':_0x15b7a5});return;}const _0x279cc5=await _0x103945[_0x44f760(0x137)+_0x44f760(0x12b)](_0x3bab06),_0x386951=_0x279cc5[_0x44f760(0x113)+'ts'];if(!_0x386951||_0x386951[_0x44f760(0x115)]===0xd*0x1a1+-0x1ebd+0x990){await _0x103945['sendMessag'+'e'](_0x3bab06,{'text':'*'+_0xf1200a+('*\x0aNo\x20parti'+_0x44f760(0x114)+_0x44f760(0x141))},{'quoted':_0x15b7a5});return;}let _0x5f2139=null;try{_0x5f2139=await _0x103945[_0x44f760(0x143)+'tureUrl'](_0x3bab06,_0x44f760(0x110));}catch(_0x1db1ed){}let _0x5b3c02=_0x44f760(0x14c)+_0xf1200a+(_0x44f760(0x149)+_0x44f760(0x12a));_0x5b3c02+=_0x44f760(0x14d)+':\x20'+_0x279cc5[_0x44f760(0x129)]+'\x0a',_0x5b3c02+=_0x44f760(0x13e)+':\x20'+_0x386951[_0x44f760(0x115)]+'\x0a',_0x5b3c02+=_0x44f760(0x11c)+_0x44f760(0x11b)+'─────╯\x0a\x0a';for(let _0x2812a7=-0x1d26+-0x4*0x419+-0x3a*-0xc9;_0x2812a7<_0x386951['length'];_0x2812a7++){const _0xd1f2e9=_0x386951[_0x2812a7],_0x533f00=(_0x2812a7+(0xa8f+0x25*-0x48+-0x1*0x26))[_0x44f760(0x134)]()['padStart'](0x1a1a+-0x1c98+0x280,'0'),_0x20915c=await resolveToPhone(_0x103945,_0xd1f2e9['id']),_0x10ed9b=_0xd1f2e9[_0x44f760(0x10f)]||_0xd1f2e9[_0x44f760(0x140)]||_0x20915c;_0x5b3c02+=_0x533f00+_0x44f760(0x145)+_0x20915c+'\x20('+_0x10ed9b+')\x0a';}const _0x5d7216=_0x386951[_0x44f760(0x147)](_0x270cfd=>_0x270cfd['id']);_0x5f2139?await _0x103945[_0x44f760(0x12f)+'e'](_0x3bab06,{'image':{'url':_0x5f2139},'caption':_0x5b3c02,'mentions':_0x5d7216},{'quoted':_0x15b7a5}):await _0x103945[_0x44f760(0x12f)+'e'](_0x3bab06,{'text':_0x5b3c02,'mentions':_0x5d7216},{'quoted':_0x15b7a5});}catch(_0x25ace5){console[_0x44f760(0x144)](_0x44f760(0x135)+_0x44f760(0x126),_0x25ace5['message'],_0x44f760(0x142),_0x25ace5['stack']?.[_0x44f760(0x130)]('\x0a')[0x22b7+0x1a02*-0x1+-0x8b4]),await _0x103945[_0x44f760(0x12f)+'e'](_0x3bab06,{'text':'*'+_0xf1200a+(_0x44f760(0x13d)+'o\x20tag\x20memb'+_0x44f760(0x11d))},{'quoted':_0x15b7a5});}}module[_0x3c9ea2(0x11f)]={'tagAllCommand':tagAllCommand};function _0x4810(){const _0x9dc6bf=['A2v5CW','Dg9tDhjPBMC','vgfNqwXSigvYCG','lI4VlI4Vzgf2zq','z3jVDxbnzxrHza','CMvWBgfJzq','zNjVBu1L','BgLIl2LZqwrTAq','Cgf0Aw5N','mZm5mZe4q1LwEfbM','kGPgywLSzwqGDa','4Pscie1LBwjLCNmG','yxnL','BM90Awz5','Dw5Kiq','tgLUztO','ChjVzMLSzvbPyW','zxjYB3i','lIba','lI4VlI4Vrgf0yq','BwfW','Dw5RBM93BG','ifrbr0fmtcOG4P2w','oJbaBgLK','mtq0mdC4oujsuLH4rG','4PwT4Psa4P2wicO','4PscieDYB3vWicaG','mtjyB3HoEgW','BMfTzq','Aw1Hz2u','mJq2u09ACKT2','nJrdDu9pCeq','CgfYDgLJAxbHBG','y2LWyw50CYbMBW','BgvUz3rO','ndu0nJC1mMnRBgfOBq','BgLIl2zHA2vdBW','ovbnruHdsa','z2v0ue5gB3jmsq','mtq2mtqWBe5LAunb','4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa','4PwW4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa','zxjZlG','qwXSugfYDgLJAq','zxHWB3j0CW','mtaZntHLCNjTuu0','DgvZDa','AxntDwrV','z3jVDxbgzxrJAa','BhKGy29TBwfUza','qgXPza','B3i6','C2LNBMfSuMvWBW','C2L0B3j5','C3vIAMvJDa','4Psa4PwUcG','yxrH','mtCXmdu1nJf4rvPZq0O','BgLK','kGPbzg1PBIbVBG','C2vUze1LC3nHzW','C3bSAxq','yMfZzs9KyxrHyG','nZu5mZqXmfH6v2rnrW'];_0x4810=function(){return _0x9dc6bf;};return _0x4810();}
|
|
@@ -1,92 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
const { createFakeContact, getBotName } = require('../../davelib/fakeContact');
|
|
3
|
-
|
|
4
|
-
async function resolveToPhone(sock, jid) {
|
|
5
|
-
if (!jid) return 'unknown';
|
|
6
|
-
const raw = jid.split('@')[0].split(':')[0];
|
|
7
|
-
if (/^\d{7,15}$/.test(raw)) return raw;
|
|
8
|
-
try {
|
|
9
|
-
if (sock?.signalRepository?.lidMapping?.getPNForLID) {
|
|
10
|
-
const formats = [jid, `${raw}:0@lid`, `${raw}@lid`];
|
|
11
|
-
for (const fmt of formats) {
|
|
12
|
-
try {
|
|
13
|
-
const pn = await sock.signalRepository.lidMapping.getPNForLID(fmt);
|
|
14
|
-
if (pn) {
|
|
15
|
-
const num = String(pn).split('@')[0].replace(/[^0-9]/g, '');
|
|
16
|
-
if (num.length >= 7 && num.length <= 15 && num !== raw) return num;
|
|
17
|
-
}
|
|
18
|
-
} catch {}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
const groups = await sock.groupFetchAllParticipating();
|
|
22
|
-
for (const gid of Object.keys(groups)) {
|
|
23
|
-
for (const p of (groups[gid].participants || [])) {
|
|
24
|
-
const pid = (p.id || '').split('@')[0].split(':')[0];
|
|
25
|
-
const pLid = (p.lid || '').split('@')[0].split(':')[0];
|
|
26
|
-
if ((pLid === raw || pid === raw) && pid && /^\d{7,15}$/.test(pid) && pid !== raw) return pid;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
} catch {}
|
|
30
|
-
return raw;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
async function tagNotAdminCommand(sock, chatId, senderId, message) {
|
|
34
|
-
try {
|
|
35
|
-
const { isSenderAdmin, isBotAdmin } = await isAdmin(sock, chatId, senderId);
|
|
36
|
-
const fake = createFakeContact(senderId);
|
|
37
|
-
|
|
38
|
-
if (!isBotAdmin) {
|
|
39
|
-
await sock.sendMessage(chatId, { text: 'Please make the bot an admin first.' }, { quoted: fake });
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (!isSenderAdmin) {
|
|
44
|
-
await sock.sendMessage(chatId, { text: 'Only admins can use the .tagnotadmin command.' }, { quoted: fake });
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const groupMetadata = await sock.groupMetadata(chatId);
|
|
49
|
-
const participants = groupMetadata.participants || [];
|
|
50
|
-
|
|
51
|
-
const nonAdmins = participants.filter(p => !p.admin).map(p => p.id);
|
|
52
|
-
if (nonAdmins.length === 0) {
|
|
53
|
-
await sock.sendMessage(chatId, { text: 'No non-admin members to tag.' }, { quoted: fake });
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
let profilePicUrl;
|
|
58
|
-
try {
|
|
59
|
-
profilePicUrl = await sock.profilePictureUrl(chatId, 'image');
|
|
60
|
-
} catch (error) {
|
|
61
|
-
profilePicUrl = null;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
let text = `🏷️ *Tagging Non-Admins in ${groupMetadata.subject}*\n\n`;
|
|
65
|
-
text += `📊 *Total Non-Admins:* ${nonAdmins.length}\n\n`;
|
|
66
|
-
text += '🔊 *Hello Everyone:*\n\n';
|
|
67
|
-
|
|
68
|
-
for (const jid of nonAdmins) {
|
|
69
|
-
const resolved = await resolveToPhone(sock, jid);
|
|
70
|
-
text += `@${resolved}\n`;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (profilePicUrl) {
|
|
74
|
-
await sock.sendMessage(chatId, {
|
|
75
|
-
image: { url: profilePicUrl },
|
|
76
|
-
caption: text,
|
|
77
|
-
mentions: nonAdmins
|
|
78
|
-
}, { quoted: fake });
|
|
79
|
-
} else {
|
|
80
|
-
await sock.sendMessage(chatId, {
|
|
81
|
-
text,
|
|
82
|
-
mentions: nonAdmins
|
|
83
|
-
}, { quoted: fake });
|
|
84
|
-
}
|
|
85
|
-
} catch (error) {
|
|
86
|
-
console.error('Error in tagnotadmin command:', error);
|
|
87
|
-
const fake = createFakeContact(senderId);
|
|
88
|
-
await sock.sendMessage(chatId, { text: 'Failed to tag non-admin members.' }, { quoted: fake });
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
module.exports = tagNotAdminCommand;
|
|
1
|
+
const _0x375b7a=_0x22d1;(function(_0x216e07,_0x593522){const _0x280491=_0x22d1,_0x5ab23c=_0x216e07();while(!![]){try{const _0x2527ce=parseInt(_0x280491(0x1f1))/(-0x1226+-0x1f*-0x50+0x1*0x877)*(parseInt(_0x280491(0x21b))/(0x221+-0x2a5*-0x3+-0xa0e))+-parseInt(_0x280491(0x21a))/(0x12b*-0x10+0x7*0x51b+-0x2d7*0x6)+parseInt(_0x280491(0x220))/(0x41d+0x2395+-0x1*0x27ae)*(-parseInt(_0x280491(0x225))/(-0x171a+-0x2*-0x137f+-0xfdf))+-parseInt(_0x280491(0x214))/(-0x1640+0xa*0x3e6+-0x10b6)*(parseInt(_0x280491(0x219))/(-0xecc*0x2+0x9b*-0xf+0x26b4))+parseInt(_0x280491(0x1fe))/(-0x445*-0x3+0x65f*0x6+-0x3301)+-parseInt(_0x280491(0x217))/(0x902*-0x2+0xbd0+0x63d)+parseInt(_0x280491(0x200))/(0x1bab+-0x14+0x1b8d*-0x1)*(parseInt(_0x280491(0x20a))/(-0x765+0x105a+-0x8ea));if(_0x2527ce===_0x593522)break;else _0x5ab23c['push'](_0x5ab23c['shift']());}catch(_0x3429dc){_0x5ab23c['push'](_0x5ab23c['shift']());}}}(_0xc04a,-0x91c4c+-0xdc33a+0x2209da));function _0x22d1(_0x54dade,_0x42586b){_0x54dade=_0x54dade-(-0x1140+0x220d+-0xedd);const _0x57b9d9=_0xc04a();let _0x36e589=_0x57b9d9[_0x54dade];if(_0x22d1['qviTFq']===undefined){var _0x221c48=function(_0x1aa308){const _0x1171db='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x43176e='',_0x3df56f='';for(let _0x41e504=0x1f4a+-0x7e7+-0x1763*0x1,_0x332100,_0x4bb8cf,_0x3f5a42=-0x9e4+-0xc85+0x1669;_0x4bb8cf=_0x1aa308['charAt'](_0x3f5a42++);~_0x4bb8cf&&(_0x332100=_0x41e504%(-0x3e1+0x71*0x3e+0x7d3*-0x3)?_0x332100*(-0x1a8b+0x243b+-0x970)+_0x4bb8cf:_0x4bb8cf,_0x41e504++%(-0x2442+-0x1ebd+-0x5*-0xd67))?_0x43176e+=String['fromCharCode'](0x133c+0x2*-0x35e+-0xb81&_0x332100>>(-(-0x1052*-0x2+0xcbb+-0x2d5d)*_0x41e504&0x25*0x3b+-0x1*0x460+0x97*-0x7)):0x1fd9+0x77c+-0x1*0x2755){_0x4bb8cf=_0x1171db['indexOf'](_0x4bb8cf);}for(let _0x42f189=-0x4*-0x2d1+0x6d4+-0x182*0xc,_0x3cd640=_0x43176e['length'];_0x42f189<_0x3cd640;_0x42f189++){_0x3df56f+='%'+('00'+_0x43176e['charCodeAt'](_0x42f189)['toString'](-0x11b*0x9+0x1*0x9ca+0x39))['slice'](-(-0x5*-0x15f+-0xce5*0x3+0x1fd6));}return decodeURIComponent(_0x3df56f);};_0x22d1['rYSmMK']=_0x221c48,_0x22d1['yGHcQc']={},_0x22d1['qviTFq']=!![];}const _0x31ac56=_0x57b9d9[0x25e5*-0x1+0x1*-0x36b+0x4*0xa54],_0x56a438=_0x54dade+_0x31ac56,_0x5ce410=_0x22d1['yGHcQc'][_0x56a438];return!_0x5ce410?(_0x36e589=_0x22d1['rYSmMK'](_0x36e589),_0x22d1['yGHcQc'][_0x56a438]=_0x36e589):_0x36e589=_0x5ce410,_0x36e589;}const isAdmin=require(_0x375b7a(0x201)+_0x375b7a(0x1ff)+'n'),{createFakeContact,getBotName}=require(_0x375b7a(0x201)+_0x375b7a(0x1f8)+_0x375b7a(0x20c));async function resolveToPhone(_0x380dc5,_0x79682){const _0xf14cce=_0x22d1;if(!_0x79682)return'unknown';const _0x50a488=_0x79682[_0xf14cce(0x1f6)]('@')[-0x2131+-0x9e4+0x2b15][_0xf14cce(0x1f6)](':')[-0x10*0x91+0x14b*-0x3+0xcf1*0x1];if(/^\d{7,15}$/[_0xf14cce(0x21e)](_0x50a488))return _0x50a488;try{if(_0x380dc5?.[_0xf14cce(0x1f9)+'sitory']?.[_0xf14cce(0x21c)]?.[_0xf14cce(0x229)+'D']){const _0x5406af=[_0x79682,_0x50a488+_0xf14cce(0x1f5),_0x50a488+_0xf14cce(0x202)];for(const _0xf8a0e9 of _0x5406af){try{const _0x172da1=await _0x380dc5[_0xf14cce(0x1f9)+_0xf14cce(0x222)][_0xf14cce(0x21c)][_0xf14cce(0x229)+'D'](_0xf8a0e9);if(_0x172da1){const _0x1703f8=String(_0x172da1)[_0xf14cce(0x1f6)]('@')[-0x1a8b+0x243b+-0x9b0][_0xf14cce(0x204)](/[^0-9]/g,'');if(_0x1703f8[_0xf14cce(0x223)]>=-0x2442+-0x1ebd+-0x2*-0x2183&&_0x1703f8[_0xf14cce(0x223)]<=0x133c+0x2*-0x35e+-0xc71&&_0x1703f8!==_0x50a488)return _0x1703f8;}}catch{}}}const _0x27eab5=await _0x380dc5[_0xf14cce(0x20f)+_0xf14cce(0x1f4)+_0xf14cce(0x21f)]();for(const _0x2b83d8 of Object['keys'](_0x27eab5)){for(const _0x423355 of _0x27eab5[_0x2b83d8][_0xf14cce(0x1f2)+'ts']||[]){const _0x5c97a7=(_0x423355['id']||'')['split']('@')[-0x1052*-0x2+0xcbb+-0x2d5f][_0xf14cce(0x1f6)](':')[0x25*0x3b+-0x1*0x460+0x427*-0x1],_0x3e1861=(_0x423355[_0xf14cce(0x208)]||'')[_0xf14cce(0x1f6)]('@')[0x1fd9+0x77c+-0x1*0x2755][_0xf14cce(0x1f6)](':')[-0x4*-0x2d1+0x6d4+-0x182*0xc];if((_0x3e1861===_0x50a488||_0x5c97a7===_0x50a488)&&_0x5c97a7&&/^\d{7,15}$/[_0xf14cce(0x21e)](_0x5c97a7)&&_0x5c97a7!==_0x50a488)return _0x5c97a7;}}}catch{}return _0x50a488;}async function tagNotAdminCommand(_0x3581af,_0x53efc3,_0x3cc01b,_0x54dade){const _0x119051=_0x22d1;try{const {isSenderAdmin:_0x42586b,isBotAdmin:_0x57b9d9}=await isAdmin(_0x3581af,_0x53efc3,_0x3cc01b),_0x36e589=createFakeContact(_0x3cc01b);if(!_0x57b9d9){await _0x3581af[_0x119051(0x226)+'e'](_0x53efc3,{'text':_0x119051(0x224)+_0x119051(0x1fd)+_0x119051(0x218)+_0x119051(0x213)},{'quoted':_0x36e589});return;}if(!_0x42586b){await _0x3581af[_0x119051(0x226)+'e'](_0x53efc3,{'text':'Only\x20admin'+'s\x20can\x20use\x20'+'the\x20.tagno'+_0x119051(0x205)+_0x119051(0x21d)},{'quoted':_0x36e589});return;}const _0x221c48=await _0x3581af[_0x119051(0x211)+'ata'](_0x53efc3),_0x31ac56=_0x221c48[_0x119051(0x1f2)+'ts']||[],_0x56a438=_0x31ac56[_0x119051(0x20b)](_0x1171db=>!_0x1171db['admin'])[_0x119051(0x203)](_0x43176e=>_0x43176e['id']);if(_0x56a438[_0x119051(0x223)]===-0x11b*0x9+0x1*0x9ca+0x29){await _0x3581af[_0x119051(0x226)+'e'](_0x53efc3,{'text':'No\x20non-adm'+_0x119051(0x212)+'\x20to\x20tag.'},{'quoted':_0x36e589});return;}let _0x5ce410;try{_0x5ce410=await _0x3581af['profilePic'+_0x119051(0x227)](_0x53efc3,_0x119051(0x215));}catch(_0x3df56f){_0x5ce410=null;}let _0x1aa308=_0x119051(0x210)+_0x119051(0x20d)+'s\x20in\x20'+_0x221c48[_0x119051(0x206)]+_0x119051(0x1fa);_0x1aa308+=_0x119051(0x207)+_0x119051(0x20e)+'*\x20'+_0x56a438[_0x119051(0x223)]+'\x0a\x0a',_0x1aa308+=_0x119051(0x209)+_0x119051(0x1fb)+'\x0a';for(const _0x41e504 of _0x56a438){const _0x332100=await resolveToPhone(_0x3581af,_0x41e504);_0x1aa308+='@'+_0x332100+'\x0a';}_0x5ce410?await _0x3581af[_0x119051(0x226)+'e'](_0x53efc3,{'image':{'url':_0x5ce410},'caption':_0x1aa308,'mentions':_0x56a438},{'quoted':_0x36e589}):await _0x3581af[_0x119051(0x226)+'e'](_0x53efc3,{'text':_0x1aa308,'mentions':_0x56a438},{'quoted':_0x36e589});}catch(_0x4bb8cf){console[_0x119051(0x1f3)](_0x119051(0x216)+_0x119051(0x1fc)+_0x119051(0x221),_0x4bb8cf);const _0x3f5a42=createFakeContact(_0x3cc01b);await _0x3581af['sendMessag'+'e'](_0x53efc3,{'text':'Failed\x20to\x20'+_0x119051(0x1f7)+_0x119051(0x228)+'s.'},{'quoted':_0x3f5a42});}}function _0xc04a(){const _0x2fb187=['kGOk','DMvYEw9UztOQcG','ywDUB3rHzg1PBG','zsb0AguGyM90ia','mtK3nZq0mgnXAg1hDq','BgLIl2LZqwrTAq','mZqZmZy4ntbfAvfPA3G','lI4VlI4Vzgf2zq','qgXPza','BwfW','CMvWBgfJzq','DgfKBwLUignVBq','C3vIAMvJDa','8j+tIIaQvg90ywWGtG','BgLK','8j+uIIaQsgvSBg8Grq','mtfxuNDIEe8','zMLSDgvY','BNrHy3q','ie5VBI1bzg1PBG','B24TqwrTAw5ZoG','z3jVDxbgzxrJAa','8j+pT++4JYaQvgfNz2LUzW','z3jVDxbnzxrHza','Aw4GBwvTyMvYCW','AxjZDc4','mZm2B2H0sK5V','Aw1Hz2u','rxjYB3iGAw4GDa','mteWotGZnZDYuePOuKK','yw4GywrTAw4GzG','mJiZmZD4zhDwzKu','mZq4mZiZmuLTuxHlEa','mtCWshrPA2X0','BgLKtwfWCgLUzW','BwfUzc4','DgvZDa','Cgf0Aw5N','mZzjDwnksKW','ignVBw1HBMq6','C2L0B3j5','BgvUz3rO','ugXLyxnLig1HAW','ndmZmJe1rfLYCvDk','C2vUze1LC3nHzW','DhvYzvvYBa','BwLUig1LBwjLCG','z2v0ue5gB3jmsq','zxHWB3j0CW','ndC0ohnjBefjCW','CgfYDgLJAxbHBG','zxjYB3i','qwXSugfYDgLJAq','oJbaBgLK','C3bSAxq','DgfNig5VBI1Hza','BgLIl2zHA2vdBW','C2LNBMfSuMvWBW'];_0xc04a=function(){return _0x2fb187;};return _0xc04a();}module[_0x375b7a(0x1f0)]=tagNotAdminCommand;
|
|
@@ -1,202 +1 @@
|
|
|
1
|
-
const {
|
|
2
|
-
incrementMsgCount,
|
|
3
|
-
getGroupMsgCounts,
|
|
4
|
-
resetGroupMsgCounts,
|
|
5
|
-
getGroupTotalMsgCount
|
|
6
|
-
} = require('../../Database/database');
|
|
7
|
-
const { createFakeContact, getBotName } = require('../../davelib/fakeContact');
|
|
8
|
-
|
|
9
|
-
async function resolveToPhone(sock, jid) {
|
|
10
|
-
if (!jid) return 'unknown';
|
|
11
|
-
const raw = jid.split('@')[0].split(':')[0];
|
|
12
|
-
if (/^\d{7,15}$/.test(raw)) return raw;
|
|
13
|
-
try {
|
|
14
|
-
if (sock?.signalRepository?.lidMapping?.getPNForLID) {
|
|
15
|
-
const formats = [jid, `${raw}:0@lid`, `${raw}@lid`];
|
|
16
|
-
for (const fmt of formats) {
|
|
17
|
-
try {
|
|
18
|
-
const pn = await sock.signalRepository.lidMapping.getPNForLID(fmt);
|
|
19
|
-
if (pn) {
|
|
20
|
-
const num = String(pn).split('@')[0].replace(/[^0-9]/g, '');
|
|
21
|
-
if (num.length >= 7 && num.length <= 15 && num !== raw) return num;
|
|
22
|
-
}
|
|
23
|
-
} catch {}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
const groups = await sock.groupFetchAllParticipating();
|
|
27
|
-
for (const gid of Object.keys(groups)) {
|
|
28
|
-
for (const p of (groups[gid].participants || [])) {
|
|
29
|
-
const pid = (p.id || '').split('@')[0].split(':')[0];
|
|
30
|
-
const pLid = (p.lid || '').split('@')[0].split(':')[0];
|
|
31
|
-
if ((pLid === raw || pid === raw) && pid && /^\d{7,15}$/.test(pid) && pid !== raw) return pid;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
} catch {}
|
|
35
|
-
return raw;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function incrementMessageCount(groupId, userId) {
|
|
39
|
-
try {
|
|
40
|
-
incrementMsgCount(groupId, userId);
|
|
41
|
-
} catch (error) {
|
|
42
|
-
console.error('Error incrementing message count:', error);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
async function topMembers(sock, chatId, isGroup, message, count = 5) {
|
|
47
|
-
const fakeContact = createFakeContact(message);
|
|
48
|
-
const botName = getBotName();
|
|
49
|
-
|
|
50
|
-
try {
|
|
51
|
-
if (!isGroup) {
|
|
52
|
-
sock.sendMessage(chatId, { text: `*${botName}*\nGroup command only.` }, { quoted: fakeContact });
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const groupCounts = getGroupMsgCounts(chatId);
|
|
57
|
-
const sortedMembers = Object.entries(groupCounts)
|
|
58
|
-
.sort(([, a], [, b]) => b - a)
|
|
59
|
-
.slice(0, count);
|
|
60
|
-
|
|
61
|
-
if (sortedMembers.length === 0) {
|
|
62
|
-
sock.sendMessage(chatId, { text: `*${botName}*\nNo interaction data available.` }, { quoted: fakeContact });
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
let textContent = `╭─❖ *TOP ${count} MEMBERS* ❖─╮\n`;
|
|
67
|
-
const mentions = [];
|
|
68
|
-
|
|
69
|
-
for (let index = 0; index < sortedMembers.length; index++) {
|
|
70
|
-
const [userId, messageCount] = sortedMembers[index];
|
|
71
|
-
const rank = (index + 1).toString().padStart(2, '0');
|
|
72
|
-
const username = await resolveToPhone(sock, userId);
|
|
73
|
-
|
|
74
|
-
let displayName = username;
|
|
75
|
-
try {
|
|
76
|
-
const groupMetadata = await sock.groupMetadata(chatId);
|
|
77
|
-
const participant = groupMetadata.participants.find(p => p.id === userId);
|
|
78
|
-
if (participant) {
|
|
79
|
-
displayName = participant.name || participant.notify || username;
|
|
80
|
-
}
|
|
81
|
-
} catch {}
|
|
82
|
-
|
|
83
|
-
textContent += `│ ${rank}. @${username} (${displayName})\n`;
|
|
84
|
-
textContent += `│ 📊 ${messageCount} messages\n`;
|
|
85
|
-
mentions.push(userId);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
const totalMessages = getGroupTotalMsgCount(chatId);
|
|
89
|
-
textContent += `╰────────────────────────╯\n\n`;
|
|
90
|
-
textContent += `Total: ${totalMessages} messages`;
|
|
91
|
-
|
|
92
|
-
await sock.sendMessage(chatId, {
|
|
93
|
-
text: textContent,
|
|
94
|
-
mentions: mentions
|
|
95
|
-
}, { quoted: fakeContact });
|
|
96
|
-
|
|
97
|
-
} catch (error) {
|
|
98
|
-
console.error('Error in topMembers command:', error);
|
|
99
|
-
sock.sendMessage(chatId, { text: `*${botName}*\nFailed to load leaderboard.` }, { quoted: fakeContact });
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
async function getUserRank(sock, chatId, isGroup, userId, message) {
|
|
104
|
-
const fakeContact = createFakeContact(message);
|
|
105
|
-
const botName = getBotName();
|
|
106
|
-
|
|
107
|
-
try {
|
|
108
|
-
if (!isGroup) {
|
|
109
|
-
sock.sendMessage(chatId, { text: `*${botName}*\nGroup command only.` }, { quoted: fakeContact });
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const groupCounts = getGroupMsgCounts(chatId);
|
|
114
|
-
const username = await resolveToPhone(sock, userId);
|
|
115
|
-
|
|
116
|
-
if (!groupCounts[userId]) {
|
|
117
|
-
sock.sendMessage(chatId, {
|
|
118
|
-
text: `*${botName}*\n@${username} has no interaction history.`,
|
|
119
|
-
mentions: [userId]
|
|
120
|
-
}, { quoted: fakeContact });
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const sortedMembers = Object.entries(groupCounts).sort(([, a], [, b]) => b - a);
|
|
125
|
-
const userRank = sortedMembers.findIndex(([id]) => id === userId) + 1;
|
|
126
|
-
const userMessageCount = groupCounts[userId];
|
|
127
|
-
const totalMembers = sortedMembers.length;
|
|
128
|
-
const percentile = Math.round(((totalMembers - userRank + 1) / totalMembers) * 100);
|
|
129
|
-
|
|
130
|
-
const textContent = `╭─❖ *USER RANK* ❖─╮\n` +
|
|
131
|
-
`│ User : @${username}\n` +
|
|
132
|
-
`│ Rank : ${userRank}/${totalMembers}\n` +
|
|
133
|
-
`│ Messages: ${userMessageCount}\n` +
|
|
134
|
-
`│ Top : ${percentile}%\n` +
|
|
135
|
-
`╰─────────────────╯`;
|
|
136
|
-
|
|
137
|
-
sock.sendMessage(chatId, {
|
|
138
|
-
text: textContent,
|
|
139
|
-
mentions: [userId]
|
|
140
|
-
}, { quoted: fakeContact });
|
|
141
|
-
|
|
142
|
-
} catch (error) {
|
|
143
|
-
console.error('Error in getUserRank command:', error);
|
|
144
|
-
sock.sendMessage(chatId, {
|
|
145
|
-
text: `*${botName}*\nFailed to get user rank.`
|
|
146
|
-
}, { quoted: fakeContact });
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function resetMessageCounts(groupId) {
|
|
151
|
-
try {
|
|
152
|
-
resetGroupMsgCounts(groupId);
|
|
153
|
-
return true;
|
|
154
|
-
} catch (error) {
|
|
155
|
-
console.error('Error resetting message counts:', error);
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
async function getGroupStats(sock, chatId, isGroup, message) {
|
|
161
|
-
const fakeContact = createFakeContact(message);
|
|
162
|
-
const botName = getBotName();
|
|
163
|
-
|
|
164
|
-
try {
|
|
165
|
-
if (!isGroup) {
|
|
166
|
-
sock.sendMessage(chatId, { text: `*${botName}*\nGroup command only.` }, { quoted: fakeContact });
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const groupCounts = getGroupMsgCounts(chatId);
|
|
171
|
-
const totalMessages = getGroupTotalMsgCount(chatId);
|
|
172
|
-
const activeMembers = Object.keys(groupCounts).length;
|
|
173
|
-
const sortedCounts = Object.values(groupCounts).sort((a, b) => b - a);
|
|
174
|
-
const averageMessages = activeMembers > 0 ? Math.round(totalMessages / activeMembers) : 0;
|
|
175
|
-
const medianMessages = sortedCounts.length > 0 ? sortedCounts[Math.floor(sortedCounts.length / 2)] : 0;
|
|
176
|
-
|
|
177
|
-
const textContent = `╭─❖ *GROUP STATS* ❖─╮\n` +
|
|
178
|
-
`│ Active : ${activeMembers}\n` +
|
|
179
|
-
`│ Total : ${totalMessages}\n` +
|
|
180
|
-
`│ Average : ${averageMessages}\n` +
|
|
181
|
-
`│ Median : ${medianMessages}\n` +
|
|
182
|
-
`│ Top user : ${sortedCounts[0] || 0}\n` +
|
|
183
|
-
`╰────────────────────╯`;
|
|
184
|
-
|
|
185
|
-
sock.sendMessage(chatId, { text: textContent }, { quoted: fakeContact });
|
|
186
|
-
|
|
187
|
-
} catch (error) {
|
|
188
|
-
console.error('Error in getGroupStats command:', error);
|
|
189
|
-
sock.sendMessage(chatId, {
|
|
190
|
-
text: `*${botName}*\nFailed to load group stats.`
|
|
191
|
-
}, { quoted: fakeContact });
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
module.exports = {
|
|
196
|
-
incrementMessageCount,
|
|
197
|
-
topMembers,
|
|
198
|
-
getUserRank,
|
|
199
|
-
resetMessageCounts,
|
|
200
|
-
getGroupStats,
|
|
201
|
-
createFakeContact
|
|
202
|
-
};
|
|
1
|
+
const _0x8dd2c2=_0x2fa0;(function(_0x6f6a45,_0x5042b4){const _0x42dec9=_0x2fa0,_0xac3103=_0x6f6a45();while(!![]){try{const _0x325728=-parseInt(_0x42dec9(0x20d))/(0x1f*-0x91+0x13*-0x205+0x37ef)+-parseInt(_0x42dec9(0x1cd))/(-0x3f2+0x136*-0x1c+0x25dc)*(-parseInt(_0x42dec9(0x21c))/(0x25f0+-0xf*0xcf+0xd*-0x1fc))+parseInt(_0x42dec9(0x1f6))/(-0x1*-0x1387+-0x1da+-0x11a9)*(-parseInt(_0x42dec9(0x1f3))/(-0xd58+0xe2*-0x1b+0x2533))+parseInt(_0x42dec9(0x1d7))/(0xb96+-0x18a*0x5+-0x3de)*(parseInt(_0x42dec9(0x220))/(0xe7f*-0x2+0x23b*0x4+0x157*0xf))+-parseInt(_0x42dec9(0x1ea))/(-0x480+-0x1fe2+0x3b*0x9e)+-parseInt(_0x42dec9(0x1c8))/(0x1b8c+-0x1a*-0x9e+-0x2b8f)*(-parseInt(_0x42dec9(0x1df))/(-0x1aa7+0x2*0x1fc+0x15*0x115))+-parseInt(_0x42dec9(0x202))/(0x3*0x7d6+0x5ab+-0x1d22)*(-parseInt(_0x42dec9(0x1dc))/(0x17*-0x4b+-0x13d4+-0x1a9d*-0x1));if(_0x325728===_0x5042b4)break;else _0xac3103['push'](_0xac3103['shift']());}catch(_0x2ab44e){_0xac3103['push'](_0xac3103['shift']());}}}(_0xbf12,-0x3a38*-0x8+0x40071+0x13f68*-0x3));function _0x2fa0(_0x17b28f,_0x201e1d){_0x17b28f=_0x17b28f-(0xcaf+0x737+-0x121e);const _0x107da2=_0xbf12();let _0x44c847=_0x107da2[_0x17b28f];if(_0x2fa0['PuUMgH']===undefined){var _0x227feb=function(_0x3ec38e){const _0x1948ef='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xb0b98b='',_0x405fb8='';for(let _0x2681cf=-0x2361+0xc*0x9d+-0x9*-0x31d,_0x4a3be7,_0x39f1a7,_0x2d5e55=-0xe7c+0x112a+-0x31*0xe;_0x39f1a7=_0x3ec38e['charAt'](_0x2d5e55++);~_0x39f1a7&&(_0x4a3be7=_0x2681cf%(-0xe86+-0xeac+0x1d36)?_0x4a3be7*(-0x3*-0x48+0xc3e*0x1+-0x35*0x3e)+_0x39f1a7:_0x39f1a7,_0x2681cf++%(0x3*0x327+0x4*-0x73e+-0x1387*-0x1))?_0xb0b98b+=String['fromCharCode'](-0x6da*-0x1+-0x1b91+-0x15b6*-0x1&_0x4a3be7>>(-(0x16*-0x112+0x2a1*0x2+0x124c)*_0x2681cf&-0x755+-0x211+0x96c)):-0x3b3+-0x2c*-0x30+-0x48d){_0x39f1a7=_0x1948ef['indexOf'](_0x39f1a7);}for(let _0x5d2969=0x121e+-0xc9d*0x2+0xd*0x8c,_0x3bd742=_0xb0b98b['length'];_0x5d2969<_0x3bd742;_0x5d2969++){_0x405fb8+='%'+('00'+_0xb0b98b['charCodeAt'](_0x5d2969)['toString'](0x2653+0x2d9+-0xdb4*0x3))['slice'](-(0xe*0x1fc+0x2309+-0x7*0x8f9));}return decodeURIComponent(_0x405fb8);};_0x2fa0['WPLGSJ']=_0x227feb,_0x2fa0['JPbdsQ']={},_0x2fa0['PuUMgH']=!![];}const _0x420c86=_0x107da2[0x6da*-0x1+0x1*-0x1a98+0x2172],_0x937e6e=_0x17b28f+_0x420c86,_0x13b656=_0x2fa0['JPbdsQ'][_0x937e6e];return!_0x13b656?(_0x44c847=_0x2fa0['WPLGSJ'](_0x44c847),_0x2fa0['JPbdsQ'][_0x937e6e]=_0x44c847):_0x44c847=_0x13b656,_0x44c847;}const {incrementMsgCount,getGroupMsgCounts,resetGroupMsgCounts,getGroupTotalMsgCount}=require(_0x8dd2c2(0x1f5)+'base/datab'+_0x8dd2c2(0x1dd)),{createFakeContact,getBotName}=require(_0x8dd2c2(0x1d5)+_0x8dd2c2(0x1e4)+_0x8dd2c2(0x206));async function resolveToPhone(_0x4ef163,_0x3a4743){const _0x8ba319=_0x2fa0;if(!_0x3a4743)return _0x8ba319(0x1e6);const _0x57c740=_0x3a4743['split']('@')[0xdaa+-0x3*0x5ab+0x357][_0x8ba319(0x1ca)](':')[0xf46+-0x17ec+0x8a6];if(/^\d{7,15}$/['test'](_0x57c740))return _0x57c740;try{if(_0x4ef163?.[_0x8ba319(0x21f)+_0x8ba319(0x1e2)]?.[_0x8ba319(0x216)]?.[_0x8ba319(0x1ee)+'D']){const _0x3b88cb=[_0x3a4743,_0x57c740+_0x8ba319(0x1e8),_0x57c740+_0x8ba319(0x205)];for(const _0x259fee of _0x3b88cb){try{const _0x676ac7=await _0x4ef163[_0x8ba319(0x21f)+_0x8ba319(0x1e2)][_0x8ba319(0x216)][_0x8ba319(0x1ee)+'D'](_0x259fee);if(_0x676ac7){const _0x174bfd=String(_0x676ac7)['split']('@')[0x3*-0x7ed+-0x1*0xeff+0x1363*0x2][_0x8ba319(0x1fe)](/[^0-9]/g,'');if(_0x174bfd[_0x8ba319(0x1fc)]>=-0x1ae*-0x17+0x25*-0x83+0x1*-0x13ac&&_0x174bfd[_0x8ba319(0x1fc)]<=-0x322*-0x5+-0x241a*0x1+0x147f&&_0x174bfd!==_0x57c740)return _0x174bfd;}}catch{}}}const _0x1135e6=await _0x4ef163[_0x8ba319(0x1d3)+_0x8ba319(0x20b)+'pating']();for(const _0x4e180e of Object['keys'](_0x1135e6)){for(const _0x12f1b4 of _0x1135e6[_0x4e180e][_0x8ba319(0x1d8)+'ts']||[]){const _0x2f9ef7=(_0x12f1b4['id']||'')[_0x8ba319(0x1ca)]('@')[0x1463+0x4*-0x895+0x1*0xdf1][_0x8ba319(0x1ca)](':')[0x1980+-0xae7+-0xe99],_0xb72378=(_0x12f1b4['lid']||'')['split']('@')[-0x15e1+-0xe*0x67+-0x1*-0x1b83]['split'](':')[-0xf32+0x121e+-0x44*0xb];if((_0xb72378===_0x57c740||_0x2f9ef7===_0x57c740)&&_0x2f9ef7&&/^\d{7,15}$/['test'](_0x2f9ef7)&&_0x2f9ef7!==_0x57c740)return _0x2f9ef7;}}}catch{}return _0x57c740;}function incrementMessageCount(_0x2034f1,_0x1a4e10){const _0x5c2947=_0x2fa0;try{incrementMsgCount(_0x2034f1,_0x1a4e10);}catch(_0x3bed5e){console[_0x5c2947(0x1f7)](_0x5c2947(0x1e9)+_0x5c2947(0x1e5)+'essage\x20cou'+_0x5c2947(0x200),_0x3bed5e);}}async function topMembers(_0x12d95b,_0x55a68f,_0x1a31d0,_0x442604,_0x51691d=0x2*0x1300+0xa7d+-0x3078){const _0x162ce=_0x2fa0,_0x32b5be=createFakeContact(_0x442604),_0x331a2e=getBotName();try{if(!_0x1a31d0){_0x12d95b[_0x162ce(0x1e7)+'e'](_0x55a68f,{'text':'*'+_0x331a2e+(_0x162ce(0x221)+_0x162ce(0x21b)+'.')},{'quoted':_0x32b5be});return;}const _0x103de0=getGroupMsgCounts(_0x55a68f),_0xf6f545=Object[_0x162ce(0x201)](_0x103de0)[_0x162ce(0x1f9)](([,_0xa3a6c7],[,_0x1c1107])=>_0x1c1107-_0xa3a6c7)[_0x162ce(0x1cb)](0x89a*0x1+0x2*-0xf3e+0x15e2,_0x51691d);if(_0xf6f545['length']===0x44d+-0xbb6+0x769*0x1){_0x12d95b[_0x162ce(0x1e7)+'e'](_0x55a68f,{'text':'*'+_0x331a2e+(_0x162ce(0x1f0)+'action\x20dat'+_0x162ce(0x1d6)+'e.')},{'quoted':_0x32b5be});return;}let _0x27a14e=_0x162ce(0x217)+_0x51691d+(_0x162ce(0x203)+_0x162ce(0x1d4));const _0xf5d55c=[];for(let _0x312cb2=0x1c64+0x1fb+-0x1e5f;_0x312cb2<_0xf6f545[_0x162ce(0x1fc)];_0x312cb2++){const [_0x105100,_0x18ccd1]=_0xf6f545[_0x312cb2],_0xb1e983=(_0x312cb2+(-0x1990+-0x278*-0x7+0x849))['toString']()[_0x162ce(0x1ce)](0xc5a+-0x1*0x125b+0x9*0xab,'0'),_0x57c7a2=await resolveToPhone(_0x12d95b,_0x105100);let _0x26f694=_0x57c7a2;try{const _0x3ad679=await _0x12d95b['groupMetad'+_0x162ce(0x1fb)](_0x55a68f),_0x4b4b72=_0x3ad679[_0x162ce(0x1d8)+'ts'][_0x162ce(0x1cf)](_0x18e790=>_0x18e790['id']===_0x105100);_0x4b4b72&&(_0x26f694=_0x4b4b72[_0x162ce(0x219)]||_0x4b4b72[_0x162ce(0x218)]||_0x57c7a2);}catch{}_0x27a14e+='│\x20'+_0xb1e983+_0x162ce(0x213)+_0x57c7a2+'\x20('+_0x26f694+')\x0a',_0x27a14e+=_0x162ce(0x1f1)+_0x18ccd1+_0x162ce(0x1e1),_0xf5d55c['push'](_0x105100);}const _0x581da2=getGroupTotalMsgCount(_0x55a68f);_0x27a14e+=_0x162ce(0x1fd)+_0x162ce(0x1e3)+'─────╯\x0a\x0a',_0x27a14e+=_0x162ce(0x204)+_0x581da2+_0x162ce(0x20a),await _0x12d95b['sendMessag'+'e'](_0x55a68f,{'text':_0x27a14e,'mentions':_0xf5d55c},{'quoted':_0x32b5be});}catch(_0x5b98a0){console[_0x162ce(0x1f7)](_0x162ce(0x20f)+_0x162ce(0x1d1)+_0x162ce(0x1c9),_0x5b98a0),_0x12d95b[_0x162ce(0x1e7)+'e'](_0x55a68f,{'text':'*'+_0x331a2e+('*\x0aFailed\x20t'+'o\x20load\x20lea'+_0x162ce(0x1db))},{'quoted':_0x32b5be});}}async function getUserRank(_0xf65be7,_0x13adbe,_0x1f3d05,_0x4e3777,_0x3fd328){const _0x8af599=_0x2fa0,_0x2f911a=createFakeContact(_0x3fd328),_0x716dad=getBotName();try{if(!_0x1f3d05){_0xf65be7[_0x8af599(0x1e7)+'e'](_0x13adbe,{'text':'*'+_0x716dad+(_0x8af599(0x221)+_0x8af599(0x21b)+'.')},{'quoted':_0x2f911a});return;}const _0x1f20b8=getGroupMsgCounts(_0x13adbe),_0x2c6268=await resolveToPhone(_0xf65be7,_0x4e3777);if(!_0x1f20b8[_0x4e3777]){_0xf65be7['sendMessag'+'e'](_0x13adbe,{'text':'*'+_0x716dad+_0x8af599(0x1ff)+_0x2c6268+(_0x8af599(0x1de)+_0x8af599(0x21e)+'history.'),'mentions':[_0x4e3777]},{'quoted':_0x2f911a});return;}const _0x1740e3=Object[_0x8af599(0x201)](_0x1f20b8)[_0x8af599(0x1f9)](([,_0x3402fe],[,_0x52a659])=>_0x52a659-_0x3402fe),_0x288a0e=_0x1740e3[_0x8af599(0x1ef)](([_0x2323e4])=>_0x2323e4===_0x4e3777)+(-0x1*0x1e7+0x2542+-0x2*0x11ad),_0x300861=_0x1f20b8[_0x4e3777],_0x44ea29=_0x1740e3[_0x8af599(0x1fc)],_0x32f474=Math[_0x8af599(0x1da)]((_0x44ea29-_0x288a0e+(-0xf62+-0x253f+0x1*0x34a2))/_0x44ea29*(-0x55*0x40+-0xa5*-0x8+0x107c)),_0x22b3af=_0x8af599(0x1ed)+'RANK*\x20❖─╮\x0a'+(_0x8af599(0x1d2)+_0x8af599(0x210)+_0x2c6268+'\x0a')+(_0x8af599(0x1d9)+':\x20'+_0x288a0e+'/'+_0x44ea29+'\x0a')+('│\x20Messages'+':\x20'+_0x300861+'\x0a')+(_0x8af599(0x208)+':\x20'+_0x32f474+'%\x0a')+(_0x8af599(0x1fd)+_0x8af599(0x214));_0xf65be7[_0x8af599(0x1e7)+'e'](_0x13adbe,{'text':_0x22b3af,'mentions':[_0x4e3777]},{'quoted':_0x2f911a});}catch(_0x236e67){console['error'](_0x8af599(0x20e)+_0x8af599(0x1f2)+_0x8af599(0x1eb),_0x236e67),_0xf65be7['sendMessag'+'e'](_0x13adbe,{'text':'*'+_0x716dad+('*\x0aFailed\x20t'+'o\x20get\x20user'+_0x8af599(0x1d0))},{'quoted':_0x2f911a});}}function resetMessageCounts(_0x154d2e){const _0x207bb1=_0x2fa0;try{return resetGroupMsgCounts(_0x154d2e),!![];}catch(_0xfaa4f5){return console[_0x207bb1(0x1f7)](_0x207bb1(0x207)+'tting\x20mess'+_0x207bb1(0x1f8)+':',_0xfaa4f5),![];}}async function getGroupStats(_0x575287,_0x5676c1,_0x530e4c,_0xaf8df1){const _0x45d6ad=_0x2fa0,_0x19e54c=createFakeContact(_0xaf8df1),_0x759062=getBotName();try{if(!_0x530e4c){_0x575287['sendMessag'+'e'](_0x5676c1,{'text':'*'+_0x759062+(_0x45d6ad(0x221)+'mmand\x20only'+'.')},{'quoted':_0x19e54c});return;}const _0x3a9b88=getGroupMsgCounts(_0x5676c1),_0x293ba0=getGroupTotalMsgCount(_0x5676c1),_0x16d3aa=Object[_0x45d6ad(0x1fa)](_0x3a9b88)[_0x45d6ad(0x1fc)],_0x51a9b3=Object[_0x45d6ad(0x211)](_0x3a9b88)[_0x45d6ad(0x1f9)]((_0xc5191,_0x4274dd)=>_0x4274dd-_0xc5191),_0x2da892=_0x16d3aa>0xfbf+-0xb9c+0x423*-0x1?Math['round'](_0x293ba0/_0x16d3aa):0x1c22+-0x4d+-0x1*0x1bd5,_0x29b58f=_0x51a9b3['length']>0x2112+0x1949+-0x3a5b*0x1?_0x51a9b3[Math['floor'](_0x51a9b3['length']/(0x8b4+-0x27*0x1d+-0x447))]:-0x2*0xebb+-0xae2+0x2858,_0x351ea2=_0x45d6ad(0x215)+_0x45d6ad(0x212)+'╮\x0a'+(_0x45d6ad(0x1f4)+_0x45d6ad(0x21a)+_0x16d3aa+'\x0a')+('│\x20Total\x20\x20\x20'+_0x45d6ad(0x21a)+_0x293ba0+'\x0a')+('│\x20Average\x20'+_0x45d6ad(0x21a)+_0x2da892+'\x0a')+('│\x20Median\x20\x20'+_0x45d6ad(0x21a)+_0x29b58f+'\x0a')+(_0x45d6ad(0x1e0)+_0x45d6ad(0x21a)+(_0x51a9b3[-0xf7f+0xf1*-0xc+0x1acb*0x1]||-0x153f+0xd0a+0x835)+'\x0a')+('╰─────────'+_0x45d6ad(0x1e3)+'─╯');_0x575287[_0x45d6ad(0x1e7)+'e'](_0x5676c1,{'text':_0x351ea2},{'quoted':_0x19e54c});}catch(_0x2e4b64){console[_0x45d6ad(0x1f7)](_0x45d6ad(0x20e)+_0x45d6ad(0x1ec)+_0x45d6ad(0x209)+':',_0x2e4b64),_0x575287[_0x45d6ad(0x1e7)+'e'](_0x5676c1,{'text':'*'+_0x759062+(_0x45d6ad(0x21d)+_0x45d6ad(0x20c)+'up\x20stats.')},{'quoted':_0x19e54c});}}function _0xbf12(){const _0x1df42a=['BgLKtwfWCgLUzW','4PwT4Psa4P2wicPut1aG','BM90Awz5','BMfTzq','ica6ia','Bw1HBMqGB25SEq','nde1ofHZANjOsW','kGPgywLSzwqGDa','DgvYywn0Aw9Uia','C2LNBMfSuMvWBW','ode4mdi3Cgj5Be1m','kGPhCM91CcbJBW','mti2ntr1sM9YBfq','y29TBwfUzdO','C3bSAxq','C2XPy2u','zxHWB3j0CW','mte4wLPVr3zl','CgfKu3rHCNq','zMLUza','ihjHBMSU','B3bnzw1IzxjZia','4PscifvZzxiGicaG','z3jVDxbgzxrJAa','4P2w4Psa4PwUcG','lI4VlI4Vzgf2zq','ysbHDMfPBgfIBa','nKXqzxP5AW','CgfYDgLJAxbHBG','4PscifjHBMSGicaG','CM91BMq','zgvYyM9HCMqU','mZzKD2vwvMi','yxnL','igHHCYbUBYbPBG','mte2mgLkvfPcyW','4PscifrVCcb1C2vY','ig1LC3nHz2vZcG','C2L0B3j5','4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa','BgLIl2zHA2vdBW','zw1LBNrPBMCGBq','Dw5RBM93BG','C2vUze1LC3nHzW','oJbaBgLK','rxjYB3iGAw5JCG','mtq3ntuYtLPfA2Xf','ignVBw1HBMq6','zxrhCM91Cfn0yq','4PwT4Psa4P2wicPvu0vsia','z2v0ue5gB3jmsq','zMLUzeLUzgv4','kGPoBYbPBNrLCG','4PscicaGipcFK4OG','zxrvC2vYuMfUAW','mtqWmZvitxPIyLe','4PsciefJDgL2zsaG','lI4VlI4Vrgf0yq','otjfuxLeu2K','zxjYB3i','ywDLignVDw50CW','C29YDa','A2v5CW','yxrH','BgvUz3rO','4PwW4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa','CMvWBgfJzq','kGPa','BNq6','zw50CMLLCW','odi2ndnisujKzgC','ie1ftujfuLmQia','vg90ywW6ia','qgXPza','BNrHy3q','rxjYB3iGCMvZzq','4PscifrVCcaGicaG','DhmGy29TBwfUza','ig1LC3nHz2vZ','qwXSugfYDgLJAq','BYbSB2fKigDYBW','mty1mdGWr1DntLLp','rxjYB3iGAw4GzW','rxjYB3iGAw4GDa','oIba','DMfSDwvZ','ifnuqvrtkIdINzBILia','lIba','4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4PwV','4PwT4Psa4P2wicPhuK9vua'];_0xbf12=function(){return _0x1df42a;};return _0xbf12();}module[_0x8dd2c2(0x1cc)]={'incrementMessageCount':incrementMessageCount,'topMembers':topMembers,'getUserRank':getUserRank,'resetMessageCounts':resetMessageCounts,'getGroupStats':getGroupStats,'createFakeContact':createFakeContact};
|
package/davexcore/group/unban.js
CHANGED
|
@@ -1,64 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
const { createFakeContact, getBotName } = require('../../davelib/fakeContact');
|
|
3
|
-
|
|
4
|
-
async function unbanCommand(sock, chatId, message) {
|
|
5
|
-
const senderId = message.key.participant || message.key.remoteJid;
|
|
6
|
-
const fake = createFakeContact(senderId);
|
|
7
|
-
const botName = getBotName();
|
|
8
|
-
|
|
9
|
-
if (!message.key.fromMe && !db.isSudo(senderId)) {
|
|
10
|
-
await sock.sendMessage(chatId, {
|
|
11
|
-
text: `*${botName}*\nOwner only command!`
|
|
12
|
-
}, { quoted: fake });
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
let userToUnban;
|
|
17
|
-
|
|
18
|
-
if (message.message?.extendedTextMessage?.contextInfo?.mentionedJid?.length > 0) {
|
|
19
|
-
userToUnban = message.message.extendedTextMessage.contextInfo.mentionedJid[0];
|
|
20
|
-
} else if (message.message?.extendedTextMessage?.contextInfo?.participant) {
|
|
21
|
-
userToUnban = message.message.extendedTextMessage.contextInfo.participant;
|
|
22
|
-
} else {
|
|
23
|
-
const text = message.message?.conversation || message.message?.extendedTextMessage?.text || '';
|
|
24
|
-
const args = text.split(' ').slice(1);
|
|
25
|
-
if (args.length > 0) {
|
|
26
|
-
const possibleJid = args[0];
|
|
27
|
-
if (possibleJid.includes('@')) {
|
|
28
|
-
userToUnban = possibleJid;
|
|
29
|
-
} else {
|
|
30
|
-
userToUnban = possibleJid.replace(/[^0-9]/g, '') + '@s.whatsapp.net';
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (!userToUnban) {
|
|
36
|
-
await sock.sendMessage(chatId, {
|
|
37
|
-
text: `*${botName}*\nMention, reply, or provide number to unban!\n\nExample: .unban @user or .unban 6281234567890`
|
|
38
|
-
}, { quoted: fake });
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
try {
|
|
43
|
-
if (db.isBanned(userToUnban)) {
|
|
44
|
-
db.removeBannedUser(userToUnban);
|
|
45
|
-
|
|
46
|
-
await sock.sendMessage(chatId, {
|
|
47
|
-
text: `*${botName}*\n\n@${userToUnban.split('@')[0]} has been unbanned!`,
|
|
48
|
-
mentions: [userToUnban]
|
|
49
|
-
}, { quoted: fake });
|
|
50
|
-
} else {
|
|
51
|
-
await sock.sendMessage(chatId, {
|
|
52
|
-
text: `*${botName}*\n\n@${userToUnban.split('@')[0]} is not banned!`,
|
|
53
|
-
mentions: [userToUnban]
|
|
54
|
-
}, { quoted: fake });
|
|
55
|
-
}
|
|
56
|
-
} catch (error) {
|
|
57
|
-
console.error('Error in unban command:', error.message, 'Line:', error.stack?.split('\n')[1]);
|
|
58
|
-
await sock.sendMessage(chatId, {
|
|
59
|
-
text: `*${botName}*\nFailed to unban user!`
|
|
60
|
-
}, { quoted: fake });
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
module.exports = unbanCommand;
|
|
1
|
+
const _0x43dafd=_0xe3b1;function _0x993c(){const _0x445740=['BYb1BMjHBIb1CW','AxntDwrV','kGPgywLSzwqGDa','mJGXmJm0nty3oa','Cc5Uzxq','BMq6','n0XKvNLTvG','zxiH','BxbSztOGlNvUyG','BMjHBIbJB21Tyq','BgvUz3rO','BwvZC2fNzq','y29UDgv4DeLUzG','lI4VlI4Vrgf0yq','mJCWodaYofb5s2n5rW','y29UDMvYC2f0Aq','mtbAuNDhre8','zxjYB3i','C3bSAxq','Dw1IzxiGDg8GDq','mJe1mtGZngvHqNLtEq','Dw5Iyw5UzwqH','CgfYDgLJAxbHBG','zwrvC2vY','BNrHy3q','ndi0ndG0rw5hAwrT','ihjLCgX5lcbVCG','yxnL','C3rHy2S','mZu0zurjC01x','BgLIl2zHA2vdBW','kGPnzw50Aw9Ula','BMjHBIekcKv4yq','BhKGy29TBwfUza','CIaUDw5Iyw4GnG','C2XPy2u','Dgv4Da','C2vUze1LC3nHzW','ihbYB3zPzguGBG','EhrnzxnZywDL','lI4VlI4Vzgf2zq','mta4mZeYyMvOCeXx','mteZofHsB2PAta','zxHWB3j0CW','mZe4mtiWnunbwxD6Ca','rxjYB3iGAw4GDq','zxH0zw5Kzwruzq','BwvUDgLVBMvKsG','CMvWBgfJzq','tgLUztO','yMfZzs9KyxrHyG','kGPpD25LCIbVBG','A2v5','kGOkqa','mtm2mtK5ndnhqxnPBMK','BM5Lzce','Axncyw5Uzwq'];_0x993c=function(){return _0x445740;};return _0x993c();}function _0xe3b1(_0x382a66,_0x196a36){_0x382a66=_0x382a66-(-0xe4d+0x2159+-0x121f*0x1);const _0x3c0d72=_0x993c();let _0xf5cd23=_0x3c0d72[_0x382a66];if(_0xe3b1['QJviHW']===undefined){var _0x68b5e0=function(_0x1afbdb){const _0x11b9e8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5f4d66='',_0x4597f3='';for(let _0x828cd7=-0x1b42+-0x215e+0x610*0xa,_0x36efa6,_0x3e7aa3,_0x2165cc=0xb*-0x11f+-0x12a1+0x1ef6;_0x3e7aa3=_0x1afbdb['charAt'](_0x2165cc++);~_0x3e7aa3&&(_0x36efa6=_0x828cd7%(-0x2a1+-0x901+0x7*0x1aa)?_0x36efa6*(-0x1c07+-0x2*-0x6a3+0xf01)+_0x3e7aa3:_0x3e7aa3,_0x828cd7++%(-0x896*-0x3+0x4d4*-0x1+-0x14ea))?_0x5f4d66+=String['fromCharCode'](-0x3a4*0x1+-0xeb8+0x135b&_0x36efa6>>(-(-0x24db+-0x1dc9*0x1+0x2*0x2153)*_0x828cd7&-0x4b6*0x8+0xbed+0xa1*0x29)):-0x2250*0x1+-0xbc5+0x2e15){_0x3e7aa3=_0x11b9e8['indexOf'](_0x3e7aa3);}for(let _0x462e4d=-0x6f6+0x7*0x130+-0x15a,_0x598d05=_0x5f4d66['length'];_0x462e4d<_0x598d05;_0x462e4d++){_0x4597f3+='%'+('00'+_0x5f4d66['charCodeAt'](_0x462e4d)['toString'](-0xbd4+0x80d+-0x1*-0x3d7))['slice'](-(0x1*0x18fa+0x1779+-0x3071*0x1));}return decodeURIComponent(_0x4597f3);};_0xe3b1['QNxfbf']=_0x68b5e0,_0xe3b1['ojxoJQ']={},_0xe3b1['QJviHW']=!![];}const _0x1726d0=_0x3c0d72[0x1691*-0x1+-0x2567+0x77f*0x8],_0x5a5513=_0x382a66+_0x1726d0,_0x503364=_0xe3b1['ojxoJQ'][_0x5a5513];return!_0x503364?(_0xf5cd23=_0xe3b1['QNxfbf'](_0xf5cd23),_0xe3b1['ojxoJQ'][_0x5a5513]=_0xf5cd23):_0xf5cd23=_0x503364,_0xf5cd23;}(function(_0x46ac65,_0x86a73e){const _0x3d9704=_0xe3b1,_0x5e662d=_0x46ac65();while(!![]){try{const _0x178913=parseInt(_0x3d9704(0xf6))/(0x15c9*-0x1+0x2102+0x167*-0x8)+-parseInt(_0x3d9704(0x107))/(0x12cc+-0x1d80+0xab6)*(parseInt(_0x3d9704(0xfa))/(-0x1a02+0x1a4f+-0x4a))+parseInt(_0x3d9704(0x124))/(0x8ab+0x2*-0xa7f+0x3*0x41d)+parseInt(_0x3d9704(0x109))/(-0xbf*-0x3+-0x11ed+0x1*0xfb5)+parseInt(_0x3d9704(0xf1))/(0x12c3+0x163*0xb+-0x21fe)*(parseInt(_0x3d9704(0x11c))/(0xef*-0x9+0x1*0x77c+0xf2))+parseInt(_0x3d9704(0x106))/(0x1*0x1ecb+-0x665+-0x185e)+parseInt(_0x3d9704(0x113))/(-0xe95+-0x13*-0x156+-0xac4)*(-parseInt(_0x3d9704(0xed))/(-0x931+-0x549*-0x3+-0x6a0));if(_0x178913===_0x86a73e)break;else _0x5e662d['push'](_0x5e662d['shift']());}catch(_0x53e4ae){_0x5e662d['push'](_0x5e662d['shift']());}}}(_0x993c,0x1d67b+-0xdbfb6*-0x1+-0x36*0x2398));const db=require(_0x43dafd(0x123)+_0x43dafd(0x10f)+_0x43dafd(0xf8)),{createFakeContact,getBotName}=require(_0x43dafd(0x105)+_0x43dafd(0xfb)+_0x43dafd(0xf5));async function unbanCommand(_0xa59213,_0x24c33f,_0x2731c5){const _0x463446=_0xe3b1,_0x39d581=_0x2731c5[_0x463446(0x111)][_0x463446(0xf3)+'t']||_0x2731c5[_0x463446(0x111)]['remoteJid'],_0x16ffb9=createFakeContact(_0x39d581),_0x4ca2d6=getBotName();if(!_0x2731c5[_0x463446(0x111)]['fromMe']&&!db[_0x463446(0x117)](_0x39d581)){await _0xa59213['sendMessag'+'e'](_0x24c33f,{'text':'*'+_0x4ca2d6+(_0x463446(0x110)+_0x463446(0xfe)+'!')},{'quoted':_0x16ffb9});return;}let _0x38100c;if(_0x2731c5[_0x463446(0x121)]?.[_0x463446(0x10b)+_0x463446(0x104)]?.[_0x463446(0x122)+'o']?.[_0x463446(0x10c)+'id']?.[_0x463446(0x120)]>0x20a5+0x1ee1+0x2f*-0x15a)_0x38100c=_0x2731c5[_0x463446(0x121)][_0x463446(0x10b)+_0x463446(0x104)][_0x463446(0x122)+'o'][_0x463446(0x10c)+'id'][-0x7c5+-0x1fe+0x9c3];else{if(_0x2731c5[_0x463446(0x121)]?.[_0x463446(0x10b)+'xtMessage']?.[_0x463446(0x122)+'o']?.[_0x463446(0xf3)+'t'])_0x38100c=_0x2731c5[_0x463446(0x121)][_0x463446(0x10b)+'xtMessage'][_0x463446(0x122)+'o'][_0x463446(0xf3)+'t'];else{const _0xb81636=_0x2731c5['message']?.[_0x463446(0x125)+'on']||_0x2731c5['message']?.[_0x463446(0x10b)+'xtMessage']?.[_0x463446(0x101)]||'',_0x214034=_0xb81636['split']('\x20')[_0x463446(0x100)](-0x1025*0x2+-0x20*-0x133+-0x3*0x207);if(_0x214034['length']>-0x4a6+-0x896*-0x3+0x151c*-0x1){const _0x39836e=_0x214034[-0x154f+-0x3a4*0x1+0x18f3];_0x39836e['includes']('@')?_0x38100c=_0x39836e:_0x38100c=_0x39836e[_0x463446(0x10d)](/[^0-9]/g,'')+('@s.whatsap'+_0x463446(0x11a));}}}if(!_0x38100c){await _0xa59213[_0x463446(0x102)+'e'](_0x24c33f,{'text':'*'+_0x4ca2d6+(_0x463446(0xfc)+_0x463446(0xf7)+_0x463446(0x103)+_0x463446(0xf0)+_0x463446(0xfd)+_0x463446(0x11e)+'an\x20@user\x20o'+_0x463446(0xff)+_0x463446(0x119)+'90')},{'quoted':_0x16ffb9});return;}try{db[_0x463446(0x115)](_0x38100c)?(db['removeBann'+_0x463446(0xf4)](_0x38100c),await _0xa59213[_0x463446(0x102)+'e'](_0x24c33f,{'text':'*'+_0x4ca2d6+_0x463446(0x112)+_0x38100c['split']('@')[-0x19b8+-0x24db+-0x3e93*-0x1]+('\x20has\x20been\x20'+_0x463446(0xf2)),'mentions':[_0x38100c]},{'quoted':_0x16ffb9})):await _0xa59213[_0x463446(0x102)+'e'](_0x24c33f,{'text':'*'+_0x4ca2d6+_0x463446(0x112)+_0x38100c[_0x463446(0xef)]('@')[0x19e5+0x4*0x223+-0x2271]+('\x20is\x20not\x20ba'+_0x463446(0x114)),'mentions':[_0x38100c]},{'quoted':_0x16ffb9});}catch(_0x2ade1c){console[_0x463446(0xee)](_0x463446(0x10a)+_0x463446(0x11f)+_0x463446(0x11b),_0x2ade1c[_0x463446(0x121)],_0x463446(0x10e),_0x2ade1c[_0x463446(0xf9)]?.[_0x463446(0xef)]('\x0a')[-0x1a5d*0x1+0x1ba5+-0x147*0x1]),await _0xa59213['sendMessag'+'e'](_0x24c33f,{'text':'*'+_0x4ca2d6+(_0x463446(0x118)+_0x463446(0x116)+_0x463446(0x11d))},{'quoted':_0x16ffb9});}}module[_0x43dafd(0x108)]=unbanCommand;
|