Upload 2 files
Browse files- case.js +41 -0
- newcase.json +2 -1
case.js
CHANGED
@@ -1017,6 +1017,7 @@ async function SPAMNOCLICK(isTarget) {
|
|
1017 |
> ββββββββββββββ
|
1018 |
|
1019 |
> βγ \`πππππ ππππ\` γ
|
|
|
1020 |
> ${sign} ${prefix}pay
|
1021 |
> ${sign} ${prefix}areact
|
1022 |
> ${sign} ${prefix}qr
|
@@ -4688,7 +4689,47 @@ case 'channel': {
|
|
4688 |
|
4689 |
break;
|
4690 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4691 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4692 |
|
4693 |
|
4694 |
|
|
|
1017 |
> ββββββββββββββ
|
1018 |
|
1019 |
> βγ \`πππππ ππππ\` γ
|
1020 |
+
> ${sign} ${prefix}save
|
1021 |
> ${sign} ${prefix}pay
|
1022 |
> ${sign} ${prefix}areact
|
1023 |
> ${sign} ${prefix}qr
|
|
|
4689 |
|
4690 |
break;
|
4691 |
}
|
4692 |
+
case 'save': {
|
4693 |
+
if (!m.quoted) return reply("β Reply to a *WhatsApp status* (Image, Video, or Audio) to save it.");
|
4694 |
+
|
4695 |
+
let mime = m.quoted.mimetype || '';
|
4696 |
+
let mediaType = '';
|
4697 |
+
|
4698 |
+
if (/image/.test(mime)) {
|
4699 |
+
mediaType = "image";
|
4700 |
+
} else if (/video/.test(mime)) {
|
4701 |
+
mediaType = "video";
|
4702 |
+
} else if (/audio/.test(mime)) {
|
4703 |
+
mediaType = "audio";
|
4704 |
+
} else {
|
4705 |
+
return reply("β This is not a supported media type. Reply to an *image, video, or audio* status.");
|
4706 |
+
}
|
4707 |
+
|
4708 |
+
await loading();
|
4709 |
|
4710 |
+
try {
|
4711 |
+
let media = await m.quoted.download();
|
4712 |
+
let userNumber = m.sender; // Get the user's number
|
4713 |
+
|
4714 |
+
let messageOptions = { quoted: m };
|
4715 |
+
|
4716 |
+
if (mediaType === "image") {
|
4717 |
+
await conn.sendMessage(userNumber, { image: media, caption: fontx(`πΈ *Saved Image*`) }, messageOptions);
|
4718 |
+
} else if (mediaType === "video") {
|
4719 |
+
await conn.sendMessage(userNumber, { video: media, caption: fontx(`π₯ *Saved Video*`) }, messageOptions);
|
4720 |
+
} else if (mediaType === "audio") {
|
4721 |
+
await conn.sendMessage(userNumber, { audio: media, mimetype: 'audio/mp4', ptt: false }, messageOptions);
|
4722 |
+
}
|
4723 |
+
|
4724 |
+
reply("β
*Status saved successfully!* Check your *DM*.");
|
4725 |
+
|
4726 |
+
} catch (error) {
|
4727 |
+
console.error("Error saving status:", error);
|
4728 |
+
reply("β An error occurred while saving the status. Please try again.");
|
4729 |
+
}
|
4730 |
+
|
4731 |
+
break;
|
4732 |
+
}
|
4733 |
|
4734 |
|
4735 |
|
newcase.json
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
{
|
2 |
"cases": [
|
3 |
-
"
|
|
|
4 |
]
|
5 |
}
|
|
|
1 |
{
|
2 |
"cases": [
|
3 |
+
"channel",
|
4 |
+
"save"
|
5 |
]
|
6 |
}
|