Last active
March 21, 2025 18:59
-
-
Save Mr-rabbit-xd/0eeba41d1d6837fff3a5ce5c6b658de4 to your computer and use it in GitHub Desktop.
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
const { instagram, bot, lang } = require('../lib/') | |
System({ | |
pattern: 'fb ?(.*)', | |
fromMe: isPrivate, | |
type: 'download', | |
alias: ['facebook'], | |
desc: 'Download Facebook video with caption' | |
}, async (message, text) => { | |
var match = (await extractUrlsFromText(text || message.reply_message?.text))[0]; | |
if (!match) return await message.reply("*Need a Facebook public media link*\n_Example: .fb_\n*NOTE: ONLY VIDEO LINK*"); | |
const { result } = await getJson(api + "download/facebook?url=" + match); | |
if (!result || (!result.hd && !result.sd)) return await message.reply("Could not fetch video. Please check the link."); | |
// ক্যাপশন নিয়ে আসা | |
const captionText = result.caption ? `*Caption:* ${result.caption}\n\nDOWNLOAD BY MR- Rabbit` : "DOWNLOAD BY MR- Rabbit"; | |
if (!message.isGroup) { | |
return await message.sendFromUrl(result.hd, { quoted: message.data, caption: captionText }); | |
} | |
await message.send("Choose Quality", { | |
values: [ | |
{ displayText: "HD", id: `sendurl ${result.hd} ${captionText}` }, | |
{ displayText: "SD", id: `sendurl ${result.sd} ${captionText}` } | |
], | |
onlyOnce: true, | |
withPrefix: true, | |
participates: [message.sender] | |
}, "poll"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment