# MP3 downloader

# MP3 downloader

Paste a SoundCloud or YouTube link in an authorized chat, or send `/download` / `/mp3`, and the bot replies with the track as a 320 kbps MP3.

## Starting a download

`/download <link>` and `/mp3 <link>` work the same as pasting the link.

Sent with no link, `/download` and `/mp3` reply `Got it — send a SoundCloud or YouTube link and I'll send back the MP3.` The reply and your command are deleted after 45 seconds.

#### Where it works

| Setting | Value |
| --- | --- |
| Authorized chats | The owner's or a bot admin's private chat with the bot, any group the bot is authorized in, or a private chat from a username on the bot's DM-authorized list. |
| Inside an authorized group | Any member can paste a link. |
| Everywhere else | No reply. |
| On/off switch | `/menu` → **Extra Bot Features** → **MP3 Downloader**. One switch for the whole bot. Default: on. |

## Supported links

*Recognized hosts*

| Platform | Hosts |
| --- | --- |
| SoundCloud | soundcloud.com, m.soundcloud.com, on.soundcloud.com, snd.sc |
| YouTube | youtube.com, m.youtube.com, music.youtube.com, youtu.be |

## Playlists: ZIP or individual files

A SoundCloud playlist link (`/sets/`) or a YouTube playlist link (`/playlist?list=`) triggers a choice.

#### What happens

1. The bot asks `🎧 Playlist detected — how do you want it?` with two buttons: **📦 ZIP File** and **🎵 MP3s**.
2. Only the person who sent the link can choose. Anyone else tapping gets `Only the requester can choose.`
3. The choice expires after 10 minutes and the prompt is deleted.
4. **ZIP File**: every track in one .zip. **MP3s**: tracks sent one at a time.

A finished ZIP ends with `✅ {title} — {n} tracks, zipped ({size} MB).` A finished MP3 run ends with `✅ {title} — sent {n}/{total} tracks.` Unavailable tracks are noted in that line (`{n} unavailable — DRM/region-locked`), as is the 30-track cap (`capped at first {n} of {total}`).

*Failure messages*

| When | Message |
| --- | --- |
| All 3 download slots are busy | ⌛ Queued — waiting for a free download slot… |
| The playlist takes over 25 minutes | ⚠️ Playlist download timed out. |
| The download fails | ⚠️ Couldn't download that playlist — try again. |
| Every track is over 49 MB | ⚠️ Couldn't send any tracks — they're over Telegram's size limit. |
| The ZIP is over 1900 MB | ⚠️ Zip is {n} MB — over Telegram's upload limit. |
| Uploading the ZIP fails | ⚠️ Couldn't upload the zip — try again. |

## Limits

#### MP3 downloader limits

| Setting | Value |
| --- | --- |
| Output | 320 kbps MP3, tagged with title, artist and duration; the bot's Telegram avatar is the cover art. |
| Per track | 49 MB (Telegram's upload cap) |
| ZIP size | 1900 MB |

> **Warning**
>
> A single track that times out, is over the duration cap, or produces an MP3 over the size cap gets no reply. A second link from the same user in the same chat within the cooldown also gets no reply. Playlist failures always show a message.
