Skip to content

Instantly share code, notes, and snippets.

@techgod143
Last active April 7, 2024 07:26
Show Gist options
  • Save techgod143/75e528563fdaccef013defc4f33a9819 to your computer and use it in GitHub Desktop.
Save techgod143/75e528563fdaccef013defc4f33a9819 to your computer and use it in GitHub Desktop.
Lyfe FD
const {
forwardOrBroadCast,
bot,
parsedJid,
getBuffer,
} = require('../lib/')
const url1 = 'https://telegra.ph/file/ebe7024e206e16e81dc86.jpg'
const url2 = 'https://telegra.ph/file/ebe7024e206e16e81dc86.jpg'
bot(
{
pattern: 'fd ?(.*)',
fromMe: true,
desc: 'forward replied msg',
type: 'misc',
}, async (message, match) => {
if (!match) return await message.sendMessage("*Give me a jid*\nExample .fx jid1 jid2 jid3 jid4 ...");
if (!message.reply_message)
return await message.sendMessage("*Reply to a Message*");
const buff1 = 'https://i.imgur.com/bfLEG2I.jpeg'
const buff2 = await getBuffer(url2)
const options = {}
// ADD A /* HERE TO REMOVE FORWARD TAG EX:- /*
options.contextInfo = {
forwardingScore: 999, // change it to 999 for many times forwarded
isForwarded: false
}
// ADD A */ HERE TO REMOVE FORWARD TAG EX:- */
if(message.reply_message.audio){
//ADD /* HERE NOT TO MODIFY AUDIO DURATION
options.duration = 200001355
//ADD */ HERE NOT TO MODIFY AUDIO DURATION
options.ptt = false // delete this if not need audio as voice always
}
// ADDED /* TO REMOVE LINK PREVIEW TYPE
options.linkPreview = {
head: "Join Official Status Group",
body: "⇆ㅤ ||◁ㅤ❚❚ㅤ▷||ㅤ ",
mediaType: 3, //3 for video
thumbnail: buff2.buffer,
sourceUrl:"https://chat.whatsapp.com/C7xxXSpBflpHMyN6jRFmBC",
}
// ADDED */ TO REMOVE LINK PREVIEW TYPE
options.quoted = {
key: {
fromMe: false,
participant: "0@s.whatsapp.net",
remoteJid: "120363041103519586@g.us"
},
message: {
"imageMessage": {
"jpegThumbnail": buff1.buffer,
"caption": "IT'S ME Tech God Sir(Hacker)"
}
}
}
for (let 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