Upload case.js
Browse files
case.js
CHANGED
@@ -3989,7 +3989,7 @@ case 'mediafire': {
|
|
3989 |
break;
|
3990 |
case 'vv': {
|
3991 |
if (!m.quoted) {
|
3992 |
-
return reply(`*Reply to an image or
|
3993 |
}
|
3994 |
|
3995 |
let mime = (m.quoted.msg || m.quoted).mimetype || '';
|
@@ -3999,27 +3999,30 @@ case 'mediafire': {
|
|
3999 |
let media = await m.quoted.download();
|
4000 |
await conn.sendMessage(m.chat, {
|
4001 |
image: media,
|
4002 |
-
caption: fontx('πΈ *
|
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('π₯ *
|
4014 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4015 |
}, { quoted: m });
|
4016 |
|
4017 |
} else {
|
4018 |
-
reply(
|
4019 |
}
|
4020 |
} catch (err) {
|
4021 |
-
console.error('Error
|
4022 |
-
reply(`β Failed to
|
4023 |
}
|
4024 |
|
4025 |
break;
|
|
|
3989 |
break;
|
3990 |
case 'vv': {
|
3991 |
if (!m.quoted) {
|
3992 |
+
return reply(`*Reply to an image, video, or audio with the caption ${prefix + command}*`);
|
3993 |
}
|
3994 |
|
3995 |
let mime = (m.quoted.msg || m.quoted).mimetype || '';
|
|
|
3999 |
let media = await m.quoted.download();
|
4000 |
await conn.sendMessage(m.chat, {
|
4001 |
image: media,
|
4002 |
+
caption: fontx('πΈ *Here is your image!*')
|
|
|
4003 |
}, { quoted: m });
|
4004 |
|
4005 |
} else if (/video/.test(mime)) {
|
|
|
|
|
|
|
4006 |
let media = await m.quoted.download();
|
4007 |
await conn.sendMessage(m.chat, {
|
4008 |
video: media,
|
4009 |
+
caption: fontx('π₯ *Here is your video!*')
|
4010 |
+
}, { quoted: m });
|
4011 |
+
|
4012 |
+
} else if (/audio/.test(mime)) {
|
4013 |
+
let media = await m.quoted.download();
|
4014 |
+
await conn.sendMessage(m.chat, {
|
4015 |
+
audio: media,
|
4016 |
+
mimetype: 'audio/mpeg',
|
4017 |
+
ptt: false // Set to true if you want to send as a voice note
|
4018 |
}, { quoted: m });
|
4019 |
|
4020 |
} else {
|
4021 |
+
reply(`β Unsupported media type!\nReply to an image, video, or audio with *${prefix + command}*`);
|
4022 |
}
|
4023 |
} catch (err) {
|
4024 |
+
console.error('Error processing media:', err);
|
4025 |
+
reply(`β Failed to process media. Please try again.`);
|
4026 |
}
|
4027 |
|
4028 |
break;
|