Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case "swgrup": {
- const quoted = m.quoted ? m.quoted : m;
- const mime = (quoted.msg || quoted).mimetype || "";
- const caption = m.body.replace(/^\.swgrup\s*/i, "").trim();
- const jid = m.chat;
- if (/image/.test(mime)) {
- const buffer = await quoted.download();
- await sock.sendMessage(jid, {
- groupStatusMessage: {
- image: buffer,
- caption
- }
- });
- m.react("✅️")
- } else if (/video/.test(mime)) {
- const buffer = await quoted.download();
- await sock.sendMessage(jid, {
- groupStatusMessage: {
- video: buffer,
- caption
- }
- });
- m.react("✅️")
- } else if (/audio/.test(mime)) {
- const buffer = await quoted.download();
- await sock.sendMessage(jid, {
- groupStatusMessage: {
- audio: buffer
- }
- });
- m.react("✅️")
- } else if (caption) {
- await sock.sendMessage(jid, {
- groupStatusMessage: {
- text: caption
- }
- });
- m.react("✅️")
- } else {
- await reply(`reply media atau tambahkan teks.\nexample: ${prefix + command} (reply image/video/audio) hai ini saya`);
- }
- }
- break;
- // use baileys: "@whiskeysockets/baileys": "github:kiuur/baileys",
- // m.react also doesn't work, you can just delete it
Advertisement