Skip to content

Instantly share code, notes, and snippets.

@Vfcfc
Forked from A-d-i-t-h-y-a-n/mforward.js
Last active May 18, 2023 16:06
Show Gist options
  • Save Vfcfc/7c534c91fc9771f825ccc16f9cb95117 to your computer and use it in GitHub Desktop.
Save Vfcfc/7c534c91fc9771f825ccc16f9cb95117 to your computer and use it in GitHub Desktop.
const {
Function,
parsedJid,
getBuffer
} = require("../lib/");
const url1 = 'https://i.imgur.com/I9T0ck1.jpeg'
const url2 = 'https://i.imgur.com/I9T0ck1.jpeg'
Function({
pattern: 'vfcfc ?(.*)',
fromMe: true,
type: 'misc'
}, async (m, text, client) => {
if (!m.reply_message) return await m.reply('*Reply to a message*')
if (!text) return await m.reply('_Give me a jid_\n*Example .mforward jid1 jid2 jid3 jid4 ...*')
const image1 = await getBuffer(url1)
const image2 = await getBuffer(url2)
const options = {}
options.contextInfo = {
forwardingScore: 5, // change it to 999 for many times forwarded
isForwarded: false,
}
options.linkPreview = {
title: '⏤͟͟͞͞ ◉𝐕 𝐅 𝐂 𝐅 𝐂✵𝐇𝐘𝐏𝐄𝐑✵𝐁𝐎𝐓◉ ͟͞⏤',
body: '𝐌𝐚𝐝𝐞 𝐛𝐲 𝐚𝐝𝐞𝐞𝐧 𝐰𝐢𝐭𝐡 ★',
mediaType: 2,
thumbnail: image2,
mediaUrl: 'https://instagram.com/v_f_c_f_c_?igshid=ZGUzMzM3NWJiOQ==', // insta link for video
sourceUrl: 'https://instagram.com/v_f_c_f_c_?igshid=ZGUzMzM3NWJiOQ==',
showAdAttribution: true
}
options.filesize = 9999999999999;
options.quoted = {
key: {
fromMe: false,
participant: '[email protected]',
remoteJid: 'status@broadcast',
},
message: {
imageMessage: {
jpegThumbnail: image2,
caption: '𝐌𝐚𝐝𝐞 𝐛𝐲 𝐚𝐝𝐞𝐞𝐧 𝐰𝐢𝐭𝐡 ★',
},
},
}
if (/audio/.test(m.mine)) {
options.duration = 2000001355
options.ptt = true // delete this if not need audio as voice always
}
for (let jid of parsedJid(text)) {
await client.forwardMessage(jid, m.quoted_message, options)
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment