Skip to content

Instantly share code, notes, and snippets.

@techgod143
Last active July 19, 2024 16:28
Show Gist options
  • Save techgod143/982eb1c395205065429e6e6c3d006fa7 to your computer and use it in GitHub Desktop.
Save techgod143/982eb1c395205065429e6e6c3d006fa7 to your computer and use it in GitHub Desktop.
Lyfe fd ofc
const {
forwardOrBroadCast, bot,
parsedJid,
getBuffer,
genThumbnail,
} = require('../lib/')
const url1 = 'https://telegra.ph/file/ebe7024e206e16e81dc86.jpg'
bot(
{
pattern: 'fd ?(.*)',
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 .fd jid1 jid2 jid3 jid4 ...'
)
const buff1 = await getBuffer(url1)
const options = {}
options.contextInfo = {
forwardingScore: 5, // change it to 999 for many times forwarded
isForwarded: false,
}
// ADDED /* TO REMOVE LINK PREVIEW TYPE
options.linkPreview = {
head: 'Tech God whatsapp channel +91 7466008456',
body: '😘Love you Dear my janu🤩',
mediaType: 3, //3 for video
thumbnail: buff1.buffer,
sourceUrl: 'https://whatsapp.com/channel/0029Va9Ufzi8kyyEnEHvOm1h',
}
// 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: '(っ◔◡◔)っ ♥ LOVE from Tech God ♥ ○●The WhatsApp King',
},
},
}
if (message.reply_message.audio) {
options.waveform = [90,60,88,45,0,0,0,45,88,28,9]
options.duration = 999999
options.ptt = false // 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