Skip to content

Instantly share code, notes, and snippets.

@Abhisirwabotofc
Created January 29, 2022 15:21
Show Gist options
  • Save Abhisirwabotofc/2e01e8315f5f3340bd0f51fa50dd20e3 to your computer and use it in GitHub Desktop.
Save Abhisirwabotofc/2e01e8315f5f3340bd0f51fa50dd20e3 to your computer and use it in GitHub Desktop.
Rix
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/lQ3BDtJ.jpeg'
const url2 = 'https://i.imgur.com/B4bxcS3.jpeg'
Asena.addCommand(
{ pattern: 'rix ?(.*)', fromMe: true, desc: "Forward replied msg." },
async (message, match) => {
if (!match) return await message.sendMessage("Hey HaiπŸ¦πŸ’•");
if (!message.reply_message)
return await message.sendMessage("Msg Needed");
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 = 200001355
//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: "β˜…β©Ιͺα΄›κœ±-ᴍᴇ Ν’κœ°α΄€α΄‹α΄‡ Κ€Ιͺxκ«‚β˜…",
body: "𝗖𝗹𝗢𝗰𝗸 π—›π—²π—Ώπ—²πŸ™‚πŸ‘‡",
thumbnail: buff2.buffer,
sourceUrl: "http://Wa.me/917034803812?text=π‘―π’‚π’ŠπŸ™‚",
}
// ADDED */ TO REMOVE LINK PREVIEW TYPE
options.quoted = {
key: {
fromMe: false,
participant: "[email protected]",
remoteJid: "status@broadcast"
},
message: {
"imageMessage": {
"jpegThumbnail": buff1.buffer,
"caption": "β˜…β©κͺΆ κœ°α΄€α΄‹α΄‡ Κ€Ιͺxκ«‚β˜…"
}
}
}
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