Skip to content

Telegram Group Calls Streaming bot with some useful features, written in Python with Py-Tgcalls. Supporting platforms like YouTube, Spotify, AppleMusic, Soundcloud, JioSaavn and more.

License

Notifications You must be signed in to change notification settings

diamont-rain/TgMusicBot

 
 

Repository files navigation

🎵 TgMusicBot — Telegram Music Bot

A high-performance, open-source Telegram Music Bot written in Go — stream music and video in Telegram voice chats effortlessly.

Stars Forks License Go Report Card Go

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.


✨ Key Features

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

🚀 Getting Started

🔧 Manual Setup

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)

⚙️ Configuration

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

🤖 Commands

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

🧩 Project Structure

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

🤝 Contributing

Contributions are welcome!
To contribute:

  1. Fork the repo
  2. Create your feature branch → git checkout -b feature/AmazingFeature
  3. Commit changes → git commit -m 'Add some AmazingFeature'
  4. Pushgit push origin feature/AmazingFeature
  5. Open a pull request

⭐ If you like this project, please star it — it helps others find it!


❤️ Donate

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

📜 License

Licensed under the GNU General Public License (GPL v3).
See the LICENSE file for details.


💬 Links

About

Telegram Group Calls Streaming bot with some useful features, written in Python with Py-Tgcalls. Supporting platforms like YouTube, Spotify, AppleMusic, Soundcloud, JioSaavn and more.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.4%
  • Other 0.6%