Spaces:
Paused
Paused
πππ₯π₯πππ π π¨ππππ₯π β‘
commited on
Create tools-antiviewonce.js
Browse files
plugins/tools-antiviewonce.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
const {
|
| 4 |
+
cmd,
|
| 5 |
+
commands
|
| 6 |
+
} = require("../command");
|
| 7 |
+
cmd({
|
| 8 |
+
'pattern': 'vv',
|
| 9 |
+
'alias': ['vo', "viewonce"],
|
| 10 |
+
'react': 'π',
|
| 11 |
+
'desc': "read vv",
|
| 12 |
+
'category': "download",
|
| 13 |
+
'filename': __filename
|
| 14 |
+
}, async (_0x596f5d, _0x12dce5, _0x13dcca, {
|
| 15 |
+
from: _0x3b2c6c,
|
| 16 |
+
quoted: _0x20898b,
|
| 17 |
+
body: _0xa19a3c,
|
| 18 |
+
isCmd: _0x328a9a,
|
| 19 |
+
command: _0x11d738,
|
| 20 |
+
args: _0x4325ad,
|
| 21 |
+
q: _0x35a40a,
|
| 22 |
+
isGroup: _0x49212c,
|
| 23 |
+
sender: _0x40a127,
|
| 24 |
+
senderNumber: _0x324f6b,
|
| 25 |
+
botNumber2: _0x1dd621,
|
| 26 |
+
botNumber: _0x516789,
|
| 27 |
+
pushname: _0x209c22,
|
| 28 |
+
isMe: _0x127392,
|
| 29 |
+
isOwner: _0x5ead44,
|
| 30 |
+
groupMetadata: _0x215d2a,
|
| 31 |
+
groupName: _0x17b2eb,
|
| 32 |
+
participants: _0x3ef935,
|
| 33 |
+
groupAdmins: _0x5ad39b,
|
| 34 |
+
isBotAdmins: _0xff4c67,
|
| 35 |
+
isAdmins: _0x38ea8e,
|
| 36 |
+
reply: _0x597c0c
|
| 37 |
+
}) => {
|
| 38 |
+
try {
|
| 39 |
+
const _0x5f2807 = _0x12dce5.msg.contextInfo?.["quotedMessage"]?.['viewOnceMessageV2'];
|
| 40 |
+
if (_0x5f2807) {
|
| 41 |
+
if (_0x5f2807.message.imageMessage) {
|
| 42 |
+
console.log("Quoting an image");
|
| 43 |
+
let _0x20acc9 = _0x5f2807.message.imageMessage.caption;
|
| 44 |
+
let _0x231c2e = await _0x596f5d.downloadAndSaveMediaMessage(_0x5f2807.message.imageMessage);
|
| 45 |
+
return _0x596f5d.sendMessage(_0x12dce5.chat, {
|
| 46 |
+
'image': {
|
| 47 |
+
'url': _0x231c2e
|
| 48 |
+
},
|
| 49 |
+
'caption': _0x20acc9
|
| 50 |
+
});
|
| 51 |
+
}
|
| 52 |
+
if (_0x5f2807.message.videoMessage) {
|
| 53 |
+
let _0x4a787f = _0x5f2807.message.videoMessage.caption;
|
| 54 |
+
let _0x3e85dc = await _0x596f5d.downloadAndSaveMediaMessage(_0x5f2807.message.videoMessage);
|
| 55 |
+
return _0x596f5d.sendMessage(_0x12dce5.chat, {
|
| 56 |
+
'video': {
|
| 57 |
+
'url': _0x3e85dc
|
| 58 |
+
},
|
| 59 |
+
'caption': _0x4a787f
|
| 60 |
+
});
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
} catch (_0xf27711) {
|
| 64 |
+
console.log("Error processing viewOnce message:", _0xf27711);
|
| 65 |
+
}
|
| 66 |
+
if (!_0x20898b) {
|
| 67 |
+
return _0x597c0c("Please reply to a ViewOnce message");
|
| 68 |
+
}
|
| 69 |
+
if (_0x20898b.mtype === "viewOnceMessage") {
|
| 70 |
+
console.log("Processing a ViewOnce message");
|
| 71 |
+
if (_0x20898b.message.imageMessage) {
|
| 72 |
+
let _0x508f06 = _0x20898b.message.imageMessage.caption;
|
| 73 |
+
let _0x117701 = await _0x596f5d.downloadAndSaveMediaMessage(_0x20898b.message.imageMessage);
|
| 74 |
+
return _0x596f5d.sendMessage(_0x12dce5.chat, {
|
| 75 |
+
'image': {
|
| 76 |
+
'url': _0x117701
|
| 77 |
+
},
|
| 78 |
+
'caption': _0x508f06
|
| 79 |
+
});
|
| 80 |
+
}
|
| 81 |
+
if (_0x20898b.message.videoMessage) {
|
| 82 |
+
let _0x233ce7 = _0x20898b.message.videoMessage.caption;
|
| 83 |
+
let _0x1f2aef = await _0x596f5d.downloadAndSaveMediaMessage(_0x20898b.message.videoMessage);
|
| 84 |
+
return _0x596f5d.sendMessage(_0x12dce5.chat, {
|
| 85 |
+
'video': {
|
| 86 |
+
'url': _0x1f2aef
|
| 87 |
+
},
|
| 88 |
+
'caption': _0x233ce7
|
| 89 |
+
});
|
| 90 |
+
}
|
| 91 |
+
} else {
|
| 92 |
+
return _0x597c0c("This is not a ViewOnce message");
|
| 93 |
+
}
|
| 94 |
+
});
|