Skip to content

Instantly share code, notes, and snippets.

@maran-mods
Forked from A-d-i-t-h-y-a-n/mforward.js
Last active July 5, 2024 10:08
Show Gist options
  • Save maran-mods/cfa80091de51cd6bf6d5e177acf86c30 to your computer and use it in GitHub Desktop.
Save maran-mods/cfa80091de51cd6bf6d5e177acf86c30 to your computer and use it in GitHub Desktop.
const {
Function,
parsedJid,
getBuffer
} = require("../lib/");
const url1 = 'https://i.imgur.com/wZxPzLf.jpeg'
const url2 = 'https://i.imgur.com/Sy5e6kd.jpeg'
Function({
pattern: 'mforward ?(.*)',
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(https://i.imgur.com/wZxPzLf.jpeg)
const image2 = await getBuffer(https://i.imgur.com/Sy5e6kd.jpeg)
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: '', // insta link for video
sourceUrl: 'https://github.com/A-d-i-t-h-y-a-n',
showAdAttribution: true
}
options.filesize = 9999999999999;
options.quoted = {
key: {
fromMe: false,
participant: '0@s.whatsapp.net',
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