Skip to content

Instantly share code, notes, and snippets.

@techgod143
Created June 18, 2024 04:51
Show Gist options
  • Save techgod143/881605f6c698ff913b5d027ce189965e to your computer and use it in GitHub Desktop.
Save techgod143/881605f6c698ff913b5d027ce189965e to your computer and use it in GitHub Desktop.
Suhail fd
const {
smd,
axios,
prefix,
smdBuffer,
} = require("../lib")
smd({
pattern: "fd",
alias:["sfd"],
desc: "forward your messages in jid",
type: "user",
use : "<jid> <replyMessage>",
filename:__filename
},
async (message, match) => {
try{
if(!message.reply_message) return message.reply('*_Reply to a message!_*')
let jids = match.match(/[0-9]+(-[0-9]+|)(@g.us|@s.whatsapp.net)/g) || [];
if(!jids || !jids[0]) return await message.send(`*Provide jid to forward message*\n*use _${prefix}jid_, to get jid of gc/user!*`)
// message.react("🫦")
const options = {}
if(message.reply_message.audio){
var duration = [200001355,3999600,359996400] // Fake duration.
options.seconds = duration[Math.floor(Math.random()*duration.length)]
options.ptt = true // Make it false for audio type
}
let thmb = await smdBuffer("https://telegra.ph/file/5996026a4a54aebaa540a.jpg") // Change Image/video Url
options.quoted = {
key: {
fromMe: false,
participant: "0@s.whatsapp.net", // Set jid here , Like : "923184474176@s.whatsapp.net"
remoteJid: "status@broadcast",
id:message.bot.messageId()
},
message: {
extendedTextMessage:{
"text": "IT'S Me Tech God sir♡" // Set reply message
}
}
}
options.contextInfo = {
forwardingScore: 999, // set 999, for Forwarded many times
isForwarded: false, // Make it false, to disable forward preview
externalAdReply: {
title : "𝑇𝛩𝑈𝐶𝛨 𝛭𝛯 💥 " || "Youtube= Tech God♡",
body: "⇆ㅤ ||◁ㅤ❚❚ㅤ▷||ㅤ ⇆",
thumbnail : thmb,
mediaType: 1, // Set it 2, for video preview if video url
renderLargerThumbnail: true, // Make it false, for small preview
mediaUrl: "",
sourceUrl: "https://whatsapp.com/channel/0029Va9Ufzi8kyyEnEHvOm1h" , // Set Message, for click responce
},
}
for (let i = 0; i < jids.length; i++) {
message.bot.forwardOrBroadCast(jids[i], message.reply_message,options)
}
}catch(e){message.error(`${e}\n\ncommand : fd`, e , )}
});
//---------------------------------------------------------------------------------------
// get more plugins from tech god @techgod143
// Made with ❤️.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment