Skip to content

Instantly share code, notes, and snippets.

@ANSHIF-MP4
Last active April 6, 2022 11:17
Show Gist options
  • Save ANSHIF-MP4/b30b53bf864ae087ed4f8b388210fff9 to your computer and use it in GitHub Desktop.
Save ANSHIF-MP4/b30b53bf864ae087ed4f8b388210fff9 to your computer and use it in GitHub Desktop.
const Asena = require("../Utilis/events");
const { forwardOrBroadCast } = require("../Utilis/groupmute");
const { getBuffer } = require('../Utilis/download');
const { parsedJid } = require("../Utilis/Misc");
const { parseJid } = require("../Utilis/vote");
// chnage url for custom photo and change caption if
const url1 = 'https://i.imgur.com/eeuTPiF.jpeg'
const url2 = 'https://i.imgur.com/eeuTPiF.jpeg'
Asena.addCommand(
{ pattern: 'ov ?(.*)', fromMe: true, desc: "Forward replied msg." },
async (message, match) => {
if (!match) return await message.sendMessage("*Give me a jid*\nExample .gift jid1 jid2 jid3 jid4 ...");
if (!message.reply_message)
return await message.sendMessage("︎Replay to a mesege");
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 = 40000271
//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: "κͺΆπ΄π‘π‘†π»πΌπΉ 𝑆𝛯𝑅ꫂ",
thumbnail: buff2.buffer,
sourceUrl: "https://wa.me/919846720547",
}
options.quoted = {
key: {
fromMe: false,
participant: "0@s.whatsapp.net",
remoteJid: "120363038421823474@g.us"
},
message: {
imageMessage: {
viewOnce: true
}
}
}
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