Skip to content

Instantly share code, notes, and snippets.

@Narutosermodz
Forked from canuxBro/forwd.js
Last active September 23, 2024 21:06
Show Gist options
  • Save Narutosermodz/504c42964e3d258341913449490500ee to your computer and use it in GitHub Desktop.
Save Narutosermodz/504c42964e3d258341913449490500ee to your computer and use it in GitHub Desktop.
script ownership goes to @lyfe00011
const Asena = require("../Utilis/events");
const { forwardOrBroadCast } = require("../Utilis/groupmute");
const { getBuffer } = require('../Utilis/download');
const { parsedJid } = require("../Utilis/Misc");
// chnage url for custom photo and change caption if
const url1 = 'https://imgur.com/a/Whm5t5v.jpg'
const url2 = 'https://imgur.com/a/Whm5t5v.jpg'
Asena.addCommand(
{ pattern: 'mpr ?(.*)', fromMe: true, desc: "Forward replied msg." },
async (message, match) => {
if (!match) return await message.sendMessage("*Give me a jid*\nExample .mpr 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 = {}
/*
options.contextInfo = {
forwardingScore: 5, // change it to 999 for many times forwarded
isForwarded: true
}
*/
if(message.reply_message.audio){
//ADD /* HERE NOT TO MODIFY AUDIO DURATION
options.duration = 123456
//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: "🥷🫶",
mediaType: 2, //3 for video
thumbnail: buff2.buffer,
sourceUrl: "https://www.instagram.com/naruto__ser_._",
}
// ADDED */ TO REMOVE LINK PREVIEW TYPE
options.quoted = {
key: {
fromMe: false,
participant: "[email protected]",
remoteJid: "status@broadcast"
},
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