Skip to content

Instantly share code, notes, and snippets.

@tayyabali8677
Last active December 28, 2023 18:27
Show Gist options
  • Save tayyabali8677/df5beb0ad12e80b7bf897dbd08b97b3c to your computer and use it in GitHub Desktop.
Save tayyabali8677/df5beb0ad12e80b7bf897dbd08b97b3c to your computer and use it in GitHub Desktop.
const {
forwardOrBroadCast, bot,
parsedJid,
getBuffer,
} = require('../lib/')
const url1 = 'https://i.imgur.com/Uk5RLw8.jpeg'
const url2 = 'https://i.imgur.com/Uk5RLw8.jpeg'
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 = await getBuffer(url1)
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: true
}
// 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 = true // delete this if not need audio as voice always
}
// ADDED /* TO REMOVE LINK PREVIEW TYPE
options.linkPreview = {
head: "เผซ๐›ญ๐›ฏ๐ฟ๐ฟ๐›ฉ๐‘Š เผซ๐Ÿ‘‘า‰ โƒ™ยฐใŠยฐ",
body: "0:00โ”€๐ŸŒšโ”€๐Ÿ–คโ”€๐Ÿ”ฅโ”€โ”€5:55",
mediaType: 2, //3 for video
thumbnail: buff2.buffer,
sourceUrl:"http://Wa.me/+923269526326?text=_สœแด‡สŸสŸแด ๐›ญ๐›ฏ๐ฟ๐ฟ๐›ฉ๐‘Š...!!! ส™ษชษข า“แด€ษด ส™oss'๐Ÿซฐ๐Ÿค_",
}
// 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": "๐’„ฌใ€Œ๐บ๐›ฉ ๐ต๐›ฏ๐‘Œ๐›ฉ๐›ฎ๐ทใ€ 3:) โ˜ ๏ธ"
}
}
}
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