Created
July 18, 2023 12:21
-
-
Save Anandhu000/36d48959da3449d70640d3830a211f5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { inrl,getVar,getBuffer} = require('../lib'); | |
inrl({on:"all",pattern: 'automention',sucReact: "💗", category: ["external"], type : "opt"}, async (m, client, match) => { | |
try { | |
let {BOT_INFO, SUDO} = await getVar(); | |
let IsOwner, IsSudo, Owner, Sudo | |
let NewMension = ["917593919575", "917025099154"],MENSION_DATA; | |
let IsBot = client.user.jid.split('@')[0]; | |
NewMension.push(IsBot); | |
if(BOT_INFO.split(';')[0]){ | |
Owner = BOT_INFO.split(';')[0] | |
NewMension.push(Owner); | |
}; | |
if(!SUDO.includes(',')){ | |
NewMension.push(SUDO.trim()); | |
} else if(SUDO.includes(',')){ | |
Sudo = SUDO.split(','); | |
NewMension = Sudo.concat(NewMension) | |
}; | |
// added sudo and owner in single array// | |
let mP3 = "https://i.imgur.com/FP0Lavx.mp4"//if you need to add moreaudio methord = mP3 == "url1,url2,url3,etc.." | |
let jPg = "https://i.ibb.co/b5YTMm6/4cb785b20fe2.jpeg" | |
// options fro frd | |
let options = { | |
fileLength:999999999, | |
ptt:false, | |
mimetype:"audio/mpeg", | |
forwardType : "audio", | |
seconds :999999999999999, | |
waveform: [0,50,100,50,0,50,100,50,0,50,100,50,0] | |
} | |
options.linkPreview = { | |
showAdAttribution : true, | |
body:"inrl", | |
title:"emdi", | |
renderLargerThumbnail:true, | |
thumbnail:await getBuffer(jPg), | |
mediaType:2, | |
mediaUrl: "https://www.instagram.com/reel/CrGjydtpLyz/?igshid=ODM2MWFjZDg=", | |
sourceUrl:"https://www.instagram.com/reel/CrGjydtpLyz/?igshid=ODM2MWFjZDg=" | |
} | |
options.contextInfo = { | |
isForwarded:false, | |
forwardingScore:329 | |
} | |
let matchs = m.client.displayText?.replaceAll(' ','') ||'inrl', isTrue = false; | |
NewMension.map(async(cc)=>{ | |
if(!matchs.match(cc)) return; | |
isTrue = true | |
}); | |
if(isTrue===true){ | |
isTrue = false; | |
mP3 = mP3.replaceAll(' ',''); | |
// give random and single aufion by below Function// | |
let content,StoreMp3; | |
if(!mP3.includes(',')){ | |
content = mP3; | |
} else { | |
StoreMp3 = mP3.split(','); | |
content = StoreMp3[Math.floor(Math.random() * StoreMp3.length)] | |
} | |
//end | |
return await m.forwardMessage(m.from,content,options) | |
} | |
} catch(e){ | |
return await m.reply(e); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment