TgMusicBot

command module
v1.2.5-0...-67eddf4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

README ΒΆ

🎡 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)
πŸš€ Deploy to Heroku

You can also deploy this bot to Heroku.

Deploy


βš™οΈ 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
COOKIES_URL Cookies URL for the bot Cookie Guide

πŸ€– 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. Push β†’ git 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.


Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL