TgMusicBot - Telegram Music Bot
Telegram Group Calls Streaming bot with some useful features, written in Python with Py-Tgcalls. Supporting platforms like YouTube, Spotify, Apple Music, Soundcloud, JioSaavn and more.
@FallenBeatzBot - Try it now!
Say goodbye to restrictions with our Premium Music API โ your ultimate solution for seamless, high-quality downloads.
- Easy Integration โ Just set
API_URL&API_KEYvariables in your bot configuration. - High-Quality Downloads โ Get music from Spotify, SoundCloud, and YouTube in top quality.
๐ฉ Contact me on Telegram to get access or use @FallenApiBot
๐ Check out this guide for instructions on downloading and using them.
- Multi-Platform Support - Play music from Spotify, YT-Music, YouTube, JioSaavn, Apple Music, SoundCloud and Telegram files.
- Playlists & Queue - Seamless music playback with queue management.
- Full Playback Controls - Skip, Pause, Resume, End, Mute, Unmute, Volume, Loop, Seek.
- Group Voice Chats - Supports Telegram group voice chats (requires admin permissions).
- Optimized Performance - Fully async, efficient, and lightweight.
- Easy Deployment - Pre-configured Docker setup.
- Multi-Language Support - Available in English, Hindi, Spanish, Arabic, and more. Easily extendable with your own translations.
- Open-Source & Free - Built from scratch using PyTdBot & PyTgCalls.
๐ก Prefer using Pyrogram instead of PyTdBot? Check out the Pyro-Branch.
Dependency Tree: Click to expand
tgmusicbot v1.2.1
โโโ aiofiles v24.1.0
โโโ apscheduler v3.11.0
โ โโโ tzlocal v5.3.1
โโโ cachetools v6.0.0
โโโ kurigram v2.2.4
โ โโโ pyaes v1.6.1
โ โโโ pysocks v1.7.1
โโโ meval v2.5
โโโ ntgcalls v2.0.0
โโโ pillow v11.2.1
โโโ psutil v7.0.0
โโโ py-tgcalls v2.2.0
โ โโโ aiohttp v3.12.6
โ โ โโโ aiohappyeyeballs v2.6.1
โ โ โโโ aiosignal v1.3.2
โ โ โ โโโ frozenlist v1.6.0
โ โ โโโ attrs v25.3.0
โ โ โโโ frozenlist v1.6.0
โ โ โโโ multidict v6.4.4
โ โ โโโ propcache v0.3.1
โ โ โโโ yarl v1.20.0
โ โ โโโ idna v3.10
โ โ โโโ multidict v6.4.4
โ โ โโโ propcache v0.3.1
โ โโโ deprecation v2.1.0
โ โ โโโ packaging v25.0
โ โโโ ntgcalls v2.0.0
โโโ py-yt-search v0.3
โ โโโ httpx v0.28.1
โ โ โโโ anyio v4.9.0
โ โ โ โโโ idna v3.10
โ โ โ โโโ sniffio v1.3.1
โ โ โโโ certifi v2025.4.26
โ โ โโโ httpcore v1.0.9
โ โ โ โโโ certifi v2025.4.26
โ โ โ โโโ h11 v0.16.0
โ โ โโโ idna v3.10
โ โโโ python-dotenv v1.1.0
โโโ pycryptodome v3.23.0
โโโ pydantic v2.11.5
โ โโโ annotated-types v0.7.0
โ โโโ pydantic-core v2.33.2
โ โ โโโ typing-extensions v4.13.2
โ โโโ typing-extensions v4.13.2
โ โโโ typing-inspection v0.4.1
โ โโโ typing-extensions v4.13.2
โโโ pymongo v4.13.0
โ โโโ dnspython v2.7.0
โโโ pytdbot v0.9.3
โ โโโ aio-pika v9.5.5
โ โ โโโ aiormq v6.8.1
โ โ โ โโโ pamqp v3.3.0
โ โ โ โโโ yarl v1.20.0 (*)
โ โ โโโ exceptiongroup v1.3.0
โ โ โโโ yarl v1.20.0 (*)
โ โโโ deepdiff v8.5.0
โ โโโ orderly-set v5.4.1
โโโ pytgcrypto v1.2.11
โโโ python-dotenv v1.1.0
โโโ pytz v2025.2
โโโ tdjson v1.8.49
โโโ ujson v5.10.0
โโโ yt-dlp v2025.5.22
โโโ black v25.1.0 (extra: dev)
โ โโโ click v8.2.1
โ โโโ mypy-extensions v1.1.0
โ โโโ packaging v25.0
โ โโโ pathspec v0.12.1
โ โโโ platformdirs v4.3.8
โโโ ruff v0.11.12 (extra: dev)
โโโ setuptools v78.1.1 (extra: dev)
๐ Docker Installation (Recommended) (Click to expand)
- Install Docker:
- Clone the repository:
git clone https://github.com/AshokShau/TgMusicBot.git && cd TgMusicBot
-
Prepare environment file:
cp sample.env .env
-
Edit configuration (choose one method):
-
Beginner-friendly (nano):
nano .env
- Edit values
- Save:
Ctrl+Oโ Enter โCtrl+X
-
Advanced (vim):
vi .env
- Press
ito edit - Save:
Escโ:wqโ Enter
- Press
-
-
Build Docker image:
docker build -t tgmusicbot . -
Run container (auto-restarts on crash/reboot):
docker run -d \ --name tgmusicbot \ --env-file .env \ --restart unless-stopped \ tgmusicbot
- Check logs:
(Exit with
docker logs -f tgmusicbot
Ctrl+C)
-
Stop container:
docker stop tgmusicbot
-
Start container:
docker start tgmusicbot
-
Update the bot:
docker stop tgmusicbot docker rm tgmusicbot git pull origin master docker build -t tgmusicbot . docker run -d --name tgmusicbot --env-file .env --restart unless-stopped tgmusicbot
๐ Step-by-Step Installation Guide (Click to Expand)
-
Update your system (Recommended):
sudo apt-get update && sudo apt-get upgrade -y -
Install essential tools:
sudo apt-get install git python3-pip ffmpeg tmux -y
-
Install UV package manager:
pip3 install uv
-
Clone the repository:
git clone https://github.com/AshokShau/TgMusicBot.git && cd TgMusicBot
-
Create virtual environment:
uv venv
-
Activate environment:
- Linux/Mac:
source .venv/bin/activate - Windows (PowerShell):
.\.venv\Scripts\activate
- Linux/Mac:
-
Install dependencies:
uv pip install -e .
-
Setup environment file:
cp sample.env .env
-
Edit configuration (Choose one method):
-
For beginners (nano editor):
nano .env
- Edit values
- Save:
Ctrl+Oโ Enter โCtrl+X
-
For advanced users (vim):
vi .env
- Press
ito edit - Save:
Escโ:wqโ Enter
- Press
-
-
Start in tmux session (keeps running after logout):
tmux new -s musicbot tgmusic
Tmux Cheatsheet:
- Detach:
Ctrl+BthenD - Reattach:
tmux attach -t musicbot - Kill session:
tmux kill-session -t musicbot
- Detach:
To restart the bot:
tmux attach -t musicbot
# Kill with Ctrl+C
tgmusic๐ Environment Variables (Click to expand)
- API_ID โ Get from my.telegram.org
- API_HASH โ Get from my.telegram.org
- TOKEN โ Get from @BotFather
- STRING1 - Pyrogram String Session, STRING2 ... STRING10
Get from @StringFatherBot
- OWNER_ID โ Your Telegram User ID
- MONGO_URI โ Get from MongoDB Cloud
- API_URL โ Get from @FallenApiBot (API for unlimited downloads)
- API_KEY โ Required for API_URL
- DOWNLOADS_DIR โ Directory for downloads and TDLib database
- SUPPORT_GROUP โ Support Group Link
- SUPPORT_CHANNEL โ Support Channel Link
- IGNORE_BACKGROUND_UPDATES โ Ignore background updates
- LOGGER_ID โ Log Group ID
- AUTO_LEAVE โ Leave all chats for all userbot clients.
- MIN_MEMBER_COUNT โ Minimum number of members required for the bot to stay in a group.
- PROXY โ Optional; Proxy URL for yt-dlp
- DEFAULT_SERVICE โ Default search platform (Options:
youtube,spotify,jiosaavn) - DOWNLOADS_DIR โ Directory for downloads and TDLib database
- COOKIES_URL โ URLs for downloading cookies (More info here)
- Add @FallenBeatzBot to a group and grant admin permissions.
- Use
/startto initialize the bot. - Use
/helpto view the list of available commands.
Contributions are welcome! If you'd like to contribute:
- Fork the repository.
- Make meaningful changes โ improve features, fix bugs, or optimize performance.
- Submit a pull request with a clear explanation of your changes.
๐น Avoid submitting minor PRs for small typos or README tweaks unless they significantly improve clarity.
This project is licensed under the AGPL-3.0 License. See the LICENSE file for details.
- AshokShau - Creator & Maintainer
- Thanks to all contributors & bug hunters for improving the project!
- Special thanks to PyTgCalls for their outstanding work.
Love TgMusicBot? Help keep it running!
๐ฐ Donate via Crypto, PayPal, or UPI โ Contact me on Telegram for details.
Every contribution helps! โค๏ธ
Follow me on GitHub for updates.
Star the repository on GitHub to support the project.