Created
April 19, 2026 13:18
-
-
Save ayashiiiyo/d4ac57cab8fbf290df8cede0c8989a7b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function scdl(url) { | |
| const base = 'https://convertico.com/' | |
| const headers = { | |
| 'accept': '*/*', | |
| 'origin': base, | |
| 'referer': base + 'soundcloud-downloader/', | |
| 'user-agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Mobile Safari/537.36 EdgA/147.0.0.0' | |
| } | |
| const formInfo = new FormData() | |
| formInfo.append('action', 'fetch') | |
| formInfo.append('url', url) | |
| const info = await fetch(base + 'soundcloud-downloader/soundcloud-downloader.php', { | |
| method: 'POST', | |
| headers, | |
| body: formInfo | |
| }).then(r => r.json()) | |
| const formDownload = new FormData() | |
| formDownload.append('action', 'download') | |
| formDownload.append('url', url) | |
| formDownload.append('quality', '192') | |
| formDownload.append('is_playlist', '0') | |
| const dl = await fetch(base + 'soundcloud-downloader/soundcloud-downloader.php', { | |
| method: 'POST', | |
| headers, | |
| body: formDownload | |
| }).then(r => r.json()) | |
| const downloadUrl = base + 'soundcloud-downloader/' + dl.file_url.split('/').map(encodeURIComponent).join('/') | |
| return { | |
| status: info.status, | |
| title: info.title, | |
| author: info.author, | |
| duration: `${Math.floor(info.duration / 60)}:${String(info.duration % 60).padStart(2, '0')}`, | |
| views: info.view_count.toLocaleString(), | |
| likes: info.like_count.toLocaleString(), | |
| upload: info.upload_date, | |
| thumbnail: info.thumbnail, | |
| source: info.url, | |
| filename: dl.filename, | |
| size: `${(dl.size / 1024 / 1024).toFixed(2)} MB`, | |
| format: dl.format, | |
| download_url: downloadUrl | |
| } | |
| } | |
| let handler = async (m, { conn, args, command }) => { | |
| try { | |
| if (!args[0]) return m.reply(`*Example :* .${command} https://soundcloud.com/...`) | |
| m.reply(global.wait) | |
| const res = await scdl(args[0]) | |
| let txt = `*Title :* ${res.title}\n` | |
| txt += `*Author :* ${res.author}\n` | |
| txt += `*Duration :* ${res.duration}\n` | |
| txt += `*Views :* ${res.views}\n` | |
| txt += `*Likes :* ${res.likes}\n` | |
| txt += `*Upload :* ${res.upload}\n` | |
| txt += `*Size :* ${res.size}\n` | |
| txt += `*Format :* ${res.format}\n` | |
| txt += `*Source :* ${res.source}` | |
| await conn.sendMessage(m.chat, { image: { url: res.thumbnail }, caption: txt }, { quoted: m }) | |
| await conn.sendMessage(m.chat, { audio: { url: res.download_url }, mimetype: 'audio/mpeg' }, { quoted: m }) | |
| } catch (e) { | |
| m.reply(e.message) | |
| } | |
| } | |
| handler.help = ['scdl <url>', 'soundcloud <url>'] | |
| handler.command = ['scdl', 'soundcloud'] | |
| handler.tags = ['downloader'] | |
| export default handler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment