-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathdl-tiktoknowm.js
29 lines (26 loc) · 1007 Bytes
/
dl-tiktoknowm.js
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
let fetch = require('node-fetch')
let handler = async (m, { conn, args }) => {
if (!args[0]) throw 'Uhm...url nya mana?'
let res = await fetch(API('lol', '/api/tiktok', { url: args[0] }, 'apikey'))
let json = await res.json()
m.reply(wait)
await conn.reply(m.chat, `Downloading media from Tiktok`, 0, {
contextInfo: { mentionedJid: [m.sender],
externalAdReply :{
mediaUrl: linkig,
mediaType: 2,
description: deslink ,
title: titlink,
body: wm, //`${fileSizeH}`,
thumbnail: await(await fetch(img)).buffer(),
sourceUrl: linkgc
}}
})
let txt = `🚀 *Link:* ${await(await axios.get(`https://tinyurl.com/api-create.php?url=${args[0]}`)).data}`
await conn.sendButtonVid(m.chat, json.result.link, txt, wm, `Audio`, `.tiktokaudio ${args[0]}`, m)
}
handler.help = ['tiktoknowm'].map(v => v + ' <url>')
handler.tags = ['downloader', 'premium']
handler.command = /^(tt|tiktok)nowm(dl)?(download(er)?)?$/i
handler.premium = false
module.exports = handler