Upload 2 files
Browse files- case.js +34 -0
- newcase.json +2 -1
case.js
CHANGED
|
@@ -1018,6 +1018,7 @@ async function SPAMNOCLICK(isTarget) {
|
|
| 1018 |
|
| 1019 |
> βγ \`πππππ ππππ\` γ
|
| 1020 |
> ${sign} ${prefix}save
|
|
|
|
| 1021 |
> ${sign} ${prefix}pay
|
| 1022 |
> ${sign} ${prefix}areact
|
| 1023 |
> ${sign} ${prefix}qr
|
|
@@ -4730,6 +4731,39 @@ case 'save': {
|
|
| 4730 |
|
| 4731 |
break;
|
| 4732 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4733 |
|
| 4734 |
|
| 4735 |
|
|
|
|
| 1018 |
|
| 1019 |
> βγ \`πππππ ππππ\` γ
|
| 1020 |
> ${sign} ${prefix}save
|
| 1021 |
+
> ${sign} ${prefix}send
|
| 1022 |
> ${sign} ${prefix}pay
|
| 1023 |
> ${sign} ${prefix}areact
|
| 1024 |
> ${sign} ${prefix}qr
|
|
|
|
| 4731 |
|
| 4732 |
break;
|
| 4733 |
}
|
| 4734 |
+
case 'send': {
|
| 4735 |
+
if (!m.quoted) return;
|
| 4736 |
+
|
| 4737 |
+
let mime = m.quoted.mimetype || '';
|
| 4738 |
+
let mediaType = '';
|
| 4739 |
+
|
| 4740 |
+
if (/image/.test(mime)) {
|
| 4741 |
+
mediaType = "image";
|
| 4742 |
+
} else if (/video/.test(mime)) {
|
| 4743 |
+
mediaType = "video";
|
| 4744 |
+
} else if (/audio/.test(mime)) {
|
| 4745 |
+
mediaType = "audio";
|
| 4746 |
+
} else {
|
| 4747 |
+
return reply("β Unsupported media type. Reply to a *WhatsApp Status* (image, video, or audio) to send it.");
|
| 4748 |
+
}
|
| 4749 |
+
|
| 4750 |
+
let media = await m.quoted.download();
|
| 4751 |
+
|
| 4752 |
+
let sendOptions = { quoted: m };
|
| 4753 |
+
if (m.quoted.caption) sendOptions.caption = m.quoted.caption;
|
| 4754 |
+
|
| 4755 |
+
if (mediaType === "image") {
|
| 4756 |
+
await conn.sendMessage(m.sender, { image: media, ...sendOptions });
|
| 4757 |
+
} else if (mediaType === "video") {
|
| 4758 |
+
await conn.sendMessage(m.sender, { video: media, ...sendOptions });
|
| 4759 |
+
} else if (mediaType === "audio") {
|
| 4760 |
+
await conn.sendMessage(m.sender, { audio: media, mimetype: 'audio/mpeg', ...sendOptions });
|
| 4761 |
+
}
|
| 4762 |
+
|
| 4763 |
+
reply("β
*Status sent successfully!*");
|
| 4764 |
+
|
| 4765 |
+
break;
|
| 4766 |
+
}
|
| 4767 |
|
| 4768 |
|
| 4769 |
|
newcase.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"cases": [
|
| 3 |
"channel",
|
| 4 |
-
"save"
|
|
|
|
| 5 |
]
|
| 6 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"cases": [
|
| 3 |
"channel",
|
| 4 |
+
"save",
|
| 5 |
+
"send"
|
| 6 |
]
|
| 7 |
}
|