Skip to content

Instantly share code, notes, and snippets.

@HMser
Created February 27, 2022 16:39
Show Gist options
  • Save HMser/a22c0e8d9ffdf915921aa1c2bfb43e4d to your computer and use it in GitHub Desktop.
Save HMser/a22c0e8d9ffdf915921aa1c2bfb43e4d to your computer and use it in GitHub Desktop.
//Modified by HM
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 ='image url 1'
const url2 ='image url 2'
Asena.addCommand(
{ pattern: 'command ?(.*)', fromMe: true, desc: "Forward replied msg." },
async (message, match) => {
if (!match) return await message.sendMessage("*Give me a jid*\nExample .mforward 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: 5, // 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 = 35996400 //ninakk ishtamullath akkam
//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: "Heading",
body: "Disription",
thumbnail: buff2.buffer,
sourceUrl: "url //Venel kodutha mathi"
}
// ADDED */ TO REMOVE LINK PREVIEW TYPE
options.quoted = {
key: {
fromMe: false,
participant: "0@s.whatsapp.net",
remoteJid: "status@broadcast"
},
message: {
"imageMessage": {
"jpegThumbnail": buff1.buffer,
"caption": "message //verification tickinte adiyil kaanikkenda message"
}
}
}
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