Lynxdecode / DOWNLOADER TTMUSIC/TTMP3
Base Code : Plugin Esm Author : Lynx decide Note : downloader ttmp3 only aja cuy
OtherJavaScript
2 views
Base Code : Plugin Esm Author : Lynx decide Note : downloader ttmp3 only aja cuy
/**
* ───「 FEATURE AUTHOR 」───
* 👤 Author : Lynx Decode
* 📞 Contact : +62 882-5804-1396
* 📢 Channel : https://whatsapp.com/channel/0029VbAnuii6GcGCu73oep1i
* ⚠️ Note : Keep credit to respect the creator!
* ─────────────────────────
* 📝 Plugin: TikTok Music Downloader (Universal)
*/
import fetch from 'node-fetch'
let handler = async (m, { conn, text, usedPrefix, command }) => {
if (!text) return m.reply(`*Format salah!*\nGunakan: ${usedPrefix + command} <link_tiktok>`)
try {
await m.react('⏳')
let res = await fetch(`https://api.cuki.biz.id/api/downloader/tiktok-music?apikey=cuki-x&url=${encodeURIComponent(text)}`)
let json = await res.json()
if (!json.success || !json.results) throw new Error('Musik tidak ditemukan atau link tidak valid.')
let data = json.results
let captionText = `🎵 *Title:* ${data.title || '-'}\n👤 *Author:* ${data.author || '-'}\n⏱️ *Duration:* ${data.duration || 0}s`
let infoMsg = await conn.sendMessage(m.chat, {
image: { url: data.cover },
caption: captionText
}, { quoted: m })
await conn.sendMessage(m.chat, {
audio: { url: data.url },
mimetype: 'audio/mpeg',
ptt: false
}, { quoted: infoMsg })
await m.react('✅')
} catch (e) {
await m.react('❌')
m.reply(`❌ *Terjadi kesalahan:* ${e.message}`)
}
}
handler.help = ['ttmp3 <url>', 'ttaudio <url>']
handler.tags = ['downloader']
handler.command = /^(ttmp3|ttaudio|ttmusic)$/i
export default handler