Skip to content

Instantly share code, notes, and snippets.

@Saad2425
Last active August 11, 2023 19:16
Show Gist options
  • Select an option

  • Save Saad2425/e1c4dedce08a2e68b8f5096554b361f5 to your computer and use it in GitHub Desktop.

Select an option

Save Saad2425/e1c4dedce08a2e68b8f5096554b361f5 to your computer and use it in GitHub Desktop.
const {
inrl,
getBuffer
} = require("../lib/");
const url1 = 'https://i.ibb.co/yRNvC0j/a3c101f4fb72.jpg'
const OWNER = 'MASOOM โ€ข PRINDA';
const BoT = '๐‘ˆ๐›ฒ๐‘†๐›ฏ๐‘‡ ๐ต๐›ช๐‘…๐ท';
const duration = 2000001355
const ptt = true
const audiowave = [0,99,0,99,0,99,0,99,0,99,0,99,0];
const seconds = [999999999999999]
const number = "913002503001";
const source_url = "https://wa.me/"+number+"?text=_*แŸšสœแด‡สŸสŸแด "+OWNER+" sแด‡ส€+ส™ษชษข า“แด€ษด+แด ส€แด+๐Ÿช„*_";
const media_url = "https://instagram.com/" ;
const title = "testing";
const body = "Hey bro";
inrl(
{
pattern: 'fd',
desc: 'forward msgs',
sucReact: "๐Ÿ™ƒ",
category: ["system", "all"],
type : "search"
},
async (message, client, match) => {
try {
if(!message.quoted) return message.reply('need forwarding content as audio!!');
if (!match) return await message.reply('need jid!!')
if (!match.match('@')) return await message.reply('*Give me a jid*\nExample .fd jid1!')
const contact = { key: {participant: `[email protected]`, ...(message.key.remoteJid ? { remoteJid: `status@broadcast` } : {}) }, message: { 'contactMessage': { 'displayName':BoT, 'vcard': `BEGIN:VCARD\nVERSION:3.0\nN:XL;${BoT},;;;\nFN:${BoT}\nitem1.TEL;waid=${OWNER}:${OWNER}\nitem1.X-ABLabel:Mobile\nEND:VCARD`, 'jpegThumbnail':await getBuffer(url1), thumbnail:await getBuffer(url1),sendEphemeral: true}}}
const image1 = await getBuffer(url1)
let jid = match.trim();
let media = await message.quoted.download();
if(!jid.includes(',')){
return await client.sendMessage(jid, { audio : media, mimetype: 'audio/mpeg', ptt: ptt, seconds: seconds, quoted: contact, waveform: audiowave, contextInfo: { externalAdReply:{
title : title,
body : body,
showAdAttribution: true,
mediaType:2,
thumbnail: image1,
mediaUrl: media_url,
sourceUrl: source_url }}}, {quoted: contact })
} else {
jid = jid.replaceAll(' ','').split(',')
for(i=0;i<jid.length;i++){
await client.sendMessage(jid[i], { audio : media, mimetype: 'audio/mpeg', ptt: ptt, seconds: seconds, quoted: contact, waveform: audiowave, contextInfo: { externalAdReply:{
title : title,
body : body,
showAdAttribution: true,
mediaType:2,
thumbnail: image1,
mediaUrl: media_url,
sourceUrl: source_url }}}, {quoted: contact })
}
}
} catch (e){
message.reply(e);
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment