Lynxdecode / SPOTIFY PLAY
Base Code : Plugin Esm Author : Lynx decode Note : Lumayan kenceng apinya, cuma jangan di spam aja ntr cepet error kalo di spam. kalo ga cocok sama base kalian, sesuaikan sendiri
OtherJavaScript
5 views
Base Code : Plugin Esm Author : Lynx decode Note : Lumayan kenceng apinya, cuma jangan di spam aja ntr cepet error kalo di spam. kalo ga cocok sama base kalian, sesuaikan sendiri
/**
* ───「 FEATURE AUTHOR 」───
* 👤 Author : Lynx Decode
* 📞 Contact : +62 882-5804-1396
* 📢 Channel : https://whatsapp.com/channel/0029VbAnuii6GcGCu73oep1i
* ⚠️ Note : Keep credit to respect the creator!
* ─────────────────────────
* 📝 Plugin: Spotify 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} <judul lagu>`)
try {
await m.react('⏳')
let res = await fetch(`https://api.azbry.com/api/download/spoplay?q=${encodeURIComponent(text)}`)
let json = await res.json()
if (!json.status || !json.result) throw new Error('Lagu tidak ditemukan.')
let data = json.result
let dlUrl = data.downloadLink || data.rawLink
let captionText = `SPOTIFY DOWNLOADER\n\nTitle: ${data.title || '-'}\nArtist: ${data.artist || '-'}\nAlbum: ${data.album || '-'}\nDuration: ${data.duration} seconds`
let infoMsg = await conn.sendMessage(m.chat, {
image: { url: data.cover },
caption: captionText
}, { quoted: m })
await conn.sendMessage(m.chat, {
audio: { url: dlUrl },
mimetype: 'audio/mpeg',
ptt: false
}, { quoted: infoMsg })
await m.react('✅')
} catch (e) {
await m.react('❌')
m.reply(`Gagal mengunduh lagu: ${e.message}`)
}
}
handler.help = ['spoplay <query>']
handler.tags = ['downloader']
handler.command = /^(spoplay|spotifyplay|splay)$/i
export default handler