-
-
Save itzmesuhail143/e41610d3607931a97d2301637b6a2fa5 to your computer and use it in GitHub Desktop.
Forwards audio with more info. Edit & modify by forking
This file contains hidden or 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
| // ===================== ⚠️ DOES NOT WORK ON BUSINESS ACCOUNTS ⚠️ =================== | |
| // =================================================================================== | |
| // EDIT THESE TEXT AND OTHER STUFF ✅ | |
| // =================================================================================== | |
| const image_1 = 'https://i.ibb.co/0VBY2vCr/temp.jpg'; // Image 1 | |
| const image_2 = 'https://i.ibb.co/mVdKmbDG/temp.jpg'; // Image 2 | |
| const duration = [200001355, 3999600, 359996400]; // Fake duration. Set to false for actual duration | |
| const text_1 = '◉─━〔 𝙎𝙐𝞖𝞓𝞘𝙇-𝞑𝞗𝙏-𝞛𝘿 〕━─◉'; | |
| const text_2 = '≛͢⃝⃖✯⎈͢𝑺᪵𝑼͢𝑯𝑨𝑰𝑳᪵𖠇𝑺᪵𝑬𝑹᭄⎈͢ ≛⃝⃗➳'; | |
| const text_3 = '𝐋ɪғᴇ 𝐈ꜱ 𝐅ᴜᴄᴋɪɴɢ 𝐃ʀᴀᴍᴀ'; | |
| const size = 1000000000; // Audio download size in bytes | |
| const source_url = "https://www.instagram.com/__s_u_h_a_i_l__s_u_h_a_i_l__?igsh=NjhkNjVzZmtqb21t"; // Any random link | |
| const type = 2; // Use 1 for small link preview, 2 for video preview types. | |
| const currency = ["INR", "USD", "EUR", "AED"]; // Currencies. | |
| const amount = ['999999', '77177', '222222']; // Amount shown @ top | |
| const ptt = false; // Set to false for audio message | |
| const ad_msg = true; // Set to false to disable "message via ad" | |
| // =================================================================================== | |
| // NO NEED OF EDITING THINGS BELOW ❗ | |
| // =================================================================================== | |
| const { Module } = require('../main'); | |
| const { getBuffer } = require('./utils'); | |
| Module({ | |
| pattern: 'fd ?(.*)', | |
| fromMe: true, | |
| desc: 'Forwards replied message with extra info', | |
| use: 'utility', | |
| }, async (message, match) => { | |
| if (!match[1]) { | |
| return await message.sendMessage("*Give me a jid*\nExample .fd jid1 jid2 jid3 jid4 ..."); | |
| } | |
| if (!message.reply_message) { | |
| return await message.sendMessage("*Reply to a Message*"); | |
| } | |
| const buff1 = await getBuffer(image_1); | |
| const buff2 = await getBuffer(image_2); | |
| const options = {}; | |
| options.fileLength = size; | |
| if (message.reply_message.audio) { | |
| options.seconds = duration[Math.floor(Math.random() * duration.length)] || false; | |
| options.ptt = ptt; | |
| } | |
| options.contextInfo = { | |
| externalAdReply: { | |
| showAdAttribution: ad_msg, | |
| title: text_1, | |
| body: text_2, | |
| description: text_3, | |
| mediaType: type, | |
| thumbnail: buff2, | |
| mediaUrl: source_url | |
| } | |
| }; | |
| const quotedMessages = [ | |
| { | |
| key: { | |
| remoteJid: "status@broadcast", | |
| fromMe: false, | |
| participant: "0@s.whatsapp.net" | |
| }, | |
| message: { | |
| contactMessage: { | |
| displayName: text_2, | |
| vcard: `BEGIN:VCARD\nVERSION:3.0\nN:${text_2}\nFN:${text_2}\nitem1.TEL;waid=91987456321:91987456321\nitem1.X-ABLabel:Click To Chat\nitem2.EMAIL;type=INTERNET:GitHub: souravkl11\nitem2.X-ABLabel:Follow Me On Github\nitem3.URL:YouTube: illa\nitem3.X-ABLabel:Youtube\nitem4.ADR:;;India, Kerala;;;;\nitem4.X-ABLabel:Region\nEND:VCARD` | |
| } | |
| } | |
| }, | |
| { | |
| key: { | |
| fromMe: false, | |
| participant: `0@s.whatsapp.net`, | |
| remoteJid: "0@s.whatsapp.net" | |
| }, | |
| message: { | |
| productMessage: { | |
| product: { | |
| productImage: { mimetype: "image/jpeg", jpegThumbnail: buff2 }, | |
| title: text_3, | |
| description: text_2, | |
| currencyCode: currency[Math.floor(Math.random() * currency.length)], | |
| priceAmount1000: amount[Math.floor(Math.random() * amount.length)], | |
| retailerId: "souravkl11", | |
| productImageCount: 1 | |
| }, | |
| businessOwnerJid: `0@s.whatsapp.net` | |
| } | |
| } | |
| } | |
| ]; | |
| options.quoted = quotedMessages[Math.floor(Math.random() * quotedMessages.length)]; | |
| const jids = match[1].match(/[0-9]+(-[0-9]+|)(@g.us|@s.whatsapp.net)/g); | |
| if (jids) { | |
| for (const jid of jids) { | |
| await message.forwardMessage(jid, message.quoted, options); | |
| } | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment