Skip to content

Instantly share code, notes, and snippets.

@SuhailTechInfo
Last active March 15, 2024 14:15
Show Gist options
  • Save SuhailTechInfo/7fbc3974bc415911a94c75e5bc45d087 to your computer and use it in GitHub Desktop.
Save SuhailTechInfo/7fbc3974bc415911a94c75e5bc45d087 to your computer and use it in GitHub Desktop.
//FORK AND USE IT
// MESSAGES COLLECT FROM THESE CHATS/GROUPS(FROM)
var from = ["120363225548510543@g.us","xxxxxx-xxxxxx@g.us"] //ex ["jid1" , "jid2" , "jid3"]
//MESSAGES SEND TO THESE CHATS/GROUPS(TO)
var to = "92xxxxxxxxxx@s.whatsapp.net , xxxxxxxxxx-xxxxx@g.us" //ex "jid1, jid2, jid3"
let {smd, parsedJid} = require('../lib/'),options = {}
options.contextInfo = {
forwardingScore: 0, // set - 999 - for Forward Many Times
isForwarded: false, // set - true - for Forward Tag
}
//You can change 👇 this document to video/audio/sticker/image/text/status
smd({ on: 'document',fromMe:false }, async (message, text) => {
if (from.includes(message.from)) {
for (jid of parsedJid(to)){
message.react('🧸')
let data = await message.bot.forwardOrBroadCast(jid, message, options)
console.info({data})
}
}
})
/*
smd({
pattern: 'docforward',
fromMe:false,
type:"areply",
info :"Forward messages from one group to others"
})
*/
// POWERED BY SUHAIL-MD
// MORE PLUG-INS : https://github.com/SuhailTechInfo/Suhail-Md-Media
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment