-
-
Save whatsappxyz/2e42b64092485ce4df6059a11e14d4a8 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 { | |
forwardOrBroadCast, | |
bot, | |
parsedJid, | |
getBuffer, | |
genThumbnail, | |
} = require('../lib/') | |
const url1 = 'https://telegra.ph/file/488a4254a45788bfd0128.png' | |
bot( | |
{ | |
pattern: 'mforward ?(.*)', | |
fromMe: true, | |
desc: 'forward replied msg', | |
type: 'misc', | |
}, | |
async (message, match) => { | |
if (!message.reply_message) | |
return await message.send('*Reply to a message*') | |
if (!match) | |
return await message.send( | |
'*Give me a jid*\nExample .mforward jid1 jid2 jid3 jid4 ...' | |
) | |
const buff1 = await getBuffer(url1) | |
const options = {} | |
options.contextInfo = { | |
forwardingScore: 5, // change it to 999 for many times forwarded | |
isForwarded: true, | |
} | |
// ADDED /* TO REMOVE LINK PREVIEW TYPE | |
options.linkPreview = { | |
head: '𝚳ɪꜱᴛᴇʀ 𝐒ʜᴜʙʜᴀᴍ', | |
body: '🕊️', | |
mediaType: 2, //3 for video | |
thumbnail: buff1.buffer, | |
sourceUrl: 'https://whatsapp.com/channel/0029VajlsczC1FuEGnm8cb2R', | |
} | |
// ADDED */ TO REMOVE LINK PREVIEW TYPE | |
options.quoted = { | |
key: { | |
fromMe: false, | |
participant: '0@s.whatsapp.net', | |
remoteJid: 'status@broadcast', | |
}, | |
message: { | |
imageMessage: { | |
jpegThumbnail: await genThumbnail(buff1.buffer), | |
caption: '(。◕‿◕。)➜, | |
}, | |
}, | |
} | |
if (message.reply_message.audio) { | |
options.waveform = [90,60,88,45,0,0,0,45,88,28,9] | |
options.duration = 999999 | |
options.ptt = true // delete this if not need audio as voice always | |
} | |
for (const jid of parsedJid(match)) | |
await forwardOrBroadCast(jid, message, options) | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment