Upload case.js
Browse files
case.js
CHANGED
@@ -3987,6 +3987,43 @@ case 'mediafire': {
|
|
3987 |
}
|
3988 |
}
|
3989 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3990 |
case 'getjid': {
|
3991 |
reply(from)
|
3992 |
}
|
|
|
3987 |
}
|
3988 |
}
|
3989 |
break;
|
3990 |
+
case 'vv': {
|
3991 |
+
if (!m.quoted) {
|
3992 |
+
return reply(`*Reply to an image or video with the caption ${prefix + command}*\n> Video Duration: 1-9 Seconds`);
|
3993 |
+
}
|
3994 |
+
|
3995 |
+
let mime = (m.quoted.msg || m.quoted).mimetype || '';
|
3996 |
+
|
3997 |
+
try {
|
3998 |
+
if (/image/.test(mime)) {
|
3999 |
+
let media = await m.quoted.download();
|
4000 |
+
await conn.sendMessage(m.chat, {
|
4001 |
+
image: media,
|
4002 |
+
caption: fontx('📸 *View Once Image*'),
|
4003 |
+
viewOnce: true
|
4004 |
+
}, { quoted: m });
|
4005 |
+
|
4006 |
+
} else if (/video/.test(mime)) {
|
4007 |
+
if ((m.quoted.msg || m.quoted).seconds > 9) {
|
4008 |
+
return reply(`*Video duration must be 1-9 seconds!*\nReply to a shorter video with ${prefix + command}`);
|
4009 |
+
}
|
4010 |
+
let media = await m.quoted.download();
|
4011 |
+
await conn.sendMessage(m.chat, {
|
4012 |
+
video: media,
|
4013 |
+
caption: fontx('🎥 *View Once Video*'),
|
4014 |
+
viewOnce: true
|
4015 |
+
}, { quoted: m });
|
4016 |
+
|
4017 |
+
} else {
|
4018 |
+
reply(`*Unsupported media type!*\nReply to an image or video with the caption ${prefix + command}\n> Video Duration: 1-9 Seconds`);
|
4019 |
+
}
|
4020 |
+
} catch (err) {
|
4021 |
+
console.error('Error sending View Once media:', err);
|
4022 |
+
reply(`❌ Failed to send View Once media. Please try again.`);
|
4023 |
+
}
|
4024 |
+
|
4025 |
+
break;
|
4026 |
+
}
|
4027 |
case 'getjid': {
|
4028 |
reply(from)
|
4029 |
}
|