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,262 +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
|
-
|
|
6
|
-
const processedGroupCalls = new Map();
|
|
7
|
-
const GROUP_CALL_COOLDOWN_MS = 30000;
|
|
8
|
-
|
|
9
|
-
async function groupanticallCommand(sock, chatId, message, args) {
|
|
10
|
-
const botName = getBotName();
|
|
11
|
-
const senderId = message.key.participant || message.key.remoteJid;
|
|
12
|
-
const fake = createFakeContact(senderId);
|
|
13
|
-
const isGroup = chatId.endsWith('@g.us');
|
|
14
|
-
|
|
15
|
-
if (!isGroup) {
|
|
16
|
-
return sock.sendMessage(chatId, {
|
|
17
|
-
text: `┌─ *${botName}* ─┐\n│\n│ Group command only!\n│\n└─────────────┘`
|
|
18
|
-
}, { quoted: fake });
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const { isSenderAdmin, isBotAdmin } = await isAdmin(sock, chatId, senderId);
|
|
22
|
-
if (!isSenderAdmin && !message.key.fromMe && !db.isSudo(senderId)) {
|
|
23
|
-
return sock.sendMessage(chatId, {
|
|
24
|
-
text: `┌─ *${botName}* ─┐\n│\n│ Admin only command!\n│\n└─────────────┘`
|
|
25
|
-
}, { quoted: fake });
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const config = getGroupConfig(chatId, 'groupanticall') || { enabled: false, action: 'warn' };
|
|
29
|
-
const sub = (args || '').trim().toLowerCase();
|
|
30
|
-
|
|
31
|
-
if (!sub) {
|
|
32
|
-
const helpText = `┌─ *${botName}* ─┐
|
|
33
|
-
│
|
|
34
|
-
│ Status: ${config.enabled ? 'ON' : 'OFF'}
|
|
35
|
-
│ Action: ${(config.action || 'warn').toUpperCase()}
|
|
36
|
-
│ Bot admin: ${isBotAdmin ? 'Yes' : 'No'}
|
|
37
|
-
│
|
|
38
|
-
│ Commands:
|
|
39
|
-
│ .groupanticall on
|
|
40
|
-
│ .groupanticall off
|
|
41
|
-
│ .groupanticall warn
|
|
42
|
-
│ .groupanticall delete
|
|
43
|
-
│ .groupanticall kick
|
|
44
|
-
│ .groupanticall status
|
|
45
|
-
│
|
|
46
|
-
│ Actions:
|
|
47
|
-
│ WARN - Decline + warn
|
|
48
|
-
│ DELETE - Decline + remove
|
|
49
|
-
│ KICK - Decline + kick
|
|
50
|
-
│
|
|
51
|
-
└─────────────┘`;
|
|
52
|
-
return sock.sendMessage(chatId, { text: helpText }, { quoted: fake });
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
let newConfig = { ...config };
|
|
56
|
-
let responseText = '';
|
|
57
|
-
|
|
58
|
-
if (sub === 'status') {
|
|
59
|
-
responseText = `┌─ *${botName}* ─┐
|
|
60
|
-
│
|
|
61
|
-
│ Anti-Call: ${config.enabled ? 'ACTIVE' : 'INACTIVE'}
|
|
62
|
-
│ Action: ${(config.action || 'warn').toUpperCase()}
|
|
63
|
-
│ Bot admin: ${isBotAdmin ? 'Yes' : 'No'}
|
|
64
|
-
│
|
|
65
|
-
└─────────────┘`;
|
|
66
|
-
} else if (sub === 'on' || sub === 'enable') {
|
|
67
|
-
newConfig.enabled = true;
|
|
68
|
-
if (!newConfig.action) newConfig.action = 'warn';
|
|
69
|
-
responseText = `┌─ *${botName}* ─┐
|
|
70
|
-
│
|
|
71
|
-
│ Anti-Call ENABLED
|
|
72
|
-
│ Action: ${newConfig.action.toUpperCase()}
|
|
73
|
-
│
|
|
74
|
-
└─────────────┘`;
|
|
75
|
-
setGroupConfig(chatId, 'groupanticall', newConfig);
|
|
76
|
-
} else if (sub === 'off' || sub === 'disable') {
|
|
77
|
-
newConfig.enabled = false;
|
|
78
|
-
responseText = `┌─ *${botName}* ─┐
|
|
79
|
-
│
|
|
80
|
-
│ Anti-Call DISABLED
|
|
81
|
-
│
|
|
82
|
-
└─────────────┘`;
|
|
83
|
-
setGroupConfig(chatId, 'groupanticall', newConfig);
|
|
84
|
-
} else if (sub === 'warn') {
|
|
85
|
-
newConfig.enabled = true;
|
|
86
|
-
newConfig.action = 'warn';
|
|
87
|
-
responseText = `┌─ *${botName}* ─┐
|
|
88
|
-
│
|
|
89
|
-
│ Mode: WARN
|
|
90
|
-
│ Decline + warn
|
|
91
|
-
│
|
|
92
|
-
└─────────────┘`;
|
|
93
|
-
setGroupConfig(chatId, 'groupanticall', newConfig);
|
|
94
|
-
} else if (sub === 'delete' || sub === 'remove') {
|
|
95
|
-
newConfig.enabled = true;
|
|
96
|
-
newConfig.action = 'delete';
|
|
97
|
-
if (!isBotAdmin) {
|
|
98
|
-
responseText = `┌─ *${botName}* ─┐
|
|
99
|
-
│
|
|
100
|
-
│ Mode: DELETE
|
|
101
|
-
│ Decline + remove
|
|
102
|
-
│
|
|
103
|
-
│ Bot needs admin rights!
|
|
104
|
-
│
|
|
105
|
-
└─────────────┘`;
|
|
106
|
-
} else {
|
|
107
|
-
responseText = `┌─ *${botName}* ─┐
|
|
108
|
-
│
|
|
109
|
-
│ Mode: DELETE
|
|
110
|
-
│ Decline + remove caller
|
|
111
|
-
│
|
|
112
|
-
└─────────────┘`;
|
|
113
|
-
}
|
|
114
|
-
setGroupConfig(chatId, 'groupanticall', newConfig);
|
|
115
|
-
} else if (sub === 'kick') {
|
|
116
|
-
newConfig.enabled = true;
|
|
117
|
-
newConfig.action = 'kick';
|
|
118
|
-
if (!isBotAdmin) {
|
|
119
|
-
responseText = `┌─ *${botName}* ─┐
|
|
120
|
-
│
|
|
121
|
-
│ Mode: KICK
|
|
122
|
-
│ Decline + kick
|
|
123
|
-
│
|
|
124
|
-
│ Bot needs admin rights!
|
|
125
|
-
│
|
|
126
|
-
└─────────────┘`;
|
|
127
|
-
} else {
|
|
128
|
-
responseText = `┌─ *${botName}* ─┐
|
|
129
|
-
│
|
|
130
|
-
│ Mode: KICK
|
|
131
|
-
│ Decline + kick caller
|
|
132
|
-
│
|
|
133
|
-
└─────────────┘`;
|
|
134
|
-
}
|
|
135
|
-
setGroupConfig(chatId, 'groupanticall', newConfig);
|
|
136
|
-
} else {
|
|
137
|
-
responseText = `┌─ *${botName}* ─┐
|
|
138
|
-
│
|
|
139
|
-
│ Invalid option!
|
|
140
|
-
│ Use: on, off, warn, delete, kick, status
|
|
141
|
-
│
|
|
142
|
-
└─────────────┘`;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
await sock.sendMessage(chatId, { text: responseText }, { quoted: fake });
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
async function handleGroupCall(sock, call) {
|
|
149
|
-
try {
|
|
150
|
-
if (!call.isGroup) return false;
|
|
151
|
-
|
|
152
|
-
const callerJid = call.from;
|
|
153
|
-
if (!callerJid) return false;
|
|
154
|
-
|
|
155
|
-
const groupJid = call.chatId;
|
|
156
|
-
if (!groupJid || !groupJid.endsWith('@g.us')) return false;
|
|
157
|
-
|
|
158
|
-
const config = getGroupConfig(groupJid, 'groupanticall');
|
|
159
|
-
if (!config || !config.enabled) return false;
|
|
160
|
-
|
|
161
|
-
const callKey = call.id || `${callerJid}_${groupJid}_${Date.now()}`;
|
|
162
|
-
const now = Date.now();
|
|
163
|
-
if (processedGroupCalls.has(callKey)) {
|
|
164
|
-
const lastTime = processedGroupCalls.get(callKey);
|
|
165
|
-
if (now - lastTime < GROUP_CALL_COOLDOWN_MS) return true;
|
|
166
|
-
}
|
|
167
|
-
processedGroupCalls.set(callKey, now);
|
|
168
|
-
|
|
169
|
-
if (processedGroupCalls.size > 50) {
|
|
170
|
-
for (const [key, time] of processedGroupCalls) {
|
|
171
|
-
if (now - time > 60000) processedGroupCalls.delete(key);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
try {
|
|
176
|
-
await sock.rejectCall(call.id, callerJid);
|
|
177
|
-
} catch (e) {
|
|
178
|
-
console.error('[GROUP-ANTICALL] Reject failed:', e.message);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
const botName = getBotName();
|
|
182
|
-
const callerTag = `@${callerJid.split('@')[0]}`;
|
|
183
|
-
const action = config.action || 'warn';
|
|
184
|
-
|
|
185
|
-
if (action === 'warn') {
|
|
186
|
-
try {
|
|
187
|
-
await sock.sendMessage(groupJid, {
|
|
188
|
-
text: `┌─ *${botName}* ─┐
|
|
189
|
-
│
|
|
190
|
-
│ ${callerTag}
|
|
191
|
-
│ Group calls not allowed!
|
|
192
|
-
│
|
|
193
|
-
└─────────────┘`,
|
|
194
|
-
mentions: [callerJid]
|
|
195
|
-
});
|
|
196
|
-
} catch (e) {
|
|
197
|
-
console.error('[GROUP-ANTICALL] Warn failed:', e.message);
|
|
198
|
-
}
|
|
199
|
-
} else if (action === 'delete' || action === 'kick') {
|
|
200
|
-
try {
|
|
201
|
-
const botJid = sock.user?.id?.split(':')[0] + '@s.whatsapp.net';
|
|
202
|
-
const groupMeta = await sock.groupMetadata(groupJid);
|
|
203
|
-
const botIsAdmin = groupMeta.participants.some(
|
|
204
|
-
p => (p.id === botJid || p.id.startsWith(sock.user?.id?.split(':')[0])) &&
|
|
205
|
-
(p.admin === 'admin' || p.admin === 'superadmin')
|
|
206
|
-
);
|
|
207
|
-
|
|
208
|
-
const callerIsAdmin = groupMeta.participants.some(
|
|
209
|
-
p => p.id === callerJid && (p.admin === 'admin' || p.admin === 'superadmin')
|
|
210
|
-
);
|
|
211
|
-
|
|
212
|
-
if (callerIsAdmin) {
|
|
213
|
-
await sock.sendMessage(groupJid, {
|
|
214
|
-
text: `┌─ *${botName}* ─┐
|
|
215
|
-
│
|
|
216
|
-
│ ${callerTag}
|
|
217
|
-
│ Group calls not allowed!
|
|
218
|
-
│ (Admin - not removed)
|
|
219
|
-
│
|
|
220
|
-
└─────────────┘`,
|
|
221
|
-
mentions: [callerJid]
|
|
222
|
-
});
|
|
223
|
-
} else if (botIsAdmin) {
|
|
224
|
-
const actionWord = action === 'delete' ? 'removed' : 'kicked';
|
|
225
|
-
await sock.sendMessage(groupJid, {
|
|
226
|
-
text: `┌─ *${botName}* ─┐
|
|
227
|
-
│
|
|
228
|
-
│ ${callerTag}
|
|
229
|
-
│ ${actionWord} for group call
|
|
230
|
-
│
|
|
231
|
-
└─────────────┘`,
|
|
232
|
-
mentions: [callerJid]
|
|
233
|
-
});
|
|
234
|
-
await sock.groupParticipantsUpdate(groupJid, [callerJid], 'remove');
|
|
235
|
-
} else {
|
|
236
|
-
await sock.sendMessage(groupJid, {
|
|
237
|
-
text: `┌─ *${botName}* ─┐
|
|
238
|
-
│
|
|
239
|
-
│ ${callerTag}
|
|
240
|
-
│ Group calls not allowed!
|
|
241
|
-
│ (Bot needs admin to ${action})
|
|
242
|
-
│
|
|
243
|
-
└─────────────┘`,
|
|
244
|
-
mentions: [callerJid]
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
} catch (e) {
|
|
248
|
-
console.error(`[GROUP-ANTICALL] ${action} failed:`, e.message);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
return true;
|
|
253
|
-
} catch (error) {
|
|
254
|
-
console.error('[GROUP-ANTICALL] Error:', error.message);
|
|
255
|
-
return false;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
module.exports = {
|
|
260
|
-
groupanticallCommand,
|
|
261
|
-
handleGroupCall
|
|
262
|
-
};
|
|
1
|
+
const _0x347195=_0x9c63;(function(_0x42d584,_0x2a9cbb){const _0xb607ca=_0x9c63,_0x5dfcf3=_0x42d584();while(!![]){try{const _0x491cee=-parseInt(_0xb607ca(0x11e))/(-0x15f2*-0x1+0x1c*-0x133+0xba3)+-parseInt(_0xb607ca(0x176))/(0x1aff+-0x7a6+-0x1357)+-parseInt(_0xb607ca(0x120))/(0xd*0x41+0x3b*0xa3+-0x28db)*(-parseInt(_0xb607ca(0x135))/(-0x1*-0x12ff+-0x1336+0x3b))+parseInt(_0xb607ca(0x14e))/(-0x1*0xc53+0x1d0c+-0x10b4)+parseInt(_0xb607ca(0x13e))/(-0x49*0x49+-0x1f04*0x1+0x33db)+parseInt(_0xb607ca(0x170))/(-0x710+0xd3*0x7+-0x152*-0x1)+-parseInt(_0xb607ca(0x118))/(0x1917+-0x2*0x1271+0x3f1*0x3);if(_0x491cee===_0x2a9cbb)break;else _0x5dfcf3['push'](_0x5dfcf3['shift']());}catch(_0x1625ac){_0x5dfcf3['push'](_0x5dfcf3['shift']());}}}(_0x37d6,-0xe408d+-0x182*0x5fb+0x1*0x23d851));const {getGroupConfig,setGroupConfig}=require(_0x347195(0xfe)+_0x347195(0x17b)+_0x347195(0x10d)),db=require('../../Data'+_0x347195(0x15b)+_0x347195(0x10c)),isAdmin=require(_0x347195(0x155)+_0x347195(0x152)+'n'),{createFakeContact,getBotName}=require(_0x347195(0x155)+_0x347195(0x16a)+_0x347195(0x179)),processedGroupCalls=new Map(),GROUP_CALL_COOLDOWN_MS=-0x7*-0xd1d+0x60a6+-0x4741;async function groupanticallCommand(_0x36db9c,_0x5fd65c,_0x5d8022,_0x2668ba){const _0x5ecb21=_0x9c63,_0x554221=getBotName(),_0x3e83ae=_0x5d8022[_0x5ecb21(0x160)]['participan'+'t']||_0x5d8022[_0x5ecb21(0x160)]['remoteJid'],_0x323470=createFakeContact(_0x3e83ae),_0x4f4f72=_0x5fd65c[_0x5ecb21(0xfc)](_0x5ecb21(0x147));if(!_0x4f4f72)return _0x36db9c[_0x5ecb21(0x128)+'e'](_0x5fd65c,{'text':_0x5ecb21(0x13d)+_0x554221+('*\x20─┐\x0a│\x0a│\x20G'+'roup\x20comma'+'nd\x20only!\x0a│'+_0x5ecb21(0x177)+_0x5ecb21(0x151))},{'quoted':_0x323470});const {isSenderAdmin:_0x5a02a9,isBotAdmin:_0x1abb3a}=await isAdmin(_0x36db9c,_0x5fd65c,_0x3e83ae);if(!_0x5a02a9&&!_0x5d8022[_0x5ecb21(0x160)]['fromMe']&&!db[_0x5ecb21(0x165)](_0x3e83ae))return _0x36db9c[_0x5ecb21(0x128)+'e'](_0x5fd65c,{'text':_0x5ecb21(0x13d)+_0x554221+('*\x20─┐\x0a│\x0a│\x20A'+_0x5ecb21(0x17f)+_0x5ecb21(0x141)+_0x5ecb21(0x177)+'─────┘')},{'quoted':_0x323470});const _0x33a822=getGroupConfig(_0x5fd65c,_0x5ecb21(0x121)+_0x5ecb21(0x162))||{'enabled':![],'action':_0x5ecb21(0x157)},_0xdef6dc=(_0x2668ba||'')[_0x5ecb21(0x123)]()[_0x5ecb21(0x125)+'e']();if(!_0xdef6dc){const _0x40ab7c=_0x5ecb21(0x13d)+_0x554221+(_0x5ecb21(0xf6)+'tatus:\x20')+(_0x33a822[_0x5ecb21(0x100)]?'ON':_0x5ecb21(0x117))+(_0x5ecb21(0x10a)+'\x20')+(_0x33a822[_0x5ecb21(0x150)]||_0x5ecb21(0x157))['toUpperCas'+'e']()+(_0x5ecb21(0x101)+_0x5ecb21(0x12d))+(_0x1abb3a?_0x5ecb21(0x129):'No')+(_0x5ecb21(0x180)+_0x5ecb21(0x132)+_0x5ecb21(0xfa)+'l\x20on\x0a│\x20.gr'+_0x5ecb21(0xfa)+_0x5ecb21(0x12b)+_0x5ecb21(0x15f)+'ll\x20warn\x0a│\x20'+_0x5ecb21(0x104)+_0x5ecb21(0x16f)+_0x5ecb21(0x17a)+_0x5ecb21(0x103)+_0x5ecb21(0x168)+'upanticall'+_0x5ecb21(0x146)+_0x5ecb21(0x16c)+_0x5ecb21(0x11a)+_0x5ecb21(0x154)+_0x5ecb21(0x12f)+_0x5ecb21(0x139)+_0x5ecb21(0x142)+_0x5ecb21(0x15e)+_0x5ecb21(0x16d)+_0x5ecb21(0x10b)+'──────────'+_0x5ecb21(0xf8));return _0x36db9c[_0x5ecb21(0x128)+'e'](_0x5fd65c,{'text':_0x40ab7c},{'quoted':_0x323470});}let _0x1de724={..._0x33a822},_0x3495dd='';if(_0xdef6dc===_0x5ecb21(0x153))_0x3495dd=_0x5ecb21(0x13d)+_0x554221+(_0x5ecb21(0x12e)+'nti-Call:\x20')+(_0x33a822[_0x5ecb21(0x100)]?'ACTIVE':_0x5ecb21(0x12a))+(_0x5ecb21(0x10a)+'\x20')+(_0x33a822[_0x5ecb21(0x150)]||_0x5ecb21(0x157))[_0x5ecb21(0x108)+'e']()+(_0x5ecb21(0x101)+'in:\x20')+(_0x1abb3a?_0x5ecb21(0x129):'No')+('\x0a│\x0a└──────'+_0x5ecb21(0x137));else{if(_0xdef6dc==='on'||_0xdef6dc===_0x5ecb21(0x11b)){_0x1de724['enabled']=!![];if(!_0x1de724[_0x5ecb21(0x150)])_0x1de724['action']='warn';_0x3495dd=_0x5ecb21(0x13d)+_0x554221+(_0x5ecb21(0x12e)+_0x5ecb21(0x156)+'NABLED\x0a│\x20A'+_0x5ecb21(0x13a))+_0x1de724[_0x5ecb21(0x150)][_0x5ecb21(0x108)+'e']()+('\x0a│\x0a└──────'+'───────┘'),setGroupConfig(_0x5fd65c,_0x5ecb21(0x121)+'all',_0x1de724);}else{if(_0xdef6dc===_0x5ecb21(0x14c)||_0xdef6dc==='disable')_0x1de724['enabled']=![],_0x3495dd=_0x5ecb21(0x13d)+_0x554221+(_0x5ecb21(0x12e)+_0x5ecb21(0xff)+'ISABLED\x0a│\x0a'+_0x5ecb21(0x169)+_0x5ecb21(0x12c)),setGroupConfig(_0x5fd65c,_0x5ecb21(0x121)+_0x5ecb21(0x162),_0x1de724);else{if(_0xdef6dc===_0x5ecb21(0x157))_0x1de724[_0x5ecb21(0x100)]=!![],_0x1de724[_0x5ecb21(0x150)]=_0x5ecb21(0x157),_0x3495dd=_0x5ecb21(0x13d)+_0x554221+(_0x5ecb21(0x13c)+'ode:\x20WARN\x0a'+'│\x20Decline\x20'+_0x5ecb21(0x134)+'──────────'+'───┘'),setGroupConfig(_0x5fd65c,_0x5ecb21(0x121)+_0x5ecb21(0x162),_0x1de724);else{if(_0xdef6dc===_0x5ecb21(0xf9)||_0xdef6dc===_0x5ecb21(0x133))_0x1de724[_0x5ecb21(0x100)]=!![],_0x1de724[_0x5ecb21(0x150)]=_0x5ecb21(0xf9),!_0x1abb3a?_0x3495dd=_0x5ecb21(0x13d)+_0x554221+(_0x5ecb21(0x13c)+_0x5ecb21(0x175)+_0x5ecb21(0x166)+_0x5ecb21(0x16e)+_0x5ecb21(0x114)+_0x5ecb21(0x124)+'\x20rights!\x0a│'+_0x5ecb21(0x177)+'─────┘'):_0x3495dd='┌─\x20*'+_0x554221+(_0x5ecb21(0x13c)+_0x5ecb21(0x175)+_0x5ecb21(0x166)+'e\x20+\x20remove'+_0x5ecb21(0xf5)+_0x5ecb21(0x169)+_0x5ecb21(0x12c)),setGroupConfig(_0x5fd65c,_0x5ecb21(0x121)+_0x5ecb21(0x162),_0x1de724);else _0xdef6dc===_0x5ecb21(0x174)?(_0x1de724['enabled']=!![],_0x1de724[_0x5ecb21(0x150)]=_0x5ecb21(0x174),!_0x1abb3a?_0x3495dd=_0x5ecb21(0x13d)+_0x554221+('*\x20─┐\x0a│\x0a│\x20M'+_0x5ecb21(0x14f)+_0x5ecb21(0x178)+_0x5ecb21(0xfb)+'\x20Bot\x20needs'+'\x20admin\x20rig'+'hts!\x0a│\x0a└──'+_0x5ecb21(0x15d)+'─┘'):_0x3495dd=_0x5ecb21(0x13d)+_0x554221+(_0x5ecb21(0x13c)+_0x5ecb21(0x14f)+_0x5ecb21(0x178)+_0x5ecb21(0x161)+_0x5ecb21(0xfd)+'──────────'+'┘'),setGroupConfig(_0x5fd65c,_0x5ecb21(0x121)+_0x5ecb21(0x162),_0x1de724)):_0x3495dd=_0x5ecb21(0x13d)+_0x554221+(_0x5ecb21(0x15a)+'nvalid\x20opt'+_0x5ecb21(0x116)+':\x20on,\x20off,'+_0x5ecb21(0xf7)+_0x5ecb21(0x17c)+_0x5ecb21(0x146)+'└─────────'+'────┘');}}}}await _0x36db9c[_0x5ecb21(0x128)+'e'](_0x5fd65c,{'text':_0x3495dd},{'quoted':_0x323470});}function _0x9c63(_0x3630dc,_0x1cc240){_0x3630dc=_0x3630dc-(-0x5*-0x1+-0x5dd+0x1*0x6cd);const _0x2c4129=_0x37d6();let _0x241a96=_0x2c4129[_0x3630dc];if(_0x9c63['VIqJON']===undefined){var _0x2eb25f=function(_0xf83873){const _0x571ea8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2aaa2c='',_0x3163ff='';for(let _0x753645=0x4*0x3cb+0x7bb*-0x3+0x805,_0x1229c0,_0x176062,_0x2fdc73=-0x107*0x3+-0x533+0x14*0x6a;_0x176062=_0xf83873['charAt'](_0x2fdc73++);~_0x176062&&(_0x1229c0=_0x753645%(0x1ad5*0x1+0x19*0x15b+-0x3cb4)?_0x1229c0*(0x12cc+-0xaa1+-0x7eb)+_0x176062:_0x176062,_0x753645++%(-0x90f*0x2+-0x1538+0x1b6*0x17))?_0x2aaa2c+=String['fromCharCode'](0x4*-0xa9+-0x1a24+0x1dc7&_0x1229c0>>(-(-0x749*-0x1+-0x5*-0x719+0x1c*-0x187)*_0x753645&-0x10*-0x21+-0x25b*-0xb+-0x1bf3)):-0x403*-0x1+0x2*0x6f5+-0x11ed*0x1){_0x176062=_0x571ea8['indexOf'](_0x176062);}for(let _0x28d955=-0x17fe+-0xff3*-0x1+0x80b*0x1,_0xcae6f3=_0x2aaa2c['length'];_0x28d955<_0xcae6f3;_0x28d955++){_0x3163ff+='%'+('00'+_0x2aaa2c['charCodeAt'](_0x28d955)['toString'](-0xe50+0x1*0xe09+0x57))['slice'](-(0x83b*-0x4+0x5c9*0x4+0x9ca));}return decodeURIComponent(_0x3163ff);};_0x9c63['dGxYvc']=_0x2eb25f,_0x9c63['YzmTVE']={},_0x9c63['VIqJON']=!![];}const _0xf06be1=_0x2c4129[0xd*-0x269+-0x4*-0x6d7+0x3f9],_0x598861=_0x3630dc+_0xf06be1,_0x173f7f=_0x9c63['YzmTVE'][_0x598861];return!_0x173f7f?(_0x241a96=_0x9c63['dGxYvc'](_0x241a96),_0x9c63['YzmTVE'][_0x598861]=_0x241a96):_0x241a96=_0x173f7f,_0x241a96;}async function handleGroupCall(_0x3db54d,_0x6809ca){const _0x498b6d=_0x9c63;try{if(!_0x6809ca[_0x498b6d(0x127)])return![];const _0x39e14c=_0x6809ca[_0x498b6d(0x126)];if(!_0x39e14c)return![];const _0x383ed1=_0x6809ca['chatId'];if(!_0x383ed1||!_0x383ed1[_0x498b6d(0xfc)](_0x498b6d(0x147)))return![];const _0x51045b=getGroupConfig(_0x383ed1,_0x498b6d(0x121)+_0x498b6d(0x162));if(!_0x51045b||!_0x51045b[_0x498b6d(0x100)])return![];const _0xba7db7=_0x6809ca['id']||_0x39e14c+'_'+_0x383ed1+'_'+Date[_0x498b6d(0x110)](),_0x126838=Date[_0x498b6d(0x110)]();if(processedGroupCalls[_0x498b6d(0x149)](_0xba7db7)){const _0xaa4f80=processedGroupCalls[_0x498b6d(0x173)](_0xba7db7);if(_0x126838-_0xaa4f80<GROUP_CALL_COOLDOWN_MS)return!![];}processedGroupCalls[_0x498b6d(0x171)](_0xba7db7,_0x126838);if(processedGroupCalls[_0x498b6d(0x14a)]>0x227+0x2b*-0x91+0xb33*0x2)for(const [_0x55b4ad,_0x5a41ad]of processedGroupCalls){if(_0x126838-_0x5a41ad>0x1*0x14b+0x198c9+-0x14*0x8c9)processedGroupCalls[_0x498b6d(0xf9)](_0x55b4ad);}try{await _0x3db54d[_0x498b6d(0x105)](_0x6809ca['id'],_0x39e14c);}catch(_0x1e3810){console[_0x498b6d(0x140)](_0x498b6d(0x158)+_0x498b6d(0x112)+_0x498b6d(0x172)+':',_0x1e3810['message']);}const _0x43277e=getBotName(),_0x1af77a='@'+_0x39e14c[_0x498b6d(0x130)]('@')[-0x1786+-0x21c+0x19a2],_0x3acb56=_0x51045b[_0x498b6d(0x150)]||_0x498b6d(0x157);if(_0x3acb56===_0x498b6d(0x157))try{await _0x3db54d[_0x498b6d(0x128)+'e'](_0x383ed1,{'text':_0x498b6d(0x13d)+_0x43277e+_0x498b6d(0x17d)+_0x1af77a+(_0x498b6d(0x111)+_0x498b6d(0x11c)+_0x498b6d(0x181)+_0x498b6d(0x169)+_0x498b6d(0x12c)),'mentions':[_0x39e14c]});}catch(_0x40d1fc){console[_0x498b6d(0x140)](_0x498b6d(0x158)+_0x498b6d(0x107)+_0x498b6d(0x14b),_0x40d1fc[_0x498b6d(0x106)]);}else{if(_0x3acb56===_0x498b6d(0xf9)||_0x3acb56===_0x498b6d(0x174))try{const _0x18c314=_0x3db54d[_0x498b6d(0x167)]?.['id']?.['split'](':')[0x1ae0+0x1bb*-0x13+0x601]+(_0x498b6d(0x136)+'p.net'),_0x468e28=await _0x3db54d['groupMetad'+_0x498b6d(0x164)](_0x383ed1),_0x40b11a=_0x468e28[_0x498b6d(0x182)+'ts']['some'](_0x78174e=>(_0x78174e['id']===_0x18c314||_0x78174e['id'][_0x498b6d(0x109)](_0x3db54d[_0x498b6d(0x167)]?.['id']?.['split'](':')[-0x3bc*0x7+0x12f0+0x734*0x1]))&&(_0x78174e[_0x498b6d(0x119)]===_0x498b6d(0x119)||_0x78174e[_0x498b6d(0x119)]===_0x498b6d(0x115))),_0x5b5f7f=_0x468e28[_0x498b6d(0x182)+'ts'][_0x498b6d(0x17e)](_0x4bee6a=>_0x4bee6a['id']===_0x39e14c&&(_0x4bee6a[_0x498b6d(0x119)]===_0x498b6d(0x119)||_0x4bee6a[_0x498b6d(0x119)]===_0x498b6d(0x115)));if(_0x5b5f7f)await _0x3db54d[_0x498b6d(0x128)+'e'](_0x383ed1,{'text':_0x498b6d(0x13d)+_0x43277e+_0x498b6d(0x17d)+_0x1af77a+(_0x498b6d(0x111)+'alls\x20not\x20a'+_0x498b6d(0x13f)+_0x498b6d(0x145)+_0x498b6d(0x144)+_0x498b6d(0x102)+_0x498b6d(0x14d)),'mentions':[_0x39e14c]});else{if(_0x40b11a){const _0x3000ad=_0x3acb56===_0x498b6d(0xf9)?'removed':_0x498b6d(0x11f);await _0x3db54d[_0x498b6d(0x128)+'e'](_0x383ed1,{'text':_0x498b6d(0x13d)+_0x43277e+_0x498b6d(0x17d)+_0x1af77a+_0x498b6d(0x148)+_0x3000ad+(_0x498b6d(0x15c)+_0x498b6d(0x122)+_0x498b6d(0x15d)+_0x498b6d(0x143)),'mentions':[_0x39e14c]}),await _0x3db54d[_0x498b6d(0x13b)+_0x498b6d(0x11d)+_0x498b6d(0x10f)](_0x383ed1,[_0x39e14c],'remove');}else await _0x3db54d[_0x498b6d(0x128)+'e'](_0x383ed1,{'text':'┌─\x20*'+_0x43277e+_0x498b6d(0x17d)+_0x1af77a+('\x0a│\x20Group\x20c'+_0x498b6d(0x11c)+'llowed!\x0a│\x20'+_0x498b6d(0x159)+_0x498b6d(0x16b))+_0x3acb56+(_0x498b6d(0x102)+_0x498b6d(0x14d)),'mentions':[_0x39e14c]});}}catch(_0x595af8){console[_0x498b6d(0x140)](_0x498b6d(0x158)+_0x498b6d(0x113)+_0x3acb56+_0x498b6d(0x131),_0x595af8[_0x498b6d(0x106)]);}}return!![];}catch(_0x52110b){return console[_0x498b6d(0x140)](_0x498b6d(0x158)+_0x498b6d(0x163)+_0x498b6d(0x10e),_0x52110b[_0x498b6d(0x106)]),![];}}module[_0x347195(0x138)]={'groupanticallCommand':groupanticallCommand,'handleGroupCall':handleGroupCall};function _0x37d6(){const _0xf24fd4=['zwvKCYbHzg1PBG','Dg9mB3DLCKnHCW','zNjVBq','AxnhCM91Ca','C2vUze1LC3nHzW','wwvZ','su5bq1rjvKu','BcbVzMyk4Pscic5N','4Psa4Psa4Psa4Psa4Psy','Aw46ia','kIdILidILjak4PsccUkuGIbb','D2fYBGRILiiGrevm','C3bSAxq','igzHAwXLzdO','BMrZoGRILiiGlMDY','CMvTB3zL','kYb3yxjUcUkuGGRILjq','mtaWmZG4vNrLtMvg','qhmUD2HHDhnHCa','4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psy','zxHWB3j0CW','rvrfic0GrgvJBa','y3rPB246ia','z3jVDxbqyxj0Aq','kIdILidILjak4PsccUkuGIbn','4Psm4PsaicO','mZKZnZq4mMPMCevtra','BgXVD2vKiqRILiiG','zxjYB3i','y29TBwfUzcek4Psc','Aw5LicSGCMvTBW','4Psa4Psa4Psy','B3qGCMvTB3zLza','kefKBwLUic0GBG','ihn0yxr1CWRILiik','qgCUDxm','cUkuGIa','AgfZ','C2L6zq','BIbMywLSzwq6','B2zM','4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psy','ntG3otq2nwnUzgHmtG','B2rLoIblsunlcG','ywn0Aw9U','4Psa4Psa4Psa4Psa4Psa4Psy','BgLIl2LZqwrTAq','C3rHDhvZ','rgvJBgLUzsaRia','lI4VlI4Vzgf2zq','BNrPlunHBgWGrq','D2fYBG','w0Dst1vqlufova','kejVDcbUzwvKCW','kIdILidILjak4PsccUkuGIbj','yMfZzs9KyxrHyG','igzVCIbNCM91Ca','4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa','DMuk4PscieTjq0SG','CM91CgfUDgLJyq','A2v5','kYbRAwnRignHBa','ywXS','sunbteXDievYCG','yxrH','AxntDwrV','rqRILiiGrgvJBgLU','DxnLCG','AwnRcUkuGIaUz3jV','4Psu4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa4Psa','BgLIl2zHA2vdBW','igfKBwLUihrVia','4PsciefJDgLVBNm6','lsbezwnSAw5Lia','zsaRihjLBw92zq','y2fSBcbKzwXLDa','oduWmJaZmMf4zNHlBG','C2v0','zwn0igzHAwXLza','z2v0','A2LJAW','B2rLoIberuXfva','mJy0ndeWmgrQBufIzW','cUkuLokuGokuGokuGokuGokuGokuGokuGokuGa','4PscierLy2XPBMuG','BNrHy3q','zqRILiiGlMDYB3vW','yMfZzs9Zzxr0Aq','zxrLlcbRAwnRla','kIdILidILjak4PsccUkuGIa','C29Tzq','zg1PBIbVBMX5ia','cUkuGGRILiiGq29TBwe','BgXVD2vKiqRILiik','CgfYDgLJAxbHBG','ignHBgXLCGRILiik','kIdILidILjak4PsccUkuGIbt','ihDHCM4SigrLBa','4Psa4Psa4Psa4Psy','zgvSzxrL','B3vWyw50AwnHBa','kYbRAwnRcUkuGGRILii','zw5KC1DPDgG','BgvYcUkuGGRILjtILidILidILia','lI4VlI4Vrgf0yq','BNrPlunHBgWGra','zw5HyMXLza','cUkuGIbcB3qGywrT','kqRILiik4Psu4Psa4Psa4Psa4Psa4Psa','yw50AwnHBgWGAW','lMDYB3vWyw50Aq','CMvQzwn0q2fSBa','BwvZC2fNzq','sunbteXDifDHCG','Dg9vChbLCKnHCW','C3rHCNrZv2L0Aa','cUkuGIbby3rPB246','kYbRAwnRcUkuGGRILjq','yxnL','BMDZu3rVCMu','B3i6','yxrL','BM93','cUkuGIbhCM91CcbJ','sunbteXDifjLAG','sunbteXDia','cUkuGGRILiiGqM90ig4','C3vWzxjHzg1PBG','Aw9UiqRILiiGvxnL','t0zg','mtq3ndy2mJrSD3DwyLy','ywrTAw4','cUkuGIbxqvjoic0G','zw5HyMXL','ywXSCYbUB3qGyq','y2LWyw50C1vWza','mJeXnJu4v21PvNHb','A2LJA2vK','mtm4zeLlCfvw','z3jVDxbHBNrPyW','ignHBgWk4PsccUkuLokuGa','DhjPBq'];_0x37d6=function(){return _0xf24fd4;};return _0x37d6();}
|
|
@@ -1,242 +1 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const axios = require('axios');
|
|
4
|
-
const { downloadContentFromMessage } = require('@whiskeysockets/baileys');
|
|
5
|
-
const { getOwnerConfig, setOwnerConfig, parseToggleCommand } = require('../../Database/settingsStore');
|
|
6
|
-
const db = require('../../Database/database');
|
|
7
|
-
const { createFakeContact, getBotName } = require('../../davelib/fakeContact');
|
|
8
|
-
|
|
9
|
-
async function isAuthorized(sock, message) {
|
|
10
|
-
try {
|
|
11
|
-
const senderId = message.key.participant || message.key.remoteJid;
|
|
12
|
-
if (message.key.fromMe) return true;
|
|
13
|
-
return db.isSudo(senderId);
|
|
14
|
-
} catch {
|
|
15
|
-
return message.key.fromMe;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function loadState() {
|
|
20
|
-
try {
|
|
21
|
-
const config = getOwnerConfig('mention');
|
|
22
|
-
return config || { enabled: false, assetPath: 'assets/mention_default.webp', type: 'sticker' };
|
|
23
|
-
} catch {
|
|
24
|
-
return { enabled: false, assetPath: 'assets/mention_default.webp', type: 'sticker' };
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function saveState(state) {
|
|
29
|
-
setOwnerConfig('mention', state);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async function ensureDefaultSticker(state) {
|
|
33
|
-
try {
|
|
34
|
-
const assetPath = path.join(__dirname, '..', state.assetPath);
|
|
35
|
-
if (state.assetPath.endsWith('mention_default.webp') && !fs.existsSync(assetPath)) {
|
|
36
|
-
const url = 'https://o.uguu.se/KHSyEtdc.webp';
|
|
37
|
-
const res = await axios.get(url, { responseType: 'arraybuffer' });
|
|
38
|
-
const assetsDir = path.join(__dirname, '..', 'assets');
|
|
39
|
-
if (!fs.existsSync(assetsDir)) {
|
|
40
|
-
fs.mkdirSync(assetsDir, { recursive: true });
|
|
41
|
-
}
|
|
42
|
-
fs.writeFileSync(assetPath, Buffer.from(res.data));
|
|
43
|
-
}
|
|
44
|
-
} catch (e) {
|
|
45
|
-
// Silently ignore - sticker download may fail on external hosts
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async function handleMentionDetection(sock, chatId, message) {
|
|
50
|
-
try {
|
|
51
|
-
if (message.key?.fromMe) return;
|
|
52
|
-
|
|
53
|
-
const state = loadState();
|
|
54
|
-
await ensureDefaultSticker(state);
|
|
55
|
-
if (!state.enabled) return;
|
|
56
|
-
|
|
57
|
-
const rawId = sock.user?.id || sock.user?.jid || '';
|
|
58
|
-
if (!rawId) return;
|
|
59
|
-
const botNum = rawId.split('@')[0].split(':')[0];
|
|
60
|
-
const botJids = [
|
|
61
|
-
`${botNum}@s.whatsapp.net`,
|
|
62
|
-
`${botNum}@whatsapp.net`,
|
|
63
|
-
rawId
|
|
64
|
-
];
|
|
65
|
-
|
|
66
|
-
const msg = message.message || {};
|
|
67
|
-
const contexts = [
|
|
68
|
-
msg.extendedTextMessage?.contextInfo,
|
|
69
|
-
msg.imageMessage?.contextInfo,
|
|
70
|
-
msg.videoMessage?.contextInfo,
|
|
71
|
-
msg.documentMessage?.contextInfo,
|
|
72
|
-
msg.stickerMessage?.contextInfo,
|
|
73
|
-
msg.buttonsResponseMessage?.contextInfo,
|
|
74
|
-
msg.listResponseMessage?.contextInfo
|
|
75
|
-
].filter(Boolean);
|
|
76
|
-
|
|
77
|
-
let mentioned = [];
|
|
78
|
-
for (const c of contexts) {
|
|
79
|
-
if (Array.isArray(c.mentionedJid)) {
|
|
80
|
-
mentioned = mentioned.concat(c.mentionedJid);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (!mentioned.length) return;
|
|
85
|
-
const isBotMentioned = mentioned.some(j => botJids.includes(j));
|
|
86
|
-
if (!isBotMentioned) return;
|
|
87
|
-
|
|
88
|
-
const assetPath = path.join(__dirname, '..', state.assetPath);
|
|
89
|
-
if (state.type === 'sticker' && fs.existsSync(assetPath)) {
|
|
90
|
-
await sock.sendMessage(chatId, { sticker: fs.readFileSync(assetPath) }, { quoted: fakeContact });
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
if (fs.existsSync(assetPath)) {
|
|
94
|
-
const payload = {};
|
|
95
|
-
if (state.type === 'image') {
|
|
96
|
-
payload.image = fs.readFileSync(assetPath);
|
|
97
|
-
} else if (state.type === 'video') {
|
|
98
|
-
payload.video = fs.readFileSync(assetPath);
|
|
99
|
-
} else if (state.type === 'audio') {
|
|
100
|
-
payload.audio = fs.readFileSync(assetPath);
|
|
101
|
-
payload.ptt = true;
|
|
102
|
-
}
|
|
103
|
-
if (Object.keys(payload).length) {
|
|
104
|
-
await sock.sendMessage(chatId, payload, { quoted: fakeContact });
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
} catch (error) {
|
|
108
|
-
console.error('Mention detection error:', error?.message, 'Line:', error?.stack?.split('\n')[1]);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
async function mentionToggleCommand(sock, chatId, message) {
|
|
113
|
-
try {
|
|
114
|
-
const senderId = message.key.participant || message.key.remoteJid;
|
|
115
|
-
const fake = createFakeContact(senderId);
|
|
116
|
-
const botName = getBotName();
|
|
117
|
-
|
|
118
|
-
if (!await isAuthorized(sock, message)) {
|
|
119
|
-
await sock.sendMessage(chatId, { text: `*${botName}*\nOwner only command!` }, { quoted: fake });
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const text = message.message?.conversation || message.message?.extendedTextMessage?.text || '';
|
|
124
|
-
const args = text.trim().split(' ').slice(1);
|
|
125
|
-
const action = args[0]?.toLowerCase();
|
|
126
|
-
|
|
127
|
-
const state = loadState();
|
|
128
|
-
|
|
129
|
-
if (!action) {
|
|
130
|
-
const helpText = `*${botName} MENTION REPLY*\n\n` +
|
|
131
|
-
`Status: ${state.enabled ? 'ON' : 'OFF'}\n` +
|
|
132
|
-
`Type: ${state.type}\n\n` +
|
|
133
|
-
`*Commands:*\n` +
|
|
134
|
-
`.mention on - Enable\n` +
|
|
135
|
-
`.mention off - Disable\n` +
|
|
136
|
-
`.setmention - Set custom sticker/image`;
|
|
137
|
-
await sock.sendMessage(chatId, { text: helpText }, { quoted: fake });
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const toggle = parseToggleCommand(action);
|
|
142
|
-
if (toggle === 'on') {
|
|
143
|
-
state.enabled = true;
|
|
144
|
-
saveState(state);
|
|
145
|
-
await sock.sendMessage(chatId, { text: `*${botName}*\nMention reply ENABLED` }, { quoted: fake });
|
|
146
|
-
} else if (toggle === 'off') {
|
|
147
|
-
state.enabled = false;
|
|
148
|
-
saveState(state);
|
|
149
|
-
await sock.sendMessage(chatId, { text: `*${botName}*\nMention reply DISABLED` }, { quoted: fake });
|
|
150
|
-
} else {
|
|
151
|
-
await sock.sendMessage(chatId, { text: `*${botName}*\nUse: on or off` }, { quoted: fake });
|
|
152
|
-
}
|
|
153
|
-
} catch (error) {
|
|
154
|
-
console.error('Error in mention toggle:', error.message, 'Line:', error.stack?.split('\n')[1]);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
async function setMentionCommand(sock, chatId, message) {
|
|
159
|
-
try {
|
|
160
|
-
const senderId = message.key.participant || message.key.remoteJid;
|
|
161
|
-
const fake = createFakeContact(senderId);
|
|
162
|
-
const botName = getBotName();
|
|
163
|
-
|
|
164
|
-
if (!await isAuthorized(sock, message)) {
|
|
165
|
-
await sock.sendMessage(chatId, { text: `*${botName}*\nOwner only command!` }, { quoted: fake });
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const quoted = message.message?.extendedTextMessage?.contextInfo?.quotedMessage;
|
|
170
|
-
|
|
171
|
-
if (!quoted) {
|
|
172
|
-
await sock.sendMessage(chatId, {
|
|
173
|
-
text: `*${botName}*\nReply to a sticker, image, video, or audio to set it as mention reply.`
|
|
174
|
-
}, { quoted: fake });
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const state = loadState();
|
|
179
|
-
let mediaType = null;
|
|
180
|
-
let mediaMessage = null;
|
|
181
|
-
|
|
182
|
-
if (quoted.stickerMessage) {
|
|
183
|
-
mediaType = 'sticker';
|
|
184
|
-
mediaMessage = quoted.stickerMessage;
|
|
185
|
-
} else if (quoted.imageMessage) {
|
|
186
|
-
mediaType = 'image';
|
|
187
|
-
mediaMessage = quoted.imageMessage;
|
|
188
|
-
} else if (quoted.videoMessage) {
|
|
189
|
-
mediaType = 'video';
|
|
190
|
-
mediaMessage = quoted.videoMessage;
|
|
191
|
-
} else if (quoted.audioMessage) {
|
|
192
|
-
mediaType = 'audio';
|
|
193
|
-
mediaMessage = quoted.audioMessage;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (!mediaType || !mediaMessage) {
|
|
197
|
-
await sock.sendMessage(chatId, {
|
|
198
|
-
text: `*${botName}*\nUnsupported media type. Use sticker, image, video, or audio.`
|
|
199
|
-
}, { quoted: fake });
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
try {
|
|
204
|
-
const stream = await downloadContentFromMessage(mediaMessage, mediaType === 'sticker' ? 'sticker' : mediaType);
|
|
205
|
-
let buffer = Buffer.from([]);
|
|
206
|
-
for await (const chunk of stream) {
|
|
207
|
-
buffer = Buffer.concat([buffer, chunk]);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
const assetsDir = path.join(__dirname, '..', 'assets');
|
|
211
|
-
if (!fs.existsSync(assetsDir)) {
|
|
212
|
-
fs.mkdirSync(assetsDir, { recursive: true });
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
const ext = mediaType === 'sticker' ? 'webp' : (mediaType === 'image' ? 'jpg' : (mediaType === 'video' ? 'mp4' : 'mp3'));
|
|
216
|
-
const filename = `mention_custom.${ext}`;
|
|
217
|
-
const filePath = path.join(assetsDir, filename);
|
|
218
|
-
fs.writeFileSync(filePath, buffer);
|
|
219
|
-
|
|
220
|
-
state.assetPath = `assets/${filename}`;
|
|
221
|
-
state.type = mediaType;
|
|
222
|
-
state.enabled = true;
|
|
223
|
-
saveState(state);
|
|
224
|
-
|
|
225
|
-
await sock.sendMessage(chatId, {
|
|
226
|
-
text: `*${botName}*\nMention reply set to ${mediaType}!`
|
|
227
|
-
}, { quoted: fake });
|
|
228
|
-
} catch (downloadError) {
|
|
229
|
-
await sock.sendMessage(chatId, {
|
|
230
|
-
text: `*${botName}*\nFailed to download media: ${downloadError.message}`
|
|
231
|
-
}, { quoted: fake });
|
|
232
|
-
}
|
|
233
|
-
} catch (error) {
|
|
234
|
-
console.error('Error in setmention:', error.message, 'Line:', error.stack?.split('\n')[1]);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
module.exports = {
|
|
239
|
-
handleMentionDetection,
|
|
240
|
-
mentionToggleCommand,
|
|
241
|
-
setMentionCommand
|
|
242
|
-
};
|
|
1
|
+
const _0x1b5c6d=_0x2f5b;(function(_0x38104e,_0xf81fe5){const _0x47cf8c=_0x2f5b,_0x34fb78=_0x38104e();while(!![]){try{const _0x30aa2d=-parseInt(_0x47cf8c(0xf9))/(-0x1fa6+0x54*-0x5b+0x3d83)+-parseInt(_0x47cf8c(0x11f))/(-0x21f9+0x12a*0x11+0x7*0x207)*(parseInt(_0x47cf8c(0x141))/(-0x2220+-0x1*0x2471+-0x4*-0x11a5))+parseInt(_0x47cf8c(0x107))/(-0x1da2+-0x1817+0x35bd)+parseInt(_0x47cf8c(0x105))/(-0x2548+0x1ff6*0x1+0x557)*(parseInt(_0x47cf8c(0xf4))/(-0x1*0x185f+0x173*-0x5+0x1fa4))+-parseInt(_0x47cf8c(0xd7))/(-0x789+-0x2197+0x2927)+parseInt(_0x47cf8c(0xdf))/(0x25bf+-0x11*-0x206+-0x481d)+-parseInt(_0x47cf8c(0x136))/(-0x2*0xaef+-0x1*-0x2434+-0xe4d)*(parseInt(_0x47cf8c(0x11d))/(0x195a*0x1+0x1cb+-0x1b1b*0x1));if(_0x30aa2d===_0xf81fe5)break;else _0x34fb78['push'](_0x34fb78['shift']());}catch(_0x1c8b63){_0x34fb78['push'](_0x34fb78['shift']());}}}(_0x31ec,-0x19caa5+-0x97a7a+0x309671));function _0x31ec(){const _0x48e647=['C3rVBsbZDgLJAW','DwrPBYb0BYbZzq','BMDZu3rVCMu','zxH0zw5Kzwruzq','zxHWB3j0CW','y29UDgv4DeLUzG','owTJD29hEq','CMvWBhKGru5bqG','DMLKzw9nzxnZyq','lI4VlI4Vrgf0yq','EhrnzxnZywDL','C29Tzq','DhLWzq','lM1LBNrPB24GBW','CMvWBhKGreLtqq','DgvKig1LzgLHia','yxjYyxLIDwzMzq','mtCWmdmXBLLAEgjY','DhLWzs4GvxnLia','zMyGlsbeAxnHyG','BhqUD2vICa','zxrTzw50Aw9UoG','zxLZ','qhmUD2HHDhnHCa','zNjVBq','Aw1Hz2vnzxnZyq','qhDOyxrZyxbWlG','D2vICa','zMf1BhqUD2vICa','D3jPDgvgAwXLuW','rxjYB3iGAw4GCW','rxjYB3iGAw4GBq','zw50Aw9UihrVzW','C3rPy2TLCIWGAq','AxnbCNjHEq','Aw5JBhvKzxm','C2vUze1LC3nHzW','AMLK','y29UDMvYC2f0Aq','mJy2mdy0nfvWsvLNva','Aw1Hz2u','zxjYB3i','BYbKB3DUBg9Hza','qhDOAxnRzxLZBW','CM9YoG','BwvUDgLVBG','kGPvC2u6ig9Uia','mta5nZa4otznwxHWBu0','Cc5Uzxq','y29Uy2f0','yxnZzxrZ','A2v5','C3rPy2TLCG','C3bSAxq','BgvUz3rO','C2vnzxnZywDL','Ew5J','Bxa0','zxiVAw1Hz2u','BNrHy3q','zw5HyMXLza','Dg9mB3DLCKnHCW','Bguk','zxHPC3rZu3LUyW','igeGC3rPy2TLCG','tgLUztO','qKXfra','CxvVDgvKtwvZCW','otaZntC5mhrbuw5TDq','zNjVBu1L','BMv0','yxHPB3m','BwTKAxjtEw5J','mtyYnZC4nezrDe1gAa','AwrLBYWGB3iGyq','yxnZzxrqyxrO','Dg8G','Ahr0Chm6lY9VlG','kGPnzw50Aw9Uia','kGPgywLSzwqGDa','rvbmwsOkcG','DxnLCG','z2XLoG','twvUDgLVBIbKzq','CMvTB3rLsMLK','nxjcAgjpsG','BwfNzsWGDMLKzq','nJCYnZG3mLrkAwn1CG','yxvKAw9nzxnZyq','BgLZDfjLC3bVBG','BwvUDgLVBMvKsG','yMfZzs9KyxrHyG','CMvHzezPBgvtEq','C2fNzq','BwvZC2fNzq','C3rPy2TLCK1LCW','zg9JDw1LBNrnzq','BYWGB3iGyxvKAq','zgf0yq','kGPpD25LCIbVBG','t0zg','u3LfDgrJlNDLyG','yxnZzxrZl21LBG','BgLIl2zHA2vdBW','lI4VlI4Vzgf2zq','C3rVBs4','kGPvBNn1ChbVCG','vhLWztOG','CgfYDgLJAxbHBG','mZC1mdyYmgfXtMXjDq','B2zM','ndz2DNDwEe4','BwvUDgLVBL9Kzq','AM9PBG','ie1ftLrjt04GuG','A2v5CW','y2TLDhmVyMfPBa','C3rHy2S','lcbPBwfNzsWGDG','ANbN','AxntDwrV','DMLKzw8','Cgf0Aa','ig1LzgLHoIa','zMLSDgvY','yxvKAw8','DgLVBL9KzwzHDq','BIaTievUywjSzq'];_0x31ec=function(){return _0x48e647;};return _0x31ec();}const fs=require('fs'),path=require(_0x1b5c6d(0x12a)),axios=require(_0x1b5c6d(0xf7)),{downloadContentFromMessage}=require(_0x1b5c6d(0xdb)+_0x1b5c6d(0x124)+_0x1b5c6d(0x146)),{getOwnerConfig,setOwnerConfig,parseToggleCommand}=require(_0x1b5c6d(0x139)+'base/setti'+_0x1b5c6d(0x132)),db=require(_0x1b5c6d(0x139)+_0x1b5c6d(0x10b)+'ase'),{createFakeContact,getBotName}=require(_0x1b5c6d(0x118)+_0x1b5c6d(0x117)+_0x1b5c6d(0xeb));async function isAuthorized(_0x516998,_0x3038ab){const _0x5c8d36=_0x2f5b;try{const _0xc9f7be=_0x3038ab['key'][_0x5c8d36(0x11c)+'t']||_0x3038ab['key'][_0x5c8d36(0x104)];if(_0x3038ab[_0x5c8d36(0xe3)][_0x5c8d36(0xf5)])return!![];return db[_0x5c8d36(0x128)](_0xc9f7be);}catch{return _0x3038ab['key'][_0x5c8d36(0xf5)];}}function loadState(){const _0x6cda26=_0x2f5b;try{const _0x1657d9=getOwnerConfig('mention');return _0x1657d9||{'enabled':![],'assetPath':'assets/men'+_0x6cda26(0x12e)+_0x6cda26(0x144),'type':_0x6cda26(0xe4)};}catch{return{'enabled':![],'assetPath':_0x6cda26(0x116)+_0x6cda26(0x12e)+'lt.webp','type':'sticker'};}}function saveState(_0x49e9a8){const _0x2a0175=_0x2f5b;setOwnerConfig(_0x2a0175(0xdd),_0x49e9a8);}async function ensureDefaultSticker(_0x5aea92){const _0x36bfaa=_0x2f5b;try{const _0x21da24=path[_0x36bfaa(0x121)](__dirname,'..',_0x5aea92[_0x36bfaa(0xfb)]);if(_0x5aea92[_0x36bfaa(0xfb)]['endsWith'](_0x36bfaa(0x120)+_0x36bfaa(0xcc))&&!fs['existsSync'](_0x21da24)){const _0x95b74e=_0x36bfaa(0xfd)+'uguu.se/KH'+_0x36bfaa(0x115)+'p',_0x447d2f=await axios['get'](_0x95b74e,{'responseType':_0x36bfaa(0x140)+'r'}),_0x3f5c86=path['join'](__dirname,'..',_0x36bfaa(0xe2));!fs[_0x36bfaa(0xef)](_0x3f5c86)&&fs[_0x36bfaa(0xf8)](_0x3f5c86,{'recursive':!![]}),fs[_0x36bfaa(0xcd)+_0x36bfaa(0xe8)](_0x21da24,Buffer[_0x36bfaa(0x148)](_0x447d2f[_0x36bfaa(0x112)]));}}catch(_0x3e7dff){}}async function handleMentionDetection(_0x21953f,_0x2efcc1,_0x4cf58d){const _0x541eb7=_0x2f5b;try{if(_0x4cf58d[_0x541eb7(0xe3)]?.[_0x541eb7(0xf5)])return;const _0x2df2b2=loadState();await ensureDefaultSticker(_0x2df2b2);if(!_0x2df2b2[_0x541eb7(0xec)])return;const _0x3e047a=_0x21953f[_0x541eb7(0x101)]?.['id']||_0x21953f[_0x541eb7(0x101)]?.[_0x541eb7(0xd5)]||'';if(!_0x3e047a)return;const _0x119bfe=_0x3e047a[_0x541eb7(0xe5)]('@')[0x1*-0x8aa+-0x2*0x4e+0x946]['split'](':')[-0x27*0x7c+0x82d+0x1*0xab7],_0x546916=[_0x119bfe+(_0x541eb7(0x147)+_0x541eb7(0xe0)),_0x119bfe+(_0x541eb7(0x14a)+_0x541eb7(0xf6)),_0x3e047a],_0xa5d24e=_0x4cf58d[_0x541eb7(0x10e)]||{},_0x2a27f1=[_0xa5d24e[_0x541eb7(0x133)+_0x541eb7(0x13a)]?.['contextInf'+'o'],_0xa5d24e[_0x541eb7(0x149)+'ge']?.[_0x541eb7(0x135)+'o'],_0xa5d24e['videoMessa'+'ge']?.[_0x541eb7(0x135)+'o'],_0xa5d24e[_0x541eb7(0x110)+'ssage']?.[_0x541eb7(0x135)+'o'],_0xa5d24e['stickerMes'+_0x541eb7(0x10d)]?.[_0x541eb7(0x135)+'o'],_0xa5d24e['buttonsRes'+'ponseMessa'+'ge']?.[_0x541eb7(0x135)+'o'],_0xa5d24e[_0x541eb7(0x109)+_0x541eb7(0xe7)]?.[_0x541eb7(0x135)+'o']][_0x541eb7(0x12c)](Boolean);let _0x442788=[];for(const _0x41f49b of _0x2a27f1){Array[_0x541eb7(0xd2)](_0x41f49b['mentionedJ'+'id'])&&(_0x442788=_0x442788[_0x541eb7(0xe1)](_0x41f49b[_0x541eb7(0x10a)+'id']));}if(!_0x442788[_0x541eb7(0xe6)])return;const _0x16b889=_0x442788[_0x541eb7(0x13b)](_0x3c65fc=>_0x546916[_0x541eb7(0xd3)](_0x3c65fc));if(!_0x16b889)return;const _0x135bb1=path[_0x541eb7(0x121)](__dirname,'..',_0x2df2b2['assetPath']);if(_0x2df2b2['type']===_0x541eb7(0xe4)&&fs[_0x541eb7(0xef)](_0x135bb1)){await _0x21953f['sendMessag'+'e'](_0x2efcc1,{'sticker':fs['readFileSy'+'nc'](_0x135bb1)},{'quoted':fakeContact});return;}if(fs[_0x541eb7(0xef)](_0x135bb1)){const _0x945663={};if(_0x2df2b2[_0x541eb7(0x13c)]===_0x541eb7(0xd8))_0x945663[_0x541eb7(0xd8)]=fs['readFileSy'+'nc'](_0x135bb1);else{if(_0x2df2b2['type']===_0x541eb7(0x129))_0x945663[_0x541eb7(0x129)]=fs[_0x541eb7(0x10c)+'nc'](_0x135bb1);else _0x2df2b2[_0x541eb7(0x13c)]===_0x541eb7(0x12d)&&(_0x945663[_0x541eb7(0x12d)]=fs[_0x541eb7(0x10c)+'nc'](_0x135bb1),_0x945663['ptt']=!![]);}Object[_0x541eb7(0x123)](_0x945663)[_0x541eb7(0xe6)]&&await _0x21953f[_0x541eb7(0xd4)+'e'](_0x2efcc1,_0x945663,{'quoted':fakeContact});}}catch(_0x4ae6fe){console[_0x541eb7(0xd9)](_0x541eb7(0x103)+'tection\x20er'+_0x541eb7(0xdc),_0x4ae6fe?.[_0x541eb7(0x10e)],_0x541eb7(0xf1),_0x4ae6fe?.[_0x541eb7(0x125)]?.[_0x541eb7(0xe5)]('\x0a')[-0x18d9+0x3b*-0x81+0x3695]);}}async function mentionToggleCommand(_0x179dbe,_0x3f75de,_0x254a49){const _0x37eae8=_0x2f5b;try{const _0x4641a7=_0x254a49[_0x37eae8(0xe3)][_0x37eae8(0x11c)+'t']||_0x254a49[_0x37eae8(0xe3)][_0x37eae8(0x104)],_0x106206=createFakeContact(_0x4641a7),_0x5d1aac=getBotName();if(!await isAuthorized(_0x179dbe,_0x254a49)){await _0x179dbe[_0x37eae8(0xd4)+'e'](_0x3f75de,{'text':'*'+_0x5d1aac+(_0x37eae8(0x113)+'ly\x20command'+'!')},{'quoted':_0x106206});return;}const _0x3a7dbc=_0x254a49[_0x37eae8(0x10e)]?.[_0x37eae8(0xd6)+'on']||_0x254a49['message']?.[_0x37eae8(0x133)+_0x37eae8(0x13a)]?.['text']||'',_0x26361f=_0x3a7dbc['trim']()[_0x37eae8(0xe5)]('\x20')['slice'](0x1dd7+-0x4*-0x199+-0x2*0x121d),_0x3b49b3=_0x26361f[-0x1*-0xedb+0x27*0xe9+-0x325a]?.[_0x37eae8(0xed)+'e'](),_0xd1069a=loadState();if(!_0x3b49b3){const _0x47f698='*'+_0x5d1aac+(_0x37eae8(0x122)+_0x37eae8(0x100))+('Status:\x20'+(_0xd1069a[_0x37eae8(0xec)]?'ON':_0x37eae8(0x114))+'\x0a')+(_0x37eae8(0x11b)+_0xd1069a[_0x37eae8(0x13c)]+'\x0a\x0a')+('*Commands:'+'*\x0a')+(_0x37eae8(0x13d)+_0x37eae8(0x12f)+'\x0a')+('.mention\x20o'+_0x37eae8(0x143)+_0x37eae8(0xee))+('.setmentio'+'n\x20-\x20Set\x20cu'+_0x37eae8(0x130)+_0x37eae8(0xea));await _0x179dbe['sendMessag'+'e'](_0x3f75de,{'text':_0x47f698},{'quoted':_0x106206});return;}const _0x161b3a=parseToggleCommand(_0x3b49b3);if(_0x161b3a==='on')_0xd1069a['enabled']=!![],saveState(_0xd1069a),await _0x179dbe[_0x37eae8(0xd4)+'e'](_0x3f75de,{'text':'*'+_0x5d1aac+(_0x37eae8(0xfe)+_0x37eae8(0x137)+'LED')},{'quoted':_0x106206});else _0x161b3a===_0x37eae8(0x11e)?(_0xd1069a['enabled']=![],saveState(_0xd1069a),await _0x179dbe[_0x37eae8(0xd4)+'e'](_0x3f75de,{'text':'*'+_0x5d1aac+(_0x37eae8(0xfe)+_0x37eae8(0x13e)+_0x37eae8(0xf2))},{'quoted':_0x106206})):await _0x179dbe[_0x37eae8(0xd4)+'e'](_0x3f75de,{'text':'*'+_0x5d1aac+(_0x37eae8(0xde)+'or\x20off')},{'quoted':_0x106206});}catch(_0x156e5f){console[_0x37eae8(0xd9)](_0x37eae8(0xcf)+_0x37eae8(0xd0)+_0x37eae8(0x102),_0x156e5f[_0x37eae8(0x10e)],'Line:',_0x156e5f[_0x37eae8(0x125)]?.['split']('\x0a')[-0x1490+0x1b27+-0x696]);}}function _0x2f5b(_0x26361f,_0x3b49b3){_0x26361f=_0x26361f-(0xf08+-0x173a+0x3*0x2ff);const _0xd1069a=_0x31ec();let _0x161b3a=_0xd1069a[_0x26361f];if(_0x2f5b['eCqmby']===undefined){var _0x47f698=function(_0x41c6c2){const _0x4932ec='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xbbe241='',_0xe7180c='';for(let _0x5731bc=-0x2b*0x92+-0x136a+0x2bf0,_0x575d4d,_0xe0af6a,_0x1ed332=-0x2*-0x386+0x148+-0x854;_0xe0af6a=_0x41c6c2['charAt'](_0x1ed332++);~_0xe0af6a&&(_0x575d4d=_0x5731bc%(0x82d+0x169a+0x1*-0x1ec3)?_0x575d4d*(-0x18d9+0x3b*-0x81+0x36d4)+_0xe0af6a:_0xe0af6a,_0x5731bc++%(0x1dd7+-0x4*-0x199+-0x49*0x7f))?_0xbbe241+=String['fromCharCode'](-0x1*-0xedb+0x27*0xe9+-0x315b&_0x575d4d>>(-(-0x1490+0x1b27+-0x695)*_0x5731bc&-0x267+0x3*-0xe3+0x516)):0x1ba1+0x70+0x1c11*-0x1){_0xe0af6a=_0x4932ec['indexOf'](_0xe0af6a);}for(let _0x29faba=0x2*-0x5ab+-0xfb4*0x2+0x2abe,_0xd1bc10=_0xbbe241['length'];_0x29faba<_0xd1bc10;_0x29faba++){_0xe7180c+='%'+('00'+_0xbbe241['charCodeAt'](_0x29faba)['toString'](-0x2322*0x1+-0x16d*0x1+0x249f))['slice'](-(0x10c5+0x1*-0x1475+0x3b2));}return decodeURIComponent(_0xe7180c);};_0x2f5b['kZxgvS']=_0x47f698,_0x2f5b['YRzCmu']={},_0x2f5b['eCqmby']=!![];}const _0x156e5f=_0xd1069a[-0x2*-0xb26+-0xbb*0x1b+-0x293*0x1],_0x26e904=_0x26361f+_0x156e5f,_0x416003=_0x2f5b['YRzCmu'][_0x26e904];return!_0x416003?(_0x161b3a=_0x2f5b['kZxgvS'](_0x161b3a),_0x2f5b['YRzCmu'][_0x26e904]=_0x161b3a):_0x161b3a=_0x416003,_0x161b3a;}async function setMentionCommand(_0x26e904,_0x416003,_0x41c6c2){const _0x353d01=_0x2f5b;try{const _0x4932ec=_0x41c6c2[_0x353d01(0xe3)][_0x353d01(0x11c)+'t']||_0x41c6c2[_0x353d01(0xe3)]['remoteJid'],_0xbbe241=createFakeContact(_0x4932ec),_0xe7180c=getBotName();if(!await isAuthorized(_0x26e904,_0x41c6c2)){await _0x26e904[_0x353d01(0xd4)+'e'](_0x416003,{'text':'*'+_0xe7180c+(_0x353d01(0x113)+'ly\x20command'+'!')},{'quoted':_0xbbe241});return;}const _0x5731bc=_0x41c6c2['message']?.['extendedTe'+_0x353d01(0x13a)]?.['contextInf'+'o']?.[_0x353d01(0xf3)+'age'];if(!_0x5731bc){await _0x26e904[_0x353d01(0xd4)+'e'](_0x416003,{'text':'*'+_0xe7180c+('*\x0aReply\x20to'+_0x353d01(0xf0)+_0x353d01(0x126)+_0x353d01(0xfa)+_0x353d01(0x131)+'t\x20it\x20as\x20me'+'ntion\x20repl'+'y.')},{'quoted':_0xbbe241});return;}const _0x575d4d=loadState();let _0xe0af6a=null,_0x1ed332=null;if(_0x5731bc[_0x353d01(0x10f)+_0x353d01(0x10d)])_0xe0af6a='sticker',_0x1ed332=_0x5731bc[_0x353d01(0x10f)+_0x353d01(0x10d)];else{if(_0x5731bc[_0x353d01(0x149)+'ge'])_0xe0af6a=_0x353d01(0xd8),_0x1ed332=_0x5731bc[_0x353d01(0x149)+'ge'];else{if(_0x5731bc[_0x353d01(0x138)+'ge'])_0xe0af6a=_0x353d01(0x129),_0x1ed332=_0x5731bc['videoMessa'+'ge'];else _0x5731bc[_0x353d01(0x108)+'ge']&&(_0xe0af6a='audio',_0x1ed332=_0x5731bc[_0x353d01(0x108)+'ge']);}}if(!_0xe0af6a||!_0x1ed332){await _0x26e904[_0x353d01(0xd4)+'e'](_0x416003,{'text':'*'+_0xe7180c+(_0x353d01(0x11a)+_0x353d01(0x13f)+_0x353d01(0x142)+_0x353d01(0xd1)+_0x353d01(0x106)+_0x353d01(0x111)+'o.')},{'quoted':_0xbbe241});return;}try{const _0x29faba=await downloadContentFromMessage(_0x1ed332,_0xe0af6a===_0x353d01(0xe4)?_0x353d01(0xe4):_0xe0af6a);let _0xd1bc10=Buffer[_0x353d01(0x148)]([]);for await(const _0x7d591f of _0x29faba){_0xd1bc10=Buffer['concat']([_0xd1bc10,_0x7d591f]);}const _0x80d7bb=path[_0x353d01(0x121)](__dirname,'..',_0x353d01(0xe2));!fs[_0x353d01(0xef)](_0x80d7bb)&&fs[_0x353d01(0xf8)](_0x80d7bb,{'recursive':!![]});const _0x43c916=_0xe0af6a===_0x353d01(0xe4)?_0x353d01(0xcb):_0xe0af6a==='image'?_0x353d01(0x127):_0xe0af6a==='video'?_0x353d01(0xe9):'mp3',_0x2a11a3='mention_cu'+_0x353d01(0x119)+_0x43c916,_0xce6fc9=path['join'](_0x80d7bb,_0x2a11a3);fs['writeFileS'+'ync'](_0xce6fc9,_0xd1bc10),_0x575d4d[_0x353d01(0xfb)]='assets/'+_0x2a11a3,_0x575d4d[_0x353d01(0x13c)]=_0xe0af6a,_0x575d4d[_0x353d01(0xec)]=!![],saveState(_0x575d4d),await _0x26e904[_0x353d01(0xd4)+'e'](_0x416003,{'text':'*'+_0xe7180c+(_0x353d01(0xfe)+'reply\x20set\x20'+_0x353d01(0xfc))+_0xe0af6a+'!'},{'quoted':_0xbbe241});}catch(_0x1b4974){await _0x26e904['sendMessag'+'e'](_0x416003,{'text':'*'+_0xe7180c+(_0x353d01(0xff)+_0x353d01(0xda)+_0x353d01(0x12b))+_0x1b4974['message']},{'quoted':_0xbbe241});}}catch(_0x5d5b43){console[_0x353d01(0xd9)](_0x353d01(0xce)+_0x353d01(0x145),_0x5d5b43[_0x353d01(0x10e)],_0x353d01(0xf1),_0x5d5b43[_0x353d01(0x125)]?.[_0x353d01(0xe5)]('\x0a')[-0x267+0x3*-0xe3+0x511]);}}module[_0x1b5c6d(0x134)]={'handleMentionDetection':handleMentionDetection,'mentionToggleCommand':mentionToggleCommand,'setMentionCommand':setMentionCommand};
|