A high-performance, open-source Telegram Music Bot written in Go — stream music and video in Telegram voice chats effortlessly.
TgMusicBot leverages a powerful combination of Go libraries — using gogram
for efficient Telegram Bot API integration and ntgcalls
for robust, low-latency audio and video playback.
It supports streaming from popular sources like YouTube, making it a complete solution for Telegram music lovers and communities.
Feature | Description |
---|---|
🎧 Multi-Platform Support | Stream directly from YouTube, Spotify, Apple Music, SoundCloud and more |
📜 Playlist Management | Queue system with auto-play & next-track handling |
🎛️ Advanced Controls | Volume, loop, seek, skip, pause/resume |
⚡ Low Latency | Optimized audio with ntgcalls |
🐳 Docker Ready | Deploy anywhere in one click |
🧠 Built with Go | Stable, concurrent, and memory-efficient |
For manual setup instructions for Linux, macOS, and Windows, please see the Installation Guide.
The guide provides comprehensive instructions for deploying the bot using:
- 🐳 Docker (Recommended)
- 🔧 Manual Installation (Linux, macOS, and Windows)
Copy sample.env
→ .env
and fill the required values:
Variable | Description | How to Get |
---|---|---|
API_ID |
Your Telegram app’s API ID | my.telegram.org |
API_HASH |
Your Telegram app’s API hash | my.telegram.org |
TOKEN |
Your bot token | @BotFather |
STRING1 |
Your user session string | Your 2nd acc. string session |
MONGO_URI |
MongoDB connection string | MongoDB Atlas |
OWNER_ID |
Your Telegram user ID | @GuardXRobot > /id |
LOGGER_ID |
Group chat ID for logs | Add bot to group & check chat_id |
SESSION_TYPE |
Type of session string | pyrogram (default), telethon , or gogram |
API_KEY |
Your API key | @FallenApiBot > /apikey |
Command | Description |
---|---|
/play [song/url] |
Play audio from YouTube or a URL |
/vplay [video/url] |
Play video in the voice chat |
/skip |
Skip the current track |
/pause |
Pause playback |
/resume |
Resume playback |
/stop or /end |
Stop and clear queue |
/queue |
Show the active queue |
/loop [on/off] |
Loop the current track |
/auth [reply] |
Authorize a user for admin commands |
/unauth [reply] |
Remove user authorization |
/authlist |
List authorized users |
TgMusicBot/
├── pkg/
│ ├── config/ # Configuration loading
│ ├── core/ # Core logic: database, caching, etc.
│ ├── handlers/ # Telegram command handlers
│ └── vc/ # Voice chat management
├── sample.env # Example environment config
├── Dockerfile # Docker build configuration
├── go.mod # Go module definition
└── main.go # Application entry point
Contributions are welcome!
To contribute:
- Fork the repo
- Create your feature branch →
git checkout -b feature/AmazingFeature
- Commit changes →
git commit -m 'Add some AmazingFeature'
- Push →
git push origin feature/AmazingFeature
- Open a pull request
⭐ If you like this project, please star it — it helps others find it!
If you find this project useful, consider supporting its development with a donation:
- TON:
UQDkCHTN1CA-j_5imVmliDlkqydJhE7nprQZrvFCakr67GEs
- USDT TRC20:
TJWZqPK5haSE8ZdSQeWBPR5uxPSUnS8Hcq
- USDT TON:
UQD8rsWDh3VD9pXVNuEbM_rIAKzV07xDhx-gzdDe0tTWGXan
- Telegram Wallet: @Ashokshau
Licensed under the GNU General Public License (GPL v3).
See the LICENSE file for details.
- 📦 Repo: TgMusicBot on GitHub
- 💬 Support: Telegram Group
- 🐍 Old version: TgMusicBot (Python)