Skip to content

bisug/AnonXMusic

 
 

Repository files navigation

AnonXMusic

Telegram Group Calls Streaming Bot
Supports YouTube, Spotify, Resso, Apple Music, SoundCloud and M3U8 links.

Stars Forks License Python

AnonXMusic lets you stream high-quality and low-latency audio and video playback into telegram group video chats.
Built with Python, Pyrogram, and Py-TgCalls, it’s optimized for reliability and easy deployment on Heroku, Render, VPS, or Docker.


🔥 Features

  • 🎧 Stream low-latency audio in real time to Telegram group video chats
  • 🌐 Supports multiple platforms like YouTube, Spotify, Apple Music, SoundCloud
  • ⚡ Advanced queue management with auto-play
  • ⚙️ Easy deployment — works on Local, VPS, Heroku, or Render
  • ❤️ Built with Python

☁️ Manual Deployment

✔️ Prerequisites

Local / VPS Setup

🐧 Linux/macOS

git clone https://github.com/bisug/AnonXMusic.git && cd AnonXMusic

# Install uv
curl -Ls https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"

# Install dependencies
uv sync --frozen

# Rename and configure environment variables
mv sample.env .env
# Edit .env with your credentials

# Start the bot
bash start

🪟 Windows (PowerShell)

git clone https://github.com/bisug/AnonXMusic.git && cd AnonXMusic

# Install uv
irm https://astral.sh/uv/install.ps1 | iex

# Install dependencies
uv sync --frozen

# Rename and configure environment variables
mv sample.env .env
# Edit .env with your credentials

# Start the bot
uv run python3 -m anony

> ⭐ or use Git Bash or WSL to run `bash start`.

Deploy to Render

Click on the button below to deploy on Render
Deploy to Render

This repository includes a render.yaml Blueprint for Render. It deploys AnonXMusic as a Docker background worker because the bot runs continuously and does not expose an HTTP server.

To deploy from your fork instead:

  1. Fork this repository.
  2. Open the Render Blueprint dashboard.
  3. Connect your fork and select the branch that contains render.yaml.
  4. Fill in the required environment variables:
API_ID=
API_HASH=
BOT_TOKEN=
MONGO_URL=
LOGGER_ID=
OWNER_ID=
SESSION=

Optional:

COOKIES_URL=

Use COOKIES_URL only if your deployment needs cookies for YouTube playback. It accepts one or more batbin.me URLs separated by spaces.

  1. Deploy the Blueprint.

Auto deploy is disabled in render.yaml. Trigger deploys manually from Render after pushing updates. Render background workers require a paid worker instance. Use the Dockerfile included in this repo; no separate build or start command is needed.

Deploy to Heroku

Click on the button below to deploy on Heroku


⚙️ Configuration

Edit .env (or set variables in your hosting environment):

Here's an example of the .env file
API_ID=123456
API_HASH=abcdef1234567890
BOT_TOKEN=123456:ABC-DEF
OWNER_ID=123456789
LOGGER_ID=-1001234567890
MONGO_URL=mongodb+srv://
SESSION=BQgfh...AA

📝 Check config.py for all available options.


🧐 Usage

  1. Add the bot to your Telegram group.
  2. Promote it to admin with invite users permission.
  3. Use commands in the chat to control playback:
Commands overview
/play [song name or link] -> Play audio in the videochat
/vplay [song name or link] -> Play video in the videochat
/pause -> Pause playback
/resume -> Resume playback
/skip -> Skip to next track
/stop -> Stop playback
/seek -> Seeks the stream
/queue -> Show queue
    

❤️ Contributing

Contributions are welcome!

  1. Fork the repository.
  2. Create your branch: git checkout -b feature/new.
  3. Commit changes: git commit -m 'New feature'.
  4. Push: git push origin feature/new
  5. Open a Pull Request.

🗒️ License

This project is licensed under the MIT License — see LICENSE for details.


🤞 Updates and support


👀 Acknowledgements

  • Inspired by other open-source Telegram music bots.
  • Thanks to all the contributors.

⭐ Enjoying the tunes? Star the repo — feedback keeps the rhythm going!

About

Telegram Group Calls Streaming bot with some useful features, written in Python with Pyrogram and Py-Tgcalls. Supporting platforms like Youtube, Spotify, AppleMusic and M3u8 Links.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 97.2%
  • Shell 2.5%
  • Other 0.3%