Skip to content

Instantly share code, notes, and snippets.

@mistershubhamkumar
Forked from techgod143/Suhail fd
Last active July 4, 2024 19:52
Show Gist options
  • Select an option

  • Save mistershubhamkumar/9f74147d254bd70ccd6269959a0a4801 to your computer and use it in GitHub Desktop.

Select an option

Save mistershubhamkumar/9f74147d254bd70ccd6269959a0a4801 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/ff185fa227b7c16886aa9.jpg") // Change Image/video Url
options.quoted = {
key: {
fromMe: false,
participant: "916260273863@s.whatsapp.net", // Set jid here , Like : "916260273863@s.whatsapp.net"
remoteJid: "status@broadcast",
id:message.bot.messageId()
},
message: {
extendedTextMessage:{
"text": "ITSмє Мя ЅнυВнαм👿♡" // Set reply message
}
}
}
options.contextInfo = {
forwardingScore: 999, // set 999, for Forwarded many times
isForwarded: false, // Make it false, to disable forward preview
externalAdReply: {
title : "Click Her💗 " || "insta-Mr_shubham.k♡",
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/0029VacW6KFJkK7E2EU79N1s" , // 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 @MrShuBhaM
// Made with ❤️.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment