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.
- 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,352 +1 @@
|
|
|
1
|
-
const { getGroupConfig, setGroupConfig } = require('../../Database/settingsStore');
|
|
2
|
-
const db = require('../../Database/database');
|
|
3
|
-
const isAdmin = require('../../davelib/isAdmin');
|
|
4
|
-
const { createFakeContact, getBotName } = require('../../davelib/fakeContact');
|
|
5
|
-
const { getPrefix } = require('../owner/setprefix');
|
|
6
|
-
|
|
7
|
-
function normalizeJid(jid) {
|
|
8
|
-
if (!jid) return '';
|
|
9
|
-
const str = typeof jid === 'string' ? jid : (jid.id || jid.toString());
|
|
10
|
-
const num = str.split('@')[0].split(':')[0];
|
|
11
|
-
return num + '@s.whatsapp.net';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async function resolveToPhone(sock, jid) {
|
|
15
|
-
if (!jid) return 'unknown';
|
|
16
|
-
const raw = jid.split('@')[0].split(':')[0];
|
|
17
|
-
if (/^\d{7,15}$/.test(raw)) return raw;
|
|
18
|
-
try {
|
|
19
|
-
if (sock?.signalRepository?.lidMapping?.getPNForLID) {
|
|
20
|
-
const formats = [jid, `${raw}:0@lid`, `${raw}@lid`];
|
|
21
|
-
for (const fmt of formats) {
|
|
22
|
-
try {
|
|
23
|
-
const pn = await sock.signalRepository.lidMapping.getPNForLID(fmt);
|
|
24
|
-
if (pn) {
|
|
25
|
-
const num = String(pn).split('@')[0].replace(/[^0-9]/g, '');
|
|
26
|
-
if (num.length >= 7 && num.length <= 15 && num !== raw) return num;
|
|
27
|
-
}
|
|
28
|
-
} catch {}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
const groups = await sock.groupFetchAllParticipating();
|
|
32
|
-
for (const gid of Object.keys(groups)) {
|
|
33
|
-
for (const p of (groups[gid].participants || [])) {
|
|
34
|
-
const pid = (p.id || '').split('@')[0].split(':')[0];
|
|
35
|
-
const pLid = (p.lid || '').split('@')[0].split(':')[0];
|
|
36
|
-
if ((pLid === raw || pid === raw) && pid && /^\d{7,15}$/.test(pid) && pid !== raw) return pid;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
} catch {}
|
|
40
|
-
return raw;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
async function handleAntidemote(sock, groupId, participants, author) {
|
|
44
|
-
try {
|
|
45
|
-
const config = getGroupConfig(groupId, 'antidemote');
|
|
46
|
-
if (!config || !config.enabled) return false;
|
|
47
|
-
|
|
48
|
-
const botName = getBotName();
|
|
49
|
-
const fake = createFakeContact();
|
|
50
|
-
const botJid = normalizeJid(sock.user?.id);
|
|
51
|
-
|
|
52
|
-
let groupMetadata;
|
|
53
|
-
try {
|
|
54
|
-
groupMetadata = await sock.groupMetadata(groupId);
|
|
55
|
-
} catch (metaErr) {
|
|
56
|
-
console.error('Antidemote: Failed to fetch group metadata:', metaErr.message);
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const ownerJid = normalizeJid(groupMetadata.owner);
|
|
61
|
-
const normalizedAuthor = normalizeJid(author);
|
|
62
|
-
const isAuthorOwner = normalizedAuthor === ownerJid ||
|
|
63
|
-
(author && groupMetadata.owner && author === groupMetadata.owner);
|
|
64
|
-
|
|
65
|
-
const isAuthorSudo = db.isSudo(author) || db.isSudo(normalizedAuthor);
|
|
66
|
-
|
|
67
|
-
if (isAuthorOwner || isAuthorSudo) {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Bot's own actions should not trigger antidemote
|
|
72
|
-
const authorNum = author?.split('@')[0]?.split(':')[0];
|
|
73
|
-
const botNum = sock.user?.id?.split(':')[0]?.split('@')[0];
|
|
74
|
-
const botLidNum = sock.user?.lid?.split(':')[0]?.split('@')[0];
|
|
75
|
-
if (authorNum === botNum || (botLidNum && authorNum === botLidNum)) {
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const participantJids = participants.map(p => typeof p === 'string' ? p : (p.id || String(p)));
|
|
80
|
-
const mode = config.mode || 'revert';
|
|
81
|
-
|
|
82
|
-
const botLid = sock.user?.lid;
|
|
83
|
-
const botLidNorm = botLid ? normalizeJid(botLid) : null;
|
|
84
|
-
const isBotDemoted = participantJids.some(p => {
|
|
85
|
-
const norm = normalizeJid(p);
|
|
86
|
-
if (norm === botJid) return true;
|
|
87
|
-
if (botLidNorm && norm === botLidNorm) return true;
|
|
88
|
-
const pNum = p.split('@')[0].split(':')[0];
|
|
89
|
-
if (pNum === botNum) return true;
|
|
90
|
-
if (botLidNum && pNum === botLidNum) return true;
|
|
91
|
-
return false;
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
const botParticipant = groupMetadata.participants.find(p => {
|
|
95
|
-
if (normalizeJid(p.id) === botJid || p.id === botJid) return true;
|
|
96
|
-
if (botLidNorm && (normalizeJid(p.id) === botLidNorm || p.id === botLid)) return true;
|
|
97
|
-
const pNum = (p.id || '').split('@')[0].split(':')[0];
|
|
98
|
-
if (pNum === botNum) return true;
|
|
99
|
-
if (botLidNum && pNum === botLidNum) return true;
|
|
100
|
-
return false;
|
|
101
|
-
});
|
|
102
|
-
// Fallback: if bot not found in participant list, assume it's still admin
|
|
103
|
-
const isBotAdmin = !botParticipant || botParticipant.admin === 'admin' || botParticipant.admin === 'superadmin';
|
|
104
|
-
|
|
105
|
-
// If the BOT itself was demoted, alert owner immediately regardless of current admin state
|
|
106
|
-
if (isBotDemoted) {
|
|
107
|
-
const authorNumber = await resolveToPhone(sock, author);
|
|
108
|
-
let groupName = '';
|
|
109
|
-
try { groupName = groupMetadata.subject || groupId; } catch {}
|
|
110
|
-
const ownerNumber = sock.user.id.split(':')[0] + '@s.whatsapp.net';
|
|
111
|
-
// Alert owner in DM
|
|
112
|
-
try {
|
|
113
|
-
await sock.sendMessage(ownerNumber, {
|
|
114
|
-
text: `⚠️ *${botName} - BOT DEMOTED*\n\n*Group:* ${groupName}\n*Demoted by:* @${authorNumber}\n\nAntidemote cannot protect the group until you re-promote me!\nRe-add me as admin to restore protection.`,
|
|
115
|
-
mentions: [author]
|
|
116
|
-
});
|
|
117
|
-
} catch {}
|
|
118
|
-
// Warn in the group
|
|
119
|
-
await sock.sendMessage(groupId, {
|
|
120
|
-
text: `┌─ *${botName}* ─┐\n│\n│ ⚠️ I was demoted by @${authorNumber}!\n│ I can no longer protect this group.\n│ Owner has been notified.\n│\n└─────────────┘`,
|
|
121
|
-
mentions: [author]
|
|
122
|
-
}, { quoted: fake });
|
|
123
|
-
return false;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (!isBotAdmin) {
|
|
127
|
-
await sock.sendMessage(groupId, {
|
|
128
|
-
text: `┌─ *${botName}* ─┐\n│\n│ Cannot reverse demotion - bot needs admin!\n│\n└─────────────┘`
|
|
129
|
-
}, { quoted: fake });
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const authorNumber = await resolveToPhone(sock, author);
|
|
134
|
-
const targetNumber = await resolveToPhone(sock, participantJids[0]);
|
|
135
|
-
|
|
136
|
-
try {
|
|
137
|
-
await sock.groupParticipantsUpdate(groupId, participantJids, "promote");
|
|
138
|
-
console.log(`[ANTIDEMOTE] Reverted demotion of ${targetNumber} in ${groupId}`);
|
|
139
|
-
} catch (promoteErr) {
|
|
140
|
-
console.log('[ANTIDEMOTE] Promote call returned:', promoteErr.message, '(action may still have succeeded)');
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (mode === 'kick') {
|
|
144
|
-
try {
|
|
145
|
-
await sock.groupParticipantsUpdate(groupId, [author], "remove");
|
|
146
|
-
} catch (e) {}
|
|
147
|
-
await sock.sendMessage(groupId, {
|
|
148
|
-
text: `┌─ *${botName}* ─┐
|
|
149
|
-
│
|
|
150
|
-
│ @${authorNumber} tried to demote @${targetNumber}
|
|
151
|
-
│ Demotion reverted & offender kicked!
|
|
152
|
-
│
|
|
153
|
-
└─────────────┘`,
|
|
154
|
-
mentions: [author, ...participantJids]
|
|
155
|
-
}, { quoted: fake });
|
|
156
|
-
} else if (mode === 'warn') {
|
|
157
|
-
const maxWarnings = config.maxWarnings || 3;
|
|
158
|
-
const warningCount = db.incrementWarning(groupId, author);
|
|
159
|
-
if (warningCount >= maxWarnings) {
|
|
160
|
-
try {
|
|
161
|
-
await sock.groupParticipantsUpdate(groupId, [author], "remove");
|
|
162
|
-
} catch (e) {}
|
|
163
|
-
db.resetWarning(groupId, author);
|
|
164
|
-
await sock.sendMessage(groupId, {
|
|
165
|
-
text: `┌─ *${botName}* ─┐
|
|
166
|
-
│
|
|
167
|
-
│ @${authorNumber} tried to demote @${targetNumber}
|
|
168
|
-
│ Demotion reverted & kicked after ${maxWarnings} warnings!
|
|
169
|
-
│
|
|
170
|
-
└─────────────┘`,
|
|
171
|
-
mentions: [author, ...participantJids]
|
|
172
|
-
}, { quoted: fake });
|
|
173
|
-
} else {
|
|
174
|
-
await sock.sendMessage(groupId, {
|
|
175
|
-
text: `┌─ *${botName}* ─┐
|
|
176
|
-
│
|
|
177
|
-
│ @${authorNumber} tried to demote @${targetNumber}
|
|
178
|
-
│ Demotion reverted! Warning ${warningCount}/${maxWarnings}
|
|
179
|
-
│
|
|
180
|
-
└─────────────┘`,
|
|
181
|
-
mentions: [author, ...participantJids]
|
|
182
|
-
}, { quoted: fake });
|
|
183
|
-
}
|
|
184
|
-
} else {
|
|
185
|
-
try {
|
|
186
|
-
await sock.groupParticipantsUpdate(groupId, [author], "demote");
|
|
187
|
-
} catch (e) {}
|
|
188
|
-
await sock.sendMessage(groupId, {
|
|
189
|
-
text: `┌─ *${botName}* ─┐
|
|
190
|
-
│
|
|
191
|
-
│ @${authorNumber} tried to demote @${targetNumber}
|
|
192
|
-
│ Demotion reverted & offender demoted!
|
|
193
|
-
│
|
|
194
|
-
└─────────────┘`,
|
|
195
|
-
mentions: [author, ...participantJids]
|
|
196
|
-
}, { quoted: fake });
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
return true;
|
|
200
|
-
} catch (error) {
|
|
201
|
-
console.error('Error in handleAntidemote:', error.message, 'Line:', error.stack?.split('\n')[1]);
|
|
202
|
-
return false;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
async function antidemoteCommand(sock, chatId, message, senderId) {
|
|
207
|
-
try {
|
|
208
|
-
const fake = createFakeContact(senderId);
|
|
209
|
-
const botName = getBotName();
|
|
210
|
-
const prefix = getPrefix();
|
|
211
|
-
|
|
212
|
-
const userMessage = message.message?.conversation ||
|
|
213
|
-
message.message?.extendedTextMessage?.text || '';
|
|
214
|
-
const args = userMessage.split(' ');
|
|
215
|
-
const subCmd = args[1]?.toLowerCase();
|
|
216
|
-
|
|
217
|
-
if (!chatId.endsWith('@g.us')) {
|
|
218
|
-
await sock.sendMessage(chatId, {
|
|
219
|
-
text: `┌─ *${botName}* ─┐\n│\n│ Group command only!\n│\n└─────────────┘`
|
|
220
|
-
}, { quoted: fake });
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
const adminStatus = await isAdmin(sock, chatId, senderId);
|
|
225
|
-
const isSenderAdmin = adminStatus.isSenderAdmin;
|
|
226
|
-
const isBotAdmin = adminStatus.isBotAdmin;
|
|
227
|
-
|
|
228
|
-
if (!isBotAdmin) {
|
|
229
|
-
await sock.sendMessage(chatId, {
|
|
230
|
-
text: `┌─ *${botName}* ─┐\n│\n│ Bot needs to be admin!\n│\n└─────────────┘`
|
|
231
|
-
}, { quoted: fake });
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
if (!isSenderAdmin && !message.key.fromMe && !db.isSudo(senderId)) {
|
|
236
|
-
await sock.sendMessage(chatId, {
|
|
237
|
-
text: `┌─ *${botName}* ─┐\n│\n│ Admin only command!\n│\n└─────────────┘`
|
|
238
|
-
}, { quoted: fake });
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
const config = getGroupConfig(chatId, 'antidemote') || { enabled: false, mode: 'revert' };
|
|
243
|
-
|
|
244
|
-
if (!subCmd || subCmd === 'help') {
|
|
245
|
-
await sock.sendMessage(chatId, {
|
|
246
|
-
text: `┌─ *${botName}* ─┐
|
|
247
|
-
│
|
|
248
|
-
│ Status: ${config.enabled ? 'ON' : 'OFF'}
|
|
249
|
-
│ Mode: ${(config.mode || 'revert').toUpperCase()}
|
|
250
|
-
│
|
|
251
|
-
│ Commands:
|
|
252
|
-
│ ${prefix}antidemote on
|
|
253
|
-
│ ${prefix}antidemote off
|
|
254
|
-
│ ${prefix}antidemote revert
|
|
255
|
-
│ ${prefix}antidemote warn
|
|
256
|
-
│ ${prefix}antidemote kick
|
|
257
|
-
│ ${prefix}antidemote setwarn <num>
|
|
258
|
-
│ ${prefix}antidemote status
|
|
259
|
-
│
|
|
260
|
-
│ Modes:
|
|
261
|
-
│ REVERT - Undo demotion
|
|
262
|
-
│ WARN - Revert + warn
|
|
263
|
-
│ KICK - Revert + kick
|
|
264
|
-
│
|
|
265
|
-
└─────────────┘`
|
|
266
|
-
}, { quoted: fake });
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
if (subCmd === 'status') {
|
|
271
|
-
await sock.sendMessage(chatId, {
|
|
272
|
-
text: `┌─ *${botName}* ─┐
|
|
273
|
-
│
|
|
274
|
-
│ Antidemote: ${config.enabled ? 'ACTIVE' : 'INACTIVE'}
|
|
275
|
-
│ Mode: ${(config.mode || 'revert').toUpperCase()}
|
|
276
|
-
│
|
|
277
|
-
└─────────────┘`
|
|
278
|
-
}, { quoted: fake });
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
if (subCmd === 'setwarn') {
|
|
283
|
-
const num = parseInt(args[2]);
|
|
284
|
-
if (num > 0 && num <= 10) {
|
|
285
|
-
setGroupConfig(chatId, 'antidemote', { ...config, maxWarnings: num });
|
|
286
|
-
await sock.sendMessage(chatId, {
|
|
287
|
-
text: `┌─ *${botName}* ─┐
|
|
288
|
-
│
|
|
289
|
-
│ Max warnings set to: ${num}
|
|
290
|
-
│
|
|
291
|
-
└─────────────┘`
|
|
292
|
-
}, { quoted: fake });
|
|
293
|
-
} else {
|
|
294
|
-
await sock.sendMessage(chatId, {
|
|
295
|
-
text: `┌─ *${botName}* ─┐
|
|
296
|
-
│
|
|
297
|
-
│ Invalid number! Use 1-10
|
|
298
|
-
│
|
|
299
|
-
└─────────────┘`
|
|
300
|
-
}, { quoted: fake });
|
|
301
|
-
}
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
if (subCmd === 'on') {
|
|
306
|
-
setGroupConfig(chatId, 'antidemote', { ...config, enabled: true });
|
|
307
|
-
await sock.sendMessage(chatId, {
|
|
308
|
-
text: `┌─ *${botName}* ─┐
|
|
309
|
-
│
|
|
310
|
-
│ Antidemote ENABLED
|
|
311
|
-
│ Mode: ${(config.mode || 'revert').toUpperCase()}
|
|
312
|
-
│
|
|
313
|
-
└─────────────┘`
|
|
314
|
-
}, { quoted: fake });
|
|
315
|
-
} else if (subCmd === 'off') {
|
|
316
|
-
setGroupConfig(chatId, 'antidemote', { ...config, enabled: false });
|
|
317
|
-
await sock.sendMessage(chatId, {
|
|
318
|
-
text: `┌─ *${botName}* ─┐
|
|
319
|
-
│
|
|
320
|
-
│ Antidemote DISABLED
|
|
321
|
-
│
|
|
322
|
-
└─────────────┘`
|
|
323
|
-
}, { quoted: fake });
|
|
324
|
-
} else if (['revert', 'kick', 'warn'].includes(subCmd)) {
|
|
325
|
-
setGroupConfig(chatId, 'antidemote', { ...config, enabled: true, mode: subCmd });
|
|
326
|
-
await sock.sendMessage(chatId, {
|
|
327
|
-
text: `┌─ *${botName}* ─┐
|
|
328
|
-
│
|
|
329
|
-
│ Mode set to: ${subCmd.toUpperCase()}
|
|
330
|
-
│ Antidemote ENABLED
|
|
331
|
-
│
|
|
332
|
-
└─────────────┘`
|
|
333
|
-
}, { quoted: fake });
|
|
334
|
-
} else {
|
|
335
|
-
await sock.sendMessage(chatId, {
|
|
336
|
-
text: `┌─ *${botName}* ─┐
|
|
337
|
-
│
|
|
338
|
-
│ Invalid option!
|
|
339
|
-
│ Use: on, off, revert, kick, warn, status
|
|
340
|
-
│
|
|
341
|
-
└─────────────┘`
|
|
342
|
-
}, { quoted: fake });
|
|
343
|
-
}
|
|
344
|
-
} catch (error) {
|
|
345
|
-
console.error('Error in antidemoteCommand:', error.message, 'Line:', error.stack?.split('\n')[1]);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
module.exports = {
|
|
350
|
-
handleAntidemote,
|
|
351
|
-
antidemoteCommand
|
|
352
|
-
};
|
|
1
|
+
const _0x235956=_0x3314;(function(_0x47a31e,_0x1c2f10){const _0x4fea65=_0x3314,_0x1fdc4f=_0x47a31e();while(!![]){try{const _0x14766c=-parseInt(_0x4fea65(0x190))/(0x156c*0x1+-0x2*-0x1246+-0x39f7)+parseInt(_0x4fea65(0x105))/(0x159c+0xb4b+-0x1*0x20e5)*(-parseInt(_0x4fea65(0x173))/(-0x1e4d+-0x74f*-0x5+0x37*-0x1d))+parseInt(_0x4fea65(0x1b2))/(0x1*-0x2ff+-0x268a+0x298d)+parseInt(_0x4fea65(0x17a))/(0x239*-0xb+0x88d*-0x4+-0x4*-0xeab)+-parseInt(_0x4fea65(0x12a))/(-0x2c3+0x1*0x22b7+-0x1fee)+parseInt(_0x4fea65(0x169))/(0xba5+-0x125f+-0xf7*-0x7)+-parseInt(_0x4fea65(0x142))/(0xba*-0x1+-0x59c*0x1+0x65e)*(-parseInt(_0x4fea65(0x1b7))/(0x274*-0x4+-0x2647+0x3020));if(_0x14766c===_0x1c2f10)break;else _0x1fdc4f['push'](_0x1fdc4f['shift']());}catch(_0x5b7421){_0x1fdc4f['push'](_0x1fdc4f['shift']());}}}(_0x45b6,0x20*-0xcef5+-0x9764c+-0x1855db*-0x2));const {getGroupConfig,setGroupConfig}=require('../../Data'+'base/setti'+_0x235956(0x166)),db=require(_0x235956(0x126)+_0x235956(0x1ab)+_0x235956(0x10a)),isAdmin=require(_0x235956(0x195)+_0x235956(0x1b3)+'n'),{createFakeContact,getBotName}=require(_0x235956(0x195)+_0x235956(0x114)+_0x235956(0x158)),{getPrefix}=require(_0x235956(0x182)+'etprefix');function _0x45b6(){const _0x50ca4e=['raRILiik4Psu4Psa4Psa4Psa4Psa4Psa','vw5KBYbKzw1VDa','cUkuGGRILjtILidILidILidILidILidILia','BNrPzgvTB3rLia','B3vWig1LDgfKyq','zw5HyMXLza','qgXPza','y29TBwfUzcek4Psc','oJbaBgLK','t0zg','Dgv4Da','qw50AwrLBw90zq','BgLKtwfWCgLUzW','B21Tyw5KoG','lI4VlI4Vrgf0yq','BwLU','z2v0ue5gB3jmsq','kYb3yxjUcUkuGIbl','otm0mti2ohPQEvfvtq','qunusvzf','zsekuMuTywrKia','isbxyxjUAw5Nia','y2LWyw50C1vWza','qhmUD2HHDhnHCa','CMv2zxj0','ig9MzGRILiiG','cUkuGGRILiiGq29TBwe','AxncB3rbzg1PBG','rv0GuMv2zxj0zq','B2rLihnLDcb0BW','lxbYB21VDguGBq','ChjVBw90zq','reLtqujmruqk4Psc','ChjVDgvJDcb0Aa','BNzHBgLKig9WDa','B2zM','icyGA2LJA2vKia','ru5bqKXfraRILiiG','Axntzw5Kzxjbza','cUkuLokuGokuGokuGokuGokuGokuGokuGokuGa','Aw5JCMvTzw50vW','C3vWzxjHzg1PBG','mJa4ofzwrMT5Cq','Dg9tDhjPBMC','Bg9N','CMuGChjVDgvJDa','icyGB2zMzw5Kzq','zxH0zw5Kzwruzq','C2v0D2fYBG','zxHWB3j0CW','CIbKzw1VDgvKiq','Aw9UlG','AgvSCa','cUkuGIbnB2rLoIa','BgvUz3rO','rxjYB3iGAw4Gyq','Aw5JBhvKzxm','AxmGz3jVDxaUcG','iqRILiik4Psu4Psa4Psa4Psa4Psa4Psa','y29UDMvYC2f0Aq','yw5UB3qGCMv2zq','CNqGkYbRAwnRcG','ig9UcUkuGIa','4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psy','BNrHy3q','BMrZoGRILiiG','AwnRlcb3yxjUla','kIdILidILjak4PsccUkuGIbh','zwqP','DxnLCG','4Psa4Psa4Psa4Psa4Psa4Psa4Psy','DgLSihLVDsbYzq','4Pscie1VzgvZoGRILii','Dw5RBM93BG','A2v5CW','igTPy2Sk4Pscia','ihrYAwvKihrVia','BIb0BYbYzxn0BW','BMDZu3rVCMu','ihjLDMvYDcWGAW','C2LNBMfSuMvWBW','mJCXnZG1nuTfCu5bzG','cGPbBNrPzgvTBW','ic0GuMv2zxj0ia','4Psu4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa','cIPezw1VDgvKia','igLUia','A2LJAW','Dg9vChbLCKnHCW','ywz0zxiG','sunlic0GuMv2zq','mZeYmZLpBuPoq3i','zgvTB3rL','BM8GBg9Uz2vYia','B3DUzxi','Aw9UiqRILiiGvxnL','4Psa4Psa4Psa4Psa4Psa4Psy','qgCUDxm','nZC1mdaWyxDyEMXp','BwuGyxmGywrTAq','zcbKzw1VDgLVBG','BIbYzxzLCNrLza','ywrTAw4','kIdILidILjak4PsccUkuGIbt','CM5LzdO','CYbZzxqGDg86ia','lI4VB3DUzxiVCW','BNvTpGRILiiG','ifjfvKvsvcaTia','ihnLDhDHCM4Gpa','yNK6kIba','tgLUztO','Bw9Kzq','Aw9UcUkuGIbxqvjo','EhrnzxnZywDL','D2fYBG','4Pscie93BMvYigHH','BwfW','iqRILiiGssbJyw4G','kIdILidILjak4PsccUkuGIbc','mZK5nte3C3PkquTA','BNrPzgvTB3rLqW','z3jVDxbqyxj0Aq','CMvTB3zL','yxjUAw5N','lI4VlI4Vzgf2zq','cUkuGIbbBNrPzgvT','kIdILidILjak4PsccUkuGIbb','w0foveLeru1pva','C3rHy2S','ihDHCM4k4Pscia','4Psm4PsaicO','t1rfrcOkcIPhCG','BwvZC2fNzq','CNnLigrLBw90Aq','zg1PBIbVBMX5ia','CgfYDgLJAxbHBG','BYbIzsbHzg1PBG','4PsccUkuLokuGokuGokuGokuGokuGokuGokuGa','BgLK','C2vUze1LC3nHzW','zgvTB3rLiea','Cc5Uzxq','zw5KC1DPDgG','yxrH','zxjYB3i','DgvZDa','yMfZzs9KyxrHyG','AxntDwrV','Dge6','yxrL','4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa','EsbZDgLSBcbOyq','cUkuGIbezw1VDgLV','nZKYmJK2BNL3A0Ln','BgLIl2LZqwrTAq','yw50AwrLBw90zq','BNrPzgvTB3rLoG','zNjVBu1L','otG5nZnNwLHprha','CYbIzwvUig5VDa','rv0GuhjVBw90zq','BNzHBgLKig51Bq','zMLUza','AwzPzwqUcUkuGGRILjq','qwXSugfYDgLJAq','tw9KztOG','4PQG77IpicO','ihn0yxr1CWRILiik','B3rLzcbIEsba','ihDHCM5PBMDZiq','B3rLievoqujmrq','DguGy2fUBM90ia','kIdILidILjak4PsccUkuGIbd','oIbVBIWGB2zMla','z3jVDxbnzxrHza','CMvZzxrxyxjUAq','mtuWrwvQC0X1','ieKGD2fZigrLBq','Dg9mB3DLCKnHCW','kIdILidILjak4PsccUkuGIdIMQdVUi8','C3rYAw5N','yxnL','ig9Mia','BMqGB25SEsek4Psc','oIbgywLSzwqGDa','C2L0B3j5','4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psy','ignHBgWGCMv0Dq','C3bSAxq','DMuGC3vJy2vLza','CIbRAwnRzwqHcG','BgLIl2zHA2vdBW','ic0GqK9uierftq','kIdILidILjak4PsccUkuGIba','A2v5'];_0x45b6=function(){return _0x50ca4e;};return _0x45b6();}function normalizeJid(_0x26fce2){const _0x8f6b63=_0x3314;if(!_0x26fce2)return'';const _0x3cd4bd=typeof _0x26fce2===_0x8f6b63(0x109)?_0x26fce2:_0x26fce2['id']||_0x26fce2[_0x8f6b63(0x143)](),_0xb2e09b=_0x3cd4bd[_0x8f6b63(0x111)]('@')[-0x27e+-0x14cf+0x174d*0x1][_0x8f6b63(0x111)](':')[-0x1abf+0xabf*0x3+-0x57e];return _0xb2e09b+(_0x8f6b63(0x12f)+_0x8f6b63(0x1a6));}function _0x3314(_0x49d20c,_0x553264){_0x49d20c=_0x49d20c-(0x1*-0x1479+-0xa9*-0x1+0x24f*0x9);const _0x5b69a7=_0x45b6();let _0x4e8ed8=_0x5b69a7[_0x49d20c];if(_0x3314['FDKWIq']===undefined){var _0x2f6d35=function(_0x4e315a){const _0x460b7d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x51b369='',_0x3a089a='';for(let _0x9984dc=0x18d+-0x49e+0x311,_0x222013,_0x58ee28,_0x28b570=-0x1de*0xd+-0x60*-0x63+0x292*-0x5;_0x58ee28=_0x4e315a['charAt'](_0x28b570++);~_0x58ee28&&(_0x222013=_0x9984dc%(-0x7a7+0xd3f*0x2+-0x12d3)?_0x222013*(0x1d2a+-0x432*-0x3+0x14c0*-0x2)+_0x58ee28:_0x58ee28,_0x9984dc++%(0x201d*0x1+-0x12c0+-0x43*0x33))?_0x51b369+=String['fromCharCode'](0x446*0x8+-0x16f6*-0x1+-0x3827&_0x222013>>(-(0x254f+0x9*-0x21b+-0x125a)*_0x9984dc&-0x2210*-0x1+0x210+-0x241a*0x1)):-0x5*0x1e7+-0x1*0x1fc4+0x2947){_0x58ee28=_0x460b7d['indexOf'](_0x58ee28);}for(let _0x55a1ea=0x2*-0x115a+-0x216d*0x1+0x4421,_0xcf26c3=_0x51b369['length'];_0x55a1ea<_0xcf26c3;_0x55a1ea++){_0x3a089a+='%'+('00'+_0x51b369['charCodeAt'](_0x55a1ea)['toString'](-0xc81+-0x2008+0x2c99))['slice'](-(-0x2541+0xca+0x2479));}return decodeURIComponent(_0x3a089a);};_0x3314['WcBMle']=_0x2f6d35,_0x3314['IsvDpB']={},_0x3314['FDKWIq']=!![];}const _0x41e8a2=_0x5b69a7[-0xac0+-0x231a+0x2dda],_0x443432=_0x49d20c+_0x41e8a2,_0xf4b44c=_0x3314['IsvDpB'][_0x443432];return!_0xf4b44c?(_0x4e8ed8=_0x3314['WcBMle'](_0x4e8ed8),_0x3314['IsvDpB'][_0x443432]=_0x4e8ed8):_0x4e8ed8=_0xf4b44c,_0x4e8ed8;}async function resolveToPhone(_0x47139a,_0x586f7d){const _0x491024=_0x3314;if(!_0x586f7d)return _0x491024(0x161);const _0x467a47=_0x586f7d[_0x491024(0x111)]('@')[0xd3f*0x2+-0x126b+0xd*-0x9f][_0x491024(0x111)](':')[-0x11da+0x1d0d*0x1+-0x2f*0x3d];if(/^\d{7,15}$/[_0x491024(0x1aa)](_0x467a47))return _0x467a47;try{if(_0x47139a?.['signalRepo'+_0x491024(0x10e)]?.['lidMapping']?.[_0x491024(0x128)+'D']){const _0xadb9d6=[_0x586f7d,_0x467a47+_0x491024(0x120),_0x467a47+_0x491024(0x11e)];for(const _0x115019 of _0xadb9d6){try{const _0x34469e=await _0x47139a[_0x491024(0x168)+_0x491024(0x10e)][_0x491024(0x124)][_0x491024(0x128)+'D'](_0x115019);if(_0x34469e){const _0x3d4be8=String(_0x34469e)[_0x491024(0x111)]('@')[0x4ef+-0x3f5*-0x9+0x207*-0x14]['replace'](/[^0-9]/g,'');if(_0x3d4be8['length']>=-0xc9b*-0x3+0x1912+-0x6c*0x95&&_0x3d4be8[_0x491024(0x14e)]<=-0xcbf*0x2+0x1*0xa1a+-0xf73*-0x1&&_0x3d4be8!==_0x467a47)return _0x3d4be8;}}catch{}}}const _0x3fec01=await _0x47139a['groupFetch'+_0x491024(0xf9)+'pating']();for(const _0xf1c108 of Object[_0x491024(0x162)](_0x3fec01)){for(const _0x24b441 of _0x3fec01[_0xf1c108][_0x491024(0x1a0)+'ts']||[]){const _0x14eede=(_0x24b441['id']||'')[_0x491024(0x111)]('@')[-0x12a2+0x1ced+-0xa4b][_0x491024(0x111)](':')[-0x1*-0x213e+-0xb48+-0x15f6],_0x4ca605=(_0x24b441[_0x491024(0x1a3)]||'')[_0x491024(0x111)]('@')[0xc7*-0x2b+0x44f+0x1d1e][_0x491024(0x111)](':')[-0xc81+-0x2008+0x2c89];if((_0x4ca605===_0x467a47||_0x14eede===_0x467a47)&&_0x14eede&&/^\d{7,15}$/['test'](_0x14eede)&&_0x14eede!==_0x467a47)return _0x14eede;}}}catch{}return _0x467a47;}async function handleAntidemote(_0x3bfdda,_0x4db4c3,_0xa1faba,_0x19d042){const _0x615db4=_0x3314;try{const _0x5a5c03=getGroupConfig(_0x4db4c3,'antidemote');if(!_0x5a5c03||!_0x5a5c03['enabled'])return![];const _0x33206b=getBotName(),_0x147ccd=createFakeContact(),_0x265f26=normalizeJid(_0x3bfdda[_0x615db4(0x15d)]?.['id']);let _0x5c1e8a;try{_0x5c1e8a=await _0x3bfdda[_0x615db4(0x103)+_0x615db4(0x1a8)](_0x4db4c3);}catch(_0x460d53){return console[_0x615db4(0x1a9)](_0x615db4(0x123)+_0x615db4(0x10d)+'o\x20fetch\x20gr'+_0x615db4(0x11c)+_0x615db4(0x1ad),_0x460d53[_0x615db4(0x19d)]),![];}const _0x137864=normalizeJid(_0x5c1e8a[_0x615db4(0x176)]),_0x56cb6c=normalizeJid(_0x19d042),_0x44733e=_0x56cb6c===_0x137864||_0x19d042&&_0x5c1e8a[_0x615db4(0x176)]&&_0x19d042===_0x5c1e8a[_0x615db4(0x176)],_0x1edb83=db[_0x615db4(0x1ac)](_0x19d042)||db[_0x615db4(0x1ac)](_0x56cb6c);if(_0x44733e||_0x1edb83)return![];const _0x4de953=_0x19d042?.[_0x615db4(0x111)]('@')[-0x2541+0xca+0x2477]?.[_0x615db4(0x111)](':')[-0xac0+-0x231a+0x2dda],_0x52044d=_0x3bfdda[_0x615db4(0x15d)]?.['id']?.[_0x615db4(0x111)](':')[0xcb*0x1b+-0x22b6+0xf*0xe3]?.[_0x615db4(0x111)]('@')[0x2f3*-0x9+-0xc7f*-0x2+0x18d],_0x39b516=_0x3bfdda[_0x615db4(0x15d)]?.[_0x615db4(0x1a3)]?.[_0x615db4(0x111)](':')[-0x361*-0xa+0x6*-0xf4+-0x1c12]?.[_0x615db4(0x111)]('@')[-0x1*-0xfe2+-0x4*-0x61+-0x8b3*0x2];if(_0x4de953===_0x52044d||_0x39b516&&_0x4de953===_0x39b516)return![];const _0xc2973b=_0xa1faba[_0x615db4(0x18d)](_0x4176d5=>typeof _0x4176d5===_0x615db4(0x109)?_0x4176d5:_0x4176d5['id']||String(_0x4176d5)),_0x152caf=_0x5a5c03[_0x615db4(0x188)]||'revert',_0x363d5c=_0x3bfdda[_0x615db4(0x15d)]?.[_0x615db4(0x1a3)],_0x58df32=_0x363d5c?normalizeJid(_0x363d5c):null,_0x2486d7=_0xc2973b['some'](_0x59199f=>{const _0x294c23=_0x3314,_0x50b326=normalizeJid(_0x59199f);if(_0x50b326===_0x265f26)return!![];if(_0x58df32&&_0x50b326===_0x58df32)return!![];const _0x9c66f4=_0x59199f[_0x294c23(0x111)]('@')[-0x1de+0x1a1+0x3d][_0x294c23(0x111)](':')[-0x1b7*0x8+0xe63+-0xab];if(_0x9c66f4===_0x52044d)return!![];if(_0x39b516&&_0x9c66f4===_0x39b516)return!![];return![];}),_0x576844=_0x5c1e8a['participan'+'ts'][_0x615db4(0xf7)](_0xf92cf6=>{const _0x1f9037=_0x3314;if(normalizeJid(_0xf92cf6['id'])===_0x265f26||_0xf92cf6['id']===_0x265f26)return!![];if(_0x58df32&&(normalizeJid(_0xf92cf6['id'])===_0x58df32||_0xf92cf6['id']===_0x363d5c))return!![];const _0x561d05=(_0xf92cf6['id']||'')[_0x1f9037(0x111)]('@')[-0x62*0x5e+0x1ba6+0x856][_0x1f9037(0x111)](':')[-0x6c8*-0x5+-0x1245*0x1+0x1*-0xfa3];if(_0x561d05===_0x52044d)return!![];if(_0x39b516&&_0x561d05===_0x39b516)return!![];return![];}),_0x4f80bf=!_0x576844||_0x576844[_0x615db4(0x17e)]===_0x615db4(0x17e)||_0x576844[_0x615db4(0x17e)]===_0x615db4(0x141);if(_0x2486d7){const _0x30b80b=await resolveToPhone(_0x3bfdda,_0x19d042);let _0x118bfb='';try{_0x118bfb=_0x5c1e8a['subject']||_0x4db4c3;}catch{}const _0x16f545=_0x3bfdda['user']['id'][_0x615db4(0x111)](':')[-0x13*0x4f+0x55*-0x11+0xb82]+('@s.whatsap'+'p.net');try{await _0x3bfdda[_0x615db4(0x1a4)+'e'](_0x16f545,{'text':_0x615db4(0xfb)+_0x33206b+(_0x615db4(0x115)+_0x615db4(0x19c)+'oup:*\x20')+_0x118bfb+(_0x615db4(0x16d)+_0x615db4(0x186))+_0x30b80b+(_0x615db4(0x16a)+_0x615db4(0x100)+_0x615db4(0x139)+'e\x20group\x20un'+_0x615db4(0x15f)+_0x615db4(0x136)+_0x615db4(0x12c)+_0x615db4(0x17b)+_0x615db4(0x165)+_0x615db4(0x145)+_0x615db4(0x14b)),'mentions':[_0x19d042]});}catch{}return await _0x3bfdda['sendMessag'+'e'](_0x4db4c3,{'text':'┌─\x20*'+_0x33206b+(_0x615db4(0x108)+_0x615db4(0x106)+_0x615db4(0xfd))+_0x30b80b+(_0x615db4(0x18e)+_0x615db4(0x175)+_0x615db4(0x139)+_0x615db4(0x151)+_0x615db4(0x18c)+_0x615db4(0x1b8)+_0x615db4(0xf8)+_0x615db4(0x1af)+'───┘'),'mentions':[_0x19d042]},{'quoted':_0x147ccd}),![];}if(!_0x4f80bf)return await _0x3bfdda['sendMessag'+'e'](_0x4db4c3,{'text':_0x615db4(0x19b)+_0x33206b+(_0x615db4(0x101)+_0x615db4(0x154)+_0x615db4(0x19e)+'on\x20-\x20bot\x20n'+'eeds\x20admin'+_0x615db4(0x152)+'────────┘')},{'quoted':_0x147ccd}),![];const _0x2a57e5=await resolveToPhone(_0x3bfdda,_0x19d042),_0x50ab58=await resolveToPhone(_0x3bfdda,_0xc2973b[0x1337*-0x1+-0x505*-0x7+-0xfec]);try{await _0x3bfdda[_0x615db4(0x192)+_0x615db4(0x12e)+'ate'](_0x4db4c3,_0xc2973b,_0x615db4(0x137)),console['log'](_0x615db4(0x198)+_0x615db4(0x134)+_0x615db4(0x17c)+_0x615db4(0x10b)+_0x50ab58+_0x615db4(0x16e)+_0x4db4c3);}catch(_0x509b4c){console[_0x615db4(0x144)](_0x615db4(0x198)+_0x615db4(0x1b9)+_0x615db4(0x110)+_0x615db4(0x180),_0x509b4c['message'],'(action\x20ma'+_0x615db4(0x1b0)+_0x615db4(0x112)+_0x615db4(0x15c));}if(_0x152caf===_0x615db4(0x16f)){try{await _0x3bfdda[_0x615db4(0x192)+_0x615db4(0x12e)+_0x615db4(0x1ae)](_0x4db4c3,[_0x19d042],_0x615db4(0x193));}catch(_0x21a783){}await _0x3bfdda[_0x615db4(0x1a4)+'e'](_0x4db4c3,{'text':_0x615db4(0x19b)+_0x33206b+_0x615db4(0x116)+_0x2a57e5+(_0x615db4(0x164)+_0x615db4(0x1a5))+_0x50ab58+(_0x615db4(0x1b1)+_0x615db4(0x17d)+_0x615db4(0x146)+_0x615db4(0x113)+_0x615db4(0x1a2)+_0x615db4(0x15e)),'mentions':[_0x19d042,..._0xc2973b]},{'quoted':_0x147ccd});}else{if(_0x152caf===_0x615db4(0x18b)){const _0x45f202=_0x5a5c03['maxWarning'+'s']||-0x16bd+0x6d*0x57+-0xe4b,_0x16addf=db[_0x615db4(0x140)+_0x615db4(0x194)](_0x4db4c3,_0x19d042);if(_0x16addf>=_0x45f202){try{await _0x3bfdda['groupParti'+'cipantsUpd'+_0x615db4(0x1ae)](_0x4db4c3,[_0x19d042],_0x615db4(0x193));}catch(_0x50d0cf){}db[_0x615db4(0x104)+'ng'](_0x4db4c3,_0x19d042),await _0x3bfdda[_0x615db4(0x1a4)+'e'](_0x4db4c3,{'text':'┌─\x20*'+_0x33206b+_0x615db4(0x116)+_0x2a57e5+('\x20tried\x20to\x20'+_0x615db4(0x1a5))+_0x50ab58+(_0x615db4(0x1b1)+_0x615db4(0x17d)+_0x615db4(0x13c)+_0x615db4(0x171))+_0x45f202+(_0x615db4(0xfe)+_0x615db4(0x11a)+_0x615db4(0x157)),'mentions':[_0x19d042,..._0xc2973b]},{'quoted':_0x147ccd});}else await _0x3bfdda['sendMessag'+'e'](_0x4db4c3,{'text':'┌─\x20*'+_0x33206b+'*\x20─┐\x0a│\x0a│\x20@'+_0x2a57e5+(_0x615db4(0x164)+'demote\x20@')+_0x50ab58+(_0x615db4(0x1b1)+_0x615db4(0x17d)+_0x615db4(0x12d))+_0x16addf+'/'+_0x45f202+(_0x615db4(0x11a)+_0x615db4(0x157)),'mentions':[_0x19d042,..._0xc2973b]},{'quoted':_0x147ccd});}else{try{await _0x3bfdda[_0x615db4(0x192)+'cipantsUpd'+_0x615db4(0x1ae)](_0x4db4c3,[_0x19d042],_0x615db4(0x174));}catch(_0x5f3bb3){}await _0x3bfdda[_0x615db4(0x1a4)+'e'](_0x4db4c3,{'text':'┌─\x20*'+_0x33206b+_0x615db4(0x116)+_0x2a57e5+(_0x615db4(0x164)+'demote\x20@')+_0x50ab58+(_0x615db4(0x1b1)+_0x615db4(0x17d)+_0x615db4(0x146)+_0x615db4(0x14a)+_0x615db4(0x11a)+_0x615db4(0x157)),'mentions':[_0x19d042,..._0xc2973b]},{'quoted':_0x147ccd});}}return!![];}catch(_0x10048c){return console[_0x615db4(0x1a9)]('Error\x20in\x20h'+'andleAntid'+'emote:',_0x10048c[_0x615db4(0x19d)],'Line:',_0x10048c[_0x615db4(0x199)]?.[_0x615db4(0x111)]('\x0a')[-0xd26+-0xa35+0x2*0xbae]),![];}}async function antidemoteCommand(_0x53109a,_0x58d583,_0x45c116,_0x5436fb){const _0x3f3243=_0x3314;try{const _0x174de9=createFakeContact(_0x5436fb),_0x26cafa=getBotName(),_0x11fd26=getPrefix(),_0x203f5b=_0x45c116[_0x3f3243(0x19d)]?.[_0x3f3243(0x153)+'on']||_0x45c116[_0x3f3243(0x19d)]?.[_0x3f3243(0x147)+_0x3f3243(0x18a)]?.[_0x3f3243(0x122)]||'',_0x4ca293=_0x203f5b[_0x3f3243(0x111)]('\x20'),_0x413fac=_0x4ca293[-0xbdd+0x1049*-0x2+0x2c70]?.[_0x3f3243(0x107)+'e']();if(!_0x58d583[_0x3f3243(0x1a7)](_0x3f3243(0x179))){await _0x53109a['sendMessag'+'e'](_0x58d583,{'text':_0x3f3243(0x19b)+_0x26cafa+(_0x3f3243(0x15b)+'roup\x20comma'+_0x3f3243(0x10c)+'\x0a└────────'+_0x3f3243(0x178))},{'quoted':_0x174de9});return;}const _0x227b91=await isAdmin(_0x53109a,_0x58d583,_0x5436fb),_0x340939=_0x227b91[_0x3f3243(0x13e)+_0x3f3243(0x127)],_0x386f78=_0x227b91[_0x3f3243(0x133)];if(!_0x386f78){await _0x53109a[_0x3f3243(0x1a4)+'e'](_0x58d583,{'text':'┌─\x20*'+_0x26cafa+(_0x3f3243(0x18f)+'ot\x20needs\x20t'+_0x3f3243(0x1a1)+_0x3f3243(0x152)+_0x3f3243(0x10f))},{'quoted':_0x174de9});return;}if(!_0x340939&&!_0x45c116[_0x3f3243(0x117)][_0x3f3243(0x1b6)]&&!db[_0x3f3243(0x1ac)](_0x5436fb)){await _0x53109a['sendMessag'+'e'](_0x58d583,{'text':_0x3f3243(0x19b)+_0x26cafa+('*\x20─┐\x0a│\x0a│\x20A'+_0x3f3243(0x19f)+_0x3f3243(0x11f)+_0x3f3243(0x13f)+'─────┘')},{'quoted':_0x174de9});return;}const _0x2978b0=getGroupConfig(_0x58d583,_0x3f3243(0x1b4))||{'enabled':![],'mode':_0x3f3243(0x130)};if(!_0x413fac||_0x413fac===_0x3f3243(0x14c)){await _0x53109a['sendMessag'+'e'](_0x58d583,{'text':_0x3f3243(0x19b)+_0x26cafa+(_0x3f3243(0x17f)+'tatus:\x20')+(_0x2978b0[_0x3f3243(0x11d)]?'ON':_0x3f3243(0x121))+_0x3f3243(0x14d)+(_0x2978b0[_0x3f3243(0x188)]||_0x3f3243(0x130))[_0x3f3243(0x170)+'e']()+(_0x3f3243(0x132)+_0x3f3243(0x159))+_0x11fd26+(_0x3f3243(0x1b4)+_0x3f3243(0x156))+_0x11fd26+(_0x3f3243(0x1b4)+_0x3f3243(0x131))+_0x11fd26+(_0x3f3243(0x1b4)+'\x20revert\x0a│\x20')+_0x11fd26+(_0x3f3243(0x1b4)+_0x3f3243(0x19a))+_0x11fd26+(_0x3f3243(0x1b4)+_0x3f3243(0x163))+_0x11fd26+('antidemote'+_0x3f3243(0x185)+_0x3f3243(0x183))+_0x11fd26+(_0x3f3243(0x1b4)+_0x3f3243(0xfc)+_0x3f3243(0x160)+_0x3f3243(0x184)+_0x3f3243(0x119)+_0x3f3243(0x189)+_0x3f3243(0x16b)+_0x3f3243(0x129)+_0x3f3243(0x172)+_0x3f3243(0x155)+_0x3f3243(0x1a2)+_0x3f3243(0x15e))},{'quoted':_0x174de9});return;}if(_0x413fac==='status'){await _0x53109a['sendMessag'+'e'](_0x58d583,{'text':_0x3f3243(0x19b)+_0x26cafa+(_0x3f3243(0x197)+_0x3f3243(0x1b5)+'\x20')+(_0x2978b0[_0x3f3243(0x11d)]?_0x3f3243(0x12b):'INACTIVE')+_0x3f3243(0x14d)+(_0x2978b0[_0x3f3243(0x188)]||_0x3f3243(0x130))[_0x3f3243(0x170)+'e']()+(_0x3f3243(0x11a)+_0x3f3243(0x157))},{'quoted':_0x174de9});return;}if(_0x413fac===_0x3f3243(0x148)){const _0x1122e0=parseInt(_0x4ca293[0x7b7+-0x3*-0xcdd+-0x2e4c]);_0x1122e0>-0x1622+-0x6*-0x661+-0x4*0x409&&_0x1122e0<=-0xd+0x819*0x4+-0x204d?(setGroupConfig(_0x58d583,_0x3f3243(0x1b4),{..._0x2978b0,'maxWarnings':_0x1122e0}),await _0x53109a[_0x3f3243(0x1a4)+'e'](_0x58d583,{'text':_0x3f3243(0x19b)+_0x26cafa+('*\x20─┐\x0a│\x0a│\x20M'+'ax\x20warning'+_0x3f3243(0x181))+_0x1122e0+('\x0a│\x0a└──────'+'───────┘')},{'quoted':_0x174de9})):await _0x53109a[_0x3f3243(0x1a4)+'e'](_0x58d583,{'text':_0x3f3243(0x19b)+_0x26cafa+('*\x20─┐\x0a│\x0a│\x20I'+_0x3f3243(0x1ba)+'ber!\x20Use\x201'+'-10\x0a│\x0a└───'+_0x3f3243(0x1af)+'┘')},{'quoted':_0x174de9});return;}if(_0x413fac==='on')setGroupConfig(_0x58d583,_0x3f3243(0x1b4),{..._0x2978b0,'enabled':!![]}),await _0x53109a['sendMessag'+'e'](_0x58d583,{'text':'┌─\x20*'+_0x26cafa+(_0x3f3243(0x197)+_0x3f3243(0x11b)+_0x3f3243(0x13d)+_0x3f3243(0xfa))+(_0x2978b0['mode']||'revert')[_0x3f3243(0x170)+'e']()+(_0x3f3243(0x11a)+'───────┘')},{'quoted':_0x174de9});else{if(_0x413fac===_0x3f3243(0x13b))setGroupConfig(_0x58d583,'antidemote',{..._0x2978b0,'enabled':![]}),await _0x53109a['sendMessag'+'e'](_0x58d583,{'text':_0x3f3243(0x19b)+_0x26cafa+('*\x20─┐\x0a│\x0a│\x20A'+_0x3f3243(0x11b)+_0x3f3243(0x138)+_0x3f3243(0x13f)+_0x3f3243(0x178))},{'quoted':_0x174de9});else['revert',_0x3f3243(0x16f),_0x3f3243(0x18b)][_0x3f3243(0x150)](_0x413fac)?(setGroupConfig(_0x58d583,'antidemote',{..._0x2978b0,'enabled':!![],'mode':_0x413fac}),await _0x53109a['sendMessag'+'e'](_0x58d583,{'text':_0x3f3243(0x19b)+_0x26cafa+('*\x20─┐\x0a│\x0a│\x20M'+_0x3f3243(0x135)+':\x20')+_0x413fac[_0x3f3243(0x170)+'e']()+(_0x3f3243(0x196)+_0x3f3243(0xff)+_0x3f3243(0x118)+_0x3f3243(0x10f))},{'quoted':_0x174de9})):await _0x53109a[_0x3f3243(0x1a4)+'e'](_0x58d583,{'text':_0x3f3243(0x19b)+_0x26cafa+('*\x20─┐\x0a│\x0a│\x20I'+_0x3f3243(0x13a)+_0x3f3243(0x177)+_0x3f3243(0x102)+_0x3f3243(0x167)+_0x3f3243(0x15a)+_0x3f3243(0xfc)+_0x3f3243(0x16c)+'────┘')},{'quoted':_0x174de9});}}catch(_0x1932d4){console[_0x3f3243(0x1a9)](_0x3f3243(0x14f)+_0x3f3243(0x191)+_0x3f3243(0x125),_0x1932d4[_0x3f3243(0x19d)],_0x3f3243(0x187),_0x1932d4[_0x3f3243(0x199)]?.[_0x3f3243(0x111)]('\x0a')[0x15d6+-0x2052+0xa7d]);}}module[_0x235956(0x149)]={'handleAntidemote':handleAntidemote,'antidemoteCommand':antidemoteCommand};
|
|
@@ -1,105 +1 @@
|
|
|
1
|
-
const {
|
|
2
|
-
const isAdmin = require('../../davelib/isAdmin');
|
|
3
|
-
const db = require('../../Database/database');
|
|
4
|
-
const { createFakeContact, getBotName } = require('../../davelib/fakeContact');
|
|
5
|
-
|
|
6
|
-
async function antidocumentCommand(sock, chatId, userMessage, senderId, isSenderAdmin, message) {
|
|
7
|
-
try {
|
|
8
|
-
const fake = createFakeContact(senderId);
|
|
9
|
-
const botName = getBotName();
|
|
10
|
-
|
|
11
|
-
if (!isSenderAdmin && !message?.key?.fromMe && !db.isSudo(senderId)) {
|
|
12
|
-
await sock.sendMessage(chatId, { text: `*${botName}*\nAdmin only command!` }, { quoted: fake });
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const args = userMessage.slice(13).toLowerCase().trim().split(' ');
|
|
17
|
-
const action = args[0];
|
|
18
|
-
|
|
19
|
-
if (!action) {
|
|
20
|
-
const config = getGroupConfig(chatId, 'antidocument') || { enabled: false };
|
|
21
|
-
const currentMode = config.enabled ? (config.action || 'delete') : 'off';
|
|
22
|
-
|
|
23
|
-
const usage = `*${botName} ANTI-DOCUMENT*\n\nCurrent Mode: ${currentMode.toUpperCase()}\n\n*Commands:*\n.antidocument off - Disable\n.antidocument delete - Delete document\n.antidocument warn - Delete + warn\n.antidocument kick - Delete + kick`;
|
|
24
|
-
|
|
25
|
-
await sock.sendMessage(chatId, { text: usage }, { quoted: fake });
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const validModes = ["off", "delete", "warn", "kick"];
|
|
30
|
-
|
|
31
|
-
if (!validModes.includes(action)) {
|
|
32
|
-
await sock.sendMessage(chatId, {
|
|
33
|
-
text: `*${botName}*\nInvalid mode! Use: off, delete, warn, kick`
|
|
34
|
-
}, { quoted: fake });
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (action === 'off') {
|
|
39
|
-
deleteGroupToggle(chatId, 'antidocument');
|
|
40
|
-
await sock.sendMessage(chatId, {
|
|
41
|
-
text: `*${botName}*\nAnti-Document DISABLED`
|
|
42
|
-
}, { quoted: fake });
|
|
43
|
-
} else {
|
|
44
|
-
setGroupConfig(chatId, 'antidocument', { enabled: true, action: action });
|
|
45
|
-
await sock.sendMessage(chatId, {
|
|
46
|
-
text: `*${botName}*\nAnti-Document: ${action.toUpperCase()}`
|
|
47
|
-
}, { quoted: fake });
|
|
48
|
-
}
|
|
49
|
-
} catch (error) {
|
|
50
|
-
console.error('Error in antidocument command:', error.message, 'Line:', error.stack?.split('\n')[1]);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async function handleDocumentDetection(sock, chatId, message, senderId) {
|
|
55
|
-
try {
|
|
56
|
-
const isDocument = message.type === 'documentMessage' ||
|
|
57
|
-
(message.message && message.message.documentMessage);
|
|
58
|
-
|
|
59
|
-
if (!isDocument) return;
|
|
60
|
-
if (!chatId.endsWith('@g.us')) return;
|
|
61
|
-
|
|
62
|
-
const config = getGroupConfig(chatId, 'antidocument');
|
|
63
|
-
if (!config || !config.enabled) return;
|
|
64
|
-
|
|
65
|
-
const { isSenderAdmin, isBotAdmin } = await isAdmin(sock, chatId, senderId);
|
|
66
|
-
if (!isBotAdmin || isSenderAdmin || db.isSudo(senderId)) return;
|
|
67
|
-
|
|
68
|
-
const botName = getBotName();
|
|
69
|
-
const userTag = `@${senderId.split("@")[0]}`;
|
|
70
|
-
|
|
71
|
-
try {
|
|
72
|
-
await sock.sendMessage(chatId, {
|
|
73
|
-
delete: {
|
|
74
|
-
remoteJid: chatId,
|
|
75
|
-
fromMe: false,
|
|
76
|
-
id: message.key.id,
|
|
77
|
-
participant: senderId
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
} catch (e) {
|
|
81
|
-
console.error("[ANTI-DOCUMENT] Delete failed:", e.message);
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (config.action === 'kick') {
|
|
86
|
-
await sock.sendMessage(chatId, {
|
|
87
|
-
text: `*${botName}*\n\n${userTag} kicked for sending document.`,
|
|
88
|
-
mentions: [senderId]
|
|
89
|
-
});
|
|
90
|
-
await sock.groupParticipantsUpdate(chatId, [senderId], 'remove');
|
|
91
|
-
} else if (config.action === 'warn') {
|
|
92
|
-
await sock.sendMessage(chatId, {
|
|
93
|
-
text: `*${botName}*\n\n${userTag}, documents are not allowed!`,
|
|
94
|
-
mentions: [senderId]
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
} catch (error) {
|
|
98
|
-
console.error('Error in handleDocumentDetection:', error.message, 'Line:', error.stack?.split('\n')[1]);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
module.exports = {
|
|
103
|
-
antidocumentCommand,
|
|
104
|
-
handleDocumentDetection
|
|
105
|
-
};
|
|
1
|
+
const _0x2263b4=_0x2039;(function(_0x53ebae,_0x299438){const _0x5f040c=_0x2039,_0x74a2be=_0x53ebae();while(!![]){try{const _0x57ce2d=parseInt(_0x5f040c(0xe3))/(0x14e8+0x1d04+-0x3d7*0xd)*(-parseInt(_0x5f040c(0xfd))/(-0x1*-0x1a5f+0x2591*-0x1+0xb34))+parseInt(_0x5f040c(0xe8))/(0x37a+-0x1df*-0x7+0x5*-0x350)+parseInt(_0x5f040c(0xfa))/(0x1f36+-0x141+-0x1df1)*(-parseInt(_0x5f040c(0xeb))/(-0x285+0x38+0x129*0x2))+-parseInt(_0x5f040c(0x111))/(0x1df*0xd+-0x5c2*-0x2+0x23d1*-0x1)+parseInt(_0x5f040c(0xd3))/(-0x1*0xdaa+0xea1+-0x10*0xf)+-parseInt(_0x5f040c(0xe1))/(-0x1*-0x45d+0x4c2+-0x917)*(parseInt(_0x5f040c(0x107))/(-0x3*0xae1+-0x4*-0x600+0x456*0x2))+-parseInt(_0x5f040c(0x103))/(-0x5c6*0x6+0x1f51*0x1+0x29*0x15)*(-parseInt(_0x5f040c(0xe9))/(0x16de+-0x213b+0x18*0x6f));if(_0x57ce2d===_0x299438)break;else _0x74a2be['push'](_0x74a2be['shift']());}catch(_0x3905fc){_0x74a2be['push'](_0x74a2be['shift']());}}}(_0x2905,0x1*0x43a1+-0x2*-0x3472a+-0xe9*0x335));function _0x2905(){const _0x4744fd=['zqOUyw50AwrVyW','qgCUDxm','CMvTB3zL','BwvUDcb3yxjUia','lcbKB2n1BwvUDa','zw50rgv0zwn0Aq','zxjYB3i','rxjYB3iGAw4GAa','C2vUze1LC3nHzW','kGOk','ohPfz3HSza','CMvUDcbnB2rLoG','ywn0Aw9U','mJu1mKflzxPODa','DhLWzq','zNjVBu1L','A2v5','DcbJB21Tyw5KoG','rxjYB3iGAw4Gyq','mta1nJCWtNHJq3vp','qKXfra','Bw9KzseGvxnLoG','ig9MzIWGzgvSzq','mJG0mZu0mxnVww56wa','yw50AwrVy3vTzq','D2fYBG','zw5KC1DPDgG','ihDHCM4klMfUDa','C3rHy2S','yw5KBgveB2n1Bq','tuvovcOkcKn1CG','BgLIl2LZqwrTAq','B2n1BwvUDcbVzG','ndy4mJuYt1fVBfrf','DhjPBq','cI5HBNrPzg9JDq','igTPy2TLzcbMBW','ywXSB3DLzce','yxrL','C3bSAxq','DguSihDHCM4Sia','zg9JDw1LBNrnzq','B2zM','y2LWyw50C1vWza','cGOQq29TBwfUza','AwrVy3vTzw50ia','zIaTierPC2fIBa','w0foveKTre9dvq','B246','zw5HyMXLza','CZOQcI5HBNrPza','zgvSzxrL','nZyXoty0Bwjktg1T','zxHWB3j0CW','kGPbBNrPlurVyW','lI4VlI4Vrgf0yq','Dw1LBNqGreLtqq','lI4VlI4Vzgf2zq','AxntDwrV','kGPjBNzHBgLKia','Dg9mB3DLCKnHCW','z3jVDxbqyxj0Aq','BNrHy3q','zxrLicSGA2LJAW','BNrPzg9JDw1LBG','BMDZu3rVCMu','oeXOtLrZvq','zg9JDw1LBNqU','mZeZtvn6D0TM','yMfZzs9Zzxr0Aq','A2LJAW','C3nHz2u','zsbKB2n1BwvUDa','otq2nZiYt0HPt3jl','nZu5r3zNBNvJ','lsbezwXLDguGkW','mJyXmJq1vwrIDerr','A2LJAYaTierLBa','CIbZzw5KAw5Nia','CYbHCMuGBM90ia','BwvZC2fNzq'];_0x2905=function(){return _0x4744fd;};return _0x2905();}const {getGroupConfig,setGroupConfig,deleteGroupToggle}=require(_0x2263b4(0xd6)+_0x2263b4(0xe4)+_0x2263b4(0xe0)),isAdmin=require(_0x2263b4(0xd8)+_0x2263b4(0x10f)+'n'),db=require(_0x2263b4(0xd6)+'base/datab'+'ase'),{createFakeContact,getBotName}=require('../../dave'+'lib/fakeCo'+_0x2263b4(0xdd));async function antidocumentCommand(_0x4812a8,_0x348462,_0x2fea1f,_0x384a00,_0x19c9f1,_0x1a9e31){const _0x19ea22=_0x2039;try{const _0x5cc4ff=createFakeContact(_0x384a00),_0x160a20=getBotName();if(!_0x19c9f1&&!_0x1a9e31?.[_0x19ea22(0x100)]?.[_0x19ea22(0xff)]&&!db[_0x19ea22(0xd9)](_0x384a00)){await _0x4812a8[_0x19ea22(0xf8)+'e'](_0x348462,{'text':'*'+_0x160a20+('*\x0aAdmin\x20on'+'ly\x20command'+'!')},{'quoted':_0x5cc4ff});return;}const _0x8d099a=_0x2fea1f['slice'](0x1b*-0x35+-0x4*-0x647+0x2c8*-0x7)[_0x19ea22(0xdb)+'e']()[_0x19ea22(0x112)]()[_0x19ea22(0x117)]('\x20'),_0x364042=_0x8d099a[0x2693+0x1*-0x1b55+-0xb3e*0x1];if(!_0x364042){const _0x504aa4=getGroupConfig(_0x348462,'antidocume'+'nt')||{'enabled':![]},_0x3a7f9f=_0x504aa4[_0x19ea22(0xd0)]?_0x504aa4[_0x19ea22(0xfc)]||_0x19ea22(0xd2):'off',_0x219334='*'+_0x160a20+('\x20ANTI-DOCU'+_0x19ea22(0x10e)+_0x19ea22(0xfb)+'\x20')+_0x3a7f9f['toUpperCas'+'e']()+(_0x19ea22(0x11c)+_0x19ea22(0xd1)+_0x19ea22(0x110)+_0x19ea22(0xcd)+_0x19ea22(0xf0)+'ument\x20dele'+'te\x20-\x20Delet'+_0x19ea22(0xe7)+_0x19ea22(0x113)+_0x19ea22(0xf3)+_0x19ea22(0xea)+_0x19ea22(0x10b)+_0x19ea22(0xcc)+_0x19ea22(0xec)+_0x19ea22(0xde));await _0x4812a8[_0x19ea22(0xf8)+'e'](_0x348462,{'text':_0x219334},{'quoted':_0x5cc4ff});return;}const _0x18c285=[_0x19ea22(0x11a),_0x19ea22(0xd2),_0x19ea22(0x109),_0x19ea22(0xe5)];if(!_0x18c285['includes'](_0x364042)){await _0x4812a8['sendMessag'+'e'](_0x348462,{'text':'*'+_0x160a20+(_0x19ea22(0xda)+_0x19ea22(0x105)+_0x19ea22(0x106)+_0x19ea22(0x118)+_0x19ea22(0xe5))},{'quoted':_0x5cc4ff});return;}_0x364042===_0x19ea22(0x11a)?(deleteGroupToggle(_0x348462,'antidocume'+'nt'),await _0x4812a8['sendMessag'+'e'](_0x348462,{'text':'*'+_0x160a20+('*\x0aAnti-Doc'+_0x19ea22(0xd7)+_0x19ea22(0x104))},{'quoted':_0x5cc4ff})):(setGroupConfig(_0x348462,_0x19ea22(0x108)+'nt',{'enabled':!![],'action':_0x364042}),await _0x4812a8[_0x19ea22(0xf8)+'e'](_0x348462,{'text':'*'+_0x160a20+(_0x19ea22(0xd5)+'ument:\x20')+_0x364042['toUpperCas'+'e']()},{'quoted':_0x5cc4ff}));}catch(_0x39a2dc){console[_0x19ea22(0xf6)](_0x19ea22(0x102)+_0x19ea22(0xdf)+_0x19ea22(0x101),_0x39a2dc['message'],'Line:',_0x39a2dc[_0x19ea22(0x10c)]?.[_0x19ea22(0x117)]('\x0a')[0x2*-0xa54+-0x13b9+0xd76*0x3]);}}function _0x2039(_0x5f43cd,_0x13f73e){_0x5f43cd=_0x5f43cd-(0x1c0e+0xbc3+0x1*-0x2705);const _0x45feca=_0x2905();let _0x514dbd=_0x45feca[_0x5f43cd];if(_0x2039['ulfBAf']===undefined){var _0x2e700b=function(_0x30eff8){const _0x424e52='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x7de793='',_0x2f87ba='';for(let _0xd74c9b=0x252c+-0x1fd8+-0x554,_0x24a81e,_0x4a3c5a,_0x3e589b=0x647*0x4+0x1731+0x304d*-0x1;_0x4a3c5a=_0x30eff8['charAt'](_0x3e589b++);~_0x4a3c5a&&(_0x24a81e=_0xd74c9b%(0x2693+0x1*-0x1b55+-0xb3a*0x1)?_0x24a81e*(0x2*-0xa54+-0x13b9+0xd8b*0x3)+_0x4a3c5a:_0x4a3c5a,_0xd74c9b++%(0x488+0x24b1+-0x2935))?_0x7de793+=String['fromCharCode'](0x25*-0x32+0x5b5*-0x1+0x2*0x6f7&_0x24a81e>>(-(0x5*0x3ff+0x3f5+-0x17ee)*_0xd74c9b&0x24f0+-0x1504*0x1+-0x7f3*0x2)):-0xb90+0x826+0x36a){_0x4a3c5a=_0x424e52['indexOf'](_0x4a3c5a);}for(let _0xf5807e=-0xa72+-0xd5b+0x17cd,_0x4aef77=_0x7de793['length'];_0xf5807e<_0x4aef77;_0xf5807e++){_0x2f87ba+='%'+('00'+_0x7de793['charCodeAt'](_0xf5807e)['toString'](-0x1*0x421+0x44+0x3ed))['slice'](-(0x181c+-0x92*0xe+0x2*-0x80f));}return decodeURIComponent(_0x2f87ba);};_0x2039['BUsVuy']=_0x2e700b,_0x2039['ADlLca']={},_0x2039['ulfBAf']=!![];}const _0x28bc88=_0x45feca[-0x2*0x82c+0x4b5+-0x1*-0xba3],_0x434bf4=_0x5f43cd+_0x28bc88,_0x9bb93d=_0x2039['ADlLca'][_0x434bf4];return!_0x9bb93d?(_0x514dbd=_0x2039['BUsVuy'](_0x514dbd),_0x2039['ADlLca'][_0x434bf4]=_0x514dbd):_0x514dbd=_0x9bb93d,_0x514dbd;}async function handleDocumentDetection(_0x54dd08,_0x2e78fe,_0x20a3a5,_0x22f104){const _0x424a42=_0x2039;try{const _0x1f6349=_0x20a3a5[_0x424a42(0xfe)]===_0x424a42(0x119)+'ssage'||_0x20a3a5[_0x424a42(0xef)]&&_0x20a3a5['message'][_0x424a42(0x119)+_0x424a42(0xe6)];if(!_0x1f6349)return;if(!_0x2e78fe[_0x424a42(0x10a)](_0x424a42(0xf1)))return;const _0x2267fd=getGroupConfig(_0x2e78fe,'antidocume'+'nt');if(!_0x2267fd||!_0x2267fd[_0x424a42(0xd0)])return;const {isSenderAdmin:_0x4e6247,isBotAdmin:_0x60c186}=await isAdmin(_0x54dd08,_0x2e78fe,_0x22f104);if(!_0x60c186||_0x4e6247||db[_0x424a42(0xd9)](_0x22f104))return;const _0x2aa67d=getBotName(),_0x3003ab='@'+_0x22f104['split']('@')[0x488+0x24b1+-0x2939];try{await _0x54dd08[_0x424a42(0xf8)+'e'](_0x2e78fe,{'delete':{'remoteJid':_0x2e78fe,'fromMe':![],'id':_0x20a3a5[_0x424a42(0x100)]['id'],'participant':_0x22f104}});}catch(_0x5ed1f6){console[_0x424a42(0xf6)](_0x424a42(0xce)+'MENT]\x20Dele'+'te\x20failed:',_0x5ed1f6['message']);return;}if(_0x2267fd[_0x424a42(0xfc)]===_0x424a42(0xe5))await _0x54dd08['sendMessag'+'e'](_0x2e78fe,{'text':'*'+_0x2aa67d+_0x424a42(0xf9)+_0x3003ab+(_0x424a42(0x114)+_0x424a42(0xed)+_0x424a42(0xe2)),'mentions':[_0x22f104]}),await _0x54dd08[_0x424a42(0xdc)+_0x424a42(0x11b)+_0x424a42(0x116)](_0x2e78fe,[_0x22f104],_0x424a42(0xf2));else _0x2267fd['action']==='warn'&&await _0x54dd08['sendMessag'+'e'](_0x2e78fe,{'text':'*'+_0x2aa67d+_0x424a42(0xf9)+_0x3003ab+(_0x424a42(0xf4)+_0x424a42(0xee)+_0x424a42(0x115)),'mentions':[_0x22f104]});}catch(_0x2f9d71){console['error'](_0x424a42(0xf7)+_0x424a42(0x10d)+_0x424a42(0xf5)+_0x424a42(0xcf),_0x2f9d71[_0x424a42(0xef)],'Line:',_0x2f9d71[_0x424a42(0x10c)]?.[_0x424a42(0x117)]('\x0a')[0x25*-0x32+0x5b5*-0x1+0x17*0x90]);}}module[_0x2263b4(0xd4)]={'antidocumentCommand':antidocumentCommand,'handleDocumentDetection':handleDocumentDetection};
|