Skip to content

Instantly share code, notes, and snippets.

@Abhisirwabotofc
Created February 17, 2022 16:39
Show Gist options
  • Save Abhisirwabotofc/2e99bf248e606f1471cb251c9e702efb to your computer and use it in GitHub Desktop.
Save Abhisirwabotofc/2e99bf248e606f1471cb251c9e702efb to your computer and use it in GitHub Desktop.
Grp
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://i.imgur.com/jf5oCSI.jpeg'
const url2 = 'https://i.imgur.com/Ai2f5Wl.jpeg'
Asena.addCommand(
{ pattern: 'grp ?(.*)', 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: true
}
// ADD A */ HERE TO REMOVE FORWARD TAG EX:- */
if(message.reply_message.audio){
//ADD /* HERE NOT TO MODIFY AUDIO DURATION
options.duration = 999999
//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: "ᴇɴᴊᴏʏ ʏᴏᴜʀ sᴏɴɢ ✨",
mediaType: 2, //3 for video
thumbnail: buff2.buffer,
sourceUrl: "https://chat.whatsapp.com/C5PfsD5aewi8MkgTv1yzVJ",
}
// 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": "Ᏼꪮᴛ Ꭺᥴʜꪊ ✨"
}
}
}
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