A high-performance Telegram Voice Chat Bot for streaming music from YouTube, Spotify, JioSaavn, and more. Built with Python, Py-Tgcalls, and PyTdBot.
π₯ Live Bot: @FallenBeatzBot
Feature | Description |
---|---|
π§ Multi-Platform Support | YouTube, Spotify, Apple Music, SoundCloud, JioSaavn |
π Playlist Management | Queue system with auto-play |
ποΈ Advanced Controls | Volume, loop, seek, skip, pause/resume |
π Multi-Language | English, Hindi, Spanish, Arabic support |
β‘ Low Latency | Optimized with PyTgCalls |
π³ Docker Ready | One-click deployment |
π Anti-Ban | Cookie & API-based authentication |
π 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
i
to 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
i
to edit - Save:
Esc
β:wq
β Enter
- Press
-
-
Start in tmux session (keeps running after logout):
tmux new -s musicbot tgmusic
Tmux Cheatsheet:
- Detach:
Ctrl+B
thenD
- 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
π Required Variables (Click to expand)
Variable | Description | How to Get |
---|---|---|
API_ID |
Telegram App ID | my.telegram.org |
API_HASH |
Telegram App Hash | my.telegram.org |
TOKEN |
Bot Token | @BotFather |
STRING1-10 |
Pyrogram Sessions (Only 1 Required) | @StringFatherBot |
MONGO_URI |
MongoDB Connection | MongoDB Atlas |
OWNER_ID |
User ID of the bot owner | @GuardxRobot and type /id |
LOGGER_ID |
Group ID of the bot logger | Add @GuardxRobot to the group and type /id |
Variable | Description | How to Get |
---|---|---|
API_URL |
API URL | Start @FallenApiBot |
API_KEY |
API Key | Start @FallenApiBot and type /apikey |
MIN_MEMBER_COUNT |
Minimum number of members required to use the bot | Default: 50 |
PROXY |
Proxy URL for the bot if you want to use it for yt-dlp (Optional) | Any online service |
COOKIES_URL |
Cookies URL for the bot | |
DEFAULT_SERVICE |
Default search platform (Options: youtube, spotify, jiosaavn) | Default: youtube |
SUPPORT_GROUP |
Telegram Group Link | Default: https://t.me/GuardxSupport |
SUPPORT_CHANNEL |
Telegram Channel Link | Default: https://t.me/FallenProjects |
AUTO_LEAVE |
Leave all chats for all userbot clients | Default: True |
START_IMG |
Start Image URL | Default: IMG |
DEVS |
User ID of the bot owner | @GuardxRobot and type /id : e.g. 5938660179, 5956803759 |
API_URL=https://tgmusic.fallenapi.fun
API_KEY=your-secret-key
π Get keys: Contact @AshokShau or @FallenApiBot
Command | Description |
---|---|
/play [query] |
Play music from supported platforms |
/skip |
Skip current track |
/pause / /resume |
Control playback |
/volume [1-200] |
Adjust volume |
/queue |
Show upcoming tracks |
/loop |
Enable/disable loop |
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit changes (
git commit -m 'Add some AmazingFeature'
) - Push to branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Note: Minor typo fixes will be closed. Focus on meaningful contributions.
AGPL-3.0 Β© AshokShau.