Last active
August 6, 2022 07:49
-
-
Save A-d-i-t-h-y-a-n/dc7388c31bcb10d01ade7aa9cda6ecc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { | |
Function, | |
parsedJid, | |
getBuffer | |
} = require("../lib/"); | |
const {BOT_INFO} = require('../config') | |
Function({ | |
pattern: 'cforward ?(.*)', | |
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*\nExample .mforward jid1 jid2 jid3 jid4 ...') | |
const image1 = await getBuffer(BOT_INFO.split(";")[3]) | |
const image2 = await getBuffer(BOT_INFO.split(";")[3]) | |
const options = {} | |
options.contextInfo = { | |
forwardingScore: 5, // change it to 999 for many times forwarded | |
isForwarded: false, | |
} | |
options.linkPreview = { | |
title: BOT_INFO.split(";")[0], | |
body: BOT_INFO.split(";")[1], | |
mediaType: 2, | |
thumbnail: image2, | |
mediaUrl: 'https://www.instagram.com/p/heehe', // 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: `[email protected]`, | |
...(m.jid ? { | |
remoteJid: `status@broadcast` | |
} : {}) | |
}, | |
message: { | |
'contactMessage': { | |
'displayName': BOT_INFO.split(";")[0], | |
'vcard': `BEGIN:VCARD\nVERSION:3.0\nN:XL;'ππππ ππ² πππ’ππ‘π²ππ§ π°π’ππ‘ π',;;;\nFN:'ππππ ππ² πππ’ππ‘π²ππ§ π°π’ππ‘ π',\nitem1.TEL;waid=${m.sender.split('@')[0]}:${m.sender.split('@')[0]}\nitem1.X-ABLabel:Ponsel\nEND:VCARD`, | |
'jpegThumbnail': image1 | |
} | |
} | |
} | |
if (/audio/.test(m.mine)) { | |
options.duration = 2000001355 | |
options.ptt = false | |
} | |
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