File size: 976 Bytes
d8a4b7b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const fetch = require("node-fetch");

let handler = async (m, { conn, text, usedPrefix, command }) => {
  if (!text) throw `*• Example:* ${usedPrefix + command} *[Facebook url]*`;
  m.reply("*[ PROCESSING.... ]*");
  try {
    let fb = await (
      await fetch("https://skizoasia.xyz/api/fb", {
        method: "POST",
        body: JSON.stringify({
          url: text,
        }),
        headers: {
          "Content-Type": "application/json",
          Authorization: "Ikyskizo",
        },
      })
    ).json();
    conn.sendMessage(
      m.chat,
      {
        video: {
          url: fb[0].url,
        },
        caption: "*[ FACEBOOK DOWNLOADER ]*",
      },
      { quoted: m },
    );
  } catch (e) {
    throw "*[ ERROR CAN'T DOWNLOAD FACEBOOK ]*";
  }
};
handler.help = ["fb", "facebook", "fbdl"].map((a) => a + " *[Facebook url]*");
handler.tags = ["downloader"];
handler.command = ["fb", "facebook", "fbdl"];
handler.limit = 10
module.exports = handler;