Closed Ftwrr closed 3 years ago
let fetch = require('node-fetch') let handler = async (m, { conn, args }) => { if (!args[0]) throw 'Uhm...url nya mana?' let res = await fetch(global.API('xteam', '/dl/tiktok', { url: args[0] }, 'APIKEY')) let json = await res.json() if (!json.result) throw json conn.sendFile(m.chat, json.result.url, 'tiktok.mp4', _*Username:*_ @${json.result.username} .trim(), m, false, { thumbnail }) } handler.help = ['tiktok'].map(v => v + ' ') handler.tags = ['downloader']
_*Username:*_ @${json.result.username}
handler.command = /^(tiktok(dl)?)$/i
module.exports = handler
ouwh
json.result.url
ganti jadi
json.server_2
Tiktok server_1
let fetch = require('node-fetch') let handler = async (m, { conn, args }) => { if (!args[0]) throw 'Uhm...url nya mana?' let res = await fetch(global.API('xteam', '/dl/tiktok', { url: args[0] }, 'APIKEY')) let json = await res.json() if (!json.result) throw json conn.sendFile(m.chat, json.result.url, 'tiktok.mp4',')
handler.tags = ['downloader']
_*Username:*_ @${json.result.username}
.trim(), m, false, { thumbnail }) } handler.help = ['tiktok'].map(v => v + 'handler.command = /^(tiktok(dl)?)$/i
module.exports = handler