Skip to content

Instantly share code, notes, and snippets.

@ONLym22
Created December 31, 2025 08:02
Show Gist options
  • Select an option

  • Save ONLym22/61a2ec93c464ef5720d9fe2b47991af6 to your computer and use it in GitHub Desktop.

Select an option

Save ONLym22/61a2ec93c464ef5720d9fe2b47991af6 to your computer and use it in GitHub Desktop.
Uploaded via ONLym Bot
// 📂 Source: JavaScript
case "spotify":
case "spdl":
case "spotifydl":
case "spotifydownload":
{
if (!text) return xreply(`Contoh: ${p_c}${command} https://open.spotify.com/track/xxxx`);
if (!text.includes("spotify.com")) return xreply("❌ Harus berupa link Spotify!");
xreact();
try {
const anu = await fetchJson(`https://onlym.my.id/download/spotify?url=${Enc(text)}&apikey=${global.onlym}`);
if (!anu.status || !anu.result) return m.reply("❌ Gagal mengambil audio Spotify");
const r = anu.result;
await vellia.sendMessage(
m.chat,
{
audio: { url: r.download_url },
mimetype: "audio/mpeg",
fileName: `${r.title}.mp3`,
ptt: false,
contextInfo: {
externalAdReply: {
title: r.title,
body: `Artist: ${r.artist} • Duration: ${r.duration_str}`,
mediaType: 1,
renderLargerThumbnail: true,
thumbnailUrl: r.thumbnail,
sourceUrl: text,
},
},
},
{ quoted: qkontak },
);
} catch (err) {
xreply(`⚠️ Terjadi kesalahan pada server.`);
}
}
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment