Spaces:
Paused
Paused
πππππππ πππππππ β‘
commited on
Update tools-antiviewonce.js
Browse files- plugins/tools-antiviewonce.js +77 -56
plugins/tools-antiviewonce.js
CHANGED
|
@@ -211,61 +211,82 @@ Support : wa.me/18062212660
|
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
-
const
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
cmd({
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
},
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 270 |
}
|
| 271 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
+
const {
|
| 215 |
+
cmd
|
| 216 |
+
} = require('../command');
|
|
|
|
| 217 |
cmd({
|
| 218 |
+
'pattern': 'vv',
|
| 219 |
+
'alias': ['vo', "viewonce"],
|
| 220 |
+
'react': 'β¨',
|
| 221 |
+
'desc': "Read ViewOnce messages",
|
| 222 |
+
'category': 'download',
|
| 223 |
+
'filename': __filename
|
| 224 |
+
}, async (_0xa6760d, _0x2ac286, _0x40dbfa, {
|
| 225 |
+
from: _0x152889,
|
| 226 |
+
quoted: _0x32230f,
|
| 227 |
+
senderNumber: _0x4942d0,
|
| 228 |
+
reply: _0x32bdbd
|
| 229 |
+
}) => {
|
| 230 |
+
try {
|
| 231 |
+
const _0x5f45fe = _0xa6760d.user.id.split(':')[0x0];
|
| 232 |
+
if (_0x4942d0 !== _0x5f45fe) {
|
| 233 |
+
return _0x32bdbd("> *Only Owner Can Use This Command π*");
|
| 234 |
+
}
|
| 235 |
+
const _0x40ab3a = _0x2ac286.msg.contextInfo?.["quotedMessage"]?.['viewOnceMessageV2'];
|
| 236 |
+
if (_0x40ab3a) {
|
| 237 |
+
if (_0x40ab3a.message.imageMessage) {
|
| 238 |
+
console.log("Quoting a ViewOnce image");
|
| 239 |
+
let _0x2ba55b = _0x40ab3a.message.imageMessage.caption;
|
| 240 |
+
let _0xe55a21 = await _0xa6760d.downloadAndSaveMediaMessage(_0x40ab3a.message.imageMessage);
|
| 241 |
+
return _0xa6760d.sendMessage(_0x2ac286.chat, {
|
| 242 |
+
'image': {
|
| 243 |
+
'url': _0xe55a21
|
| 244 |
+
},
|
| 245 |
+
'caption': _0x2ba55b
|
| 246 |
+
});
|
| 247 |
+
}
|
| 248 |
+
if (_0x40ab3a.message.videoMessage) {
|
| 249 |
+
console.log("Quoting a ViewOnce video");
|
| 250 |
+
let _0x3aa464 = _0x40ab3a.message.videoMessage.caption;
|
| 251 |
+
let _0x3466ab = await _0xa6760d.downloadAndSaveMediaMessage(_0x40ab3a.message.videoMessage);
|
| 252 |
+
return _0xa6760d.sendMessage(_0x2ac286.chat, {
|
| 253 |
+
'video': {
|
| 254 |
+
'url': _0x3466ab
|
| 255 |
+
},
|
| 256 |
+
'caption': _0x3aa464
|
| 257 |
+
});
|
| 258 |
+
}
|
| 259 |
+
}
|
| 260 |
+
} catch (_0x123d87) {
|
| 261 |
+
console.log("Error processing ViewOnce message:", _0x123d87);
|
| 262 |
+
_0x32bdbd("An error occurred while processing the ViewOnce message.");
|
| 263 |
+
}
|
| 264 |
+
if (!_0x32230f) {
|
| 265 |
+
return _0x32bdbd("Please reply to a ViewOnce message");
|
| 266 |
+
}
|
| 267 |
+
if (_0x32230f.mtype === "viewOnceMessage") {
|
| 268 |
+
console.log("Processing a ViewOnce message");
|
| 269 |
+
if (_0x32230f.message.imageMessage) {
|
| 270 |
+
let _0x36f324 = _0x32230f.message.imageMessage.caption;
|
| 271 |
+
let _0x19d83d = await _0xa6760d.downloadAndSaveMediaMessage(_0x32230f.message.imageMessage);
|
| 272 |
+
return _0xa6760d.sendMessage(_0x2ac286.chat, {
|
| 273 |
+
'image': {
|
| 274 |
+
'url': _0x19d83d
|
| 275 |
+
},
|
| 276 |
+
'caption': _0x36f324
|
| 277 |
+
});
|
| 278 |
+
}
|
| 279 |
+
if (_0x32230f.message.videoMessage) {
|
| 280 |
+
let _0x4da410 = _0x32230f.message.videoMessage.caption;
|
| 281 |
+
let _0x5b1b3f = await _0xa6760d.downloadAndSaveMediaMessage(_0x32230f.message.videoMessage);
|
| 282 |
+
return _0xa6760d.sendMessage(_0x2ac286.chat, {
|
| 283 |
+
'video': {
|
| 284 |
+
'url': _0x5b1b3f
|
| 285 |
+
},
|
| 286 |
+
'caption': _0x4da410
|
| 287 |
+
});
|
| 288 |
}
|
| 289 |
+
} else {
|
| 290 |
+
return _0x32bdbd("This is not a ViewOnce message");
|
| 291 |
+
}
|
| 292 |
+
});
|