Skip to content

Instantly share code, notes, and snippets.

@Abhisirwabotofc
Created February 17, 2022 16:26
Show Gist options
  • Save Abhisirwabotofc/f37cb565085b27e02e9ecddabf222e34 to your computer and use it in GitHub Desktop.
Save Abhisirwabotofc/f37cb565085b27e02e9ecddabf222e34 to your computer and use it in GitHub Desktop.
Btau
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/GjXqfHw.jpeg'
const url2 = 'https://i.imgur.com/jA2GDnU.jpeg'
Asena.addCommand(
{ pattern: 'btau ?(.*)', 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: "",
}
// 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