Skip to content
/ AnnieXMusic Public template

🎵 Advanced Telegram music bot built with Python, Pyrogram, and PyTgCalls. Features include playlists, lyrics search, live concert updates, and full music + group management.

License

Notifications You must be signed in to change notification settings

CertifiedCoders/AnnieXMusic

Repository files navigation

🌟 What is AnnieXMusic?

AnnieXMusic is a modern Telegram bot that streams high-quality music into group voice chats. Powered by Pyrogram + PyTgCalls, it supports multiple platforms like YouTube, Spotify, Apple Music, SoundCloud, Resso, and more. It also includes basic group management features for convenience.

🚀 Features

🌟 Feature 🔎 Description
🎶 HQ Music Streaming Lag‑free HD audio in group voice chats
🌐 Multi‑Platform Sources YouTube, Spotify, Apple Music, Resso, etc.
👮 Group Management Tools Promote/demote, mute/kick, etc.
⚡ Fast Setup One‑click Heroku, VPS, or Docker deployment
🔄 Auto Config Quick setup script with pre‑checks

🔑 Environment Variables

Below are the required and optional environment variables for deployment.

API_ID=              # Required - Get from https://my.telegram.org
API_HASH=            # Required - From https://my.telegram.org
BOT_TOKEN=           # Required - Get t.me/BotFather
OWNER_ID=            # Required - Your Telegram user ID
LOGGER_ID=           # Required - Log group/channel ID
STRING_SESSION=      # Required - Generate from @SessionBuilderbot
MONGO_DB_URI=        # Required - MongoDB connection string
COOKIE_URL=          # Required - YT Cookies url

DEEP_API=            # Optional - Get from https://deepai.org
API_KEY=             # Optional - External API key for song Download
VIDEO_API_URL=       # Optional - External API url for video Download
API_URL=             # Optional - External API url for audio Download

⚠️ Never expose raw cookies or tokens in public repos. Use safe paste services like Pastebin or Batbin.

Where do I get each key?
Key Where to Get It Steps Notes
API_ID & API_HASH my.telegram.orgAPI Development Tools 1) Log in with Telegram → 2) Open API Development Tools → 3) Create app → 4) Copy values Keep these private. Needed by both userbot & bot client.
BOT_TOKEN @BotFather 1) /newbot → 2) Set name & username → 3) Copy the token Rotate if leaked. Store in .env.
STRING_SESSION @SessionBuilderbot 1) Start bot → 2) Provide API_ID/API_HASH → 3) Complete login → 4) Copy string Userbot auth for Pyrogram.
LOGGER_ID Telegram Channel/Group you own 1) Create private channel/group → 2) Add your bot as admin → 3) Get ID via @AnnieXRobot or @MissRose_Bot Use a private space so logs aren’t public.
MONGO_DB_URI MongoDB Atlas 1) Create free cluster → 2) Add database user & IP allowlist → 3) Copy connection string (mongodb+srv://...) Required for persistence (queues, configs, etc.).
COOKIE_URL Any secure host (e.g., Pastebin, Batbin) 1) Upload your cookies.txt privately → 2) Set paste visibility to Unlisted → 3) Copy the raw URL Improves YouTube reliability. Never commit raw cookies.
DEEP_API / API_KEY / API_URL/ VIDEO_API_URL Provider of your choice Sign up → generate key → paste here Optional integrations (AI/extras).

☕ VPS Setup Guide

Toggle VPS Steps

Details
🎵 Deploy AnnieXMusic on VPS

# Step 1: Update & Install Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install -y git curl python3-pip python3-venv ffmpeg unzip tmux

# Step 2: Install Deno (for yt-dlp) —
curl -fsSL https://deno.land/install.sh | sh
# → When prompted: "Edit shell configs to add deno to the PATH? (y/n)" → Type: y
source ~/.bashrc

# Step 3: Clone & Setup
git clone https://github.com/CertifiedCoders/AnnieXMusic
cd AnnieXMusic
tmux new -s Annie

# Inside tmux:
python3 -m venv venv
source venv/bin/activate
pip install -U pip && pip install -r requirements.txt

bash setup  # Fill: API_ID, BOT_TOKEN, COOKIE_URL, etc.
bash start  # Run bot

### Useful Commands
tmux detach                      # Use Ctrl+B, then D
tmux attach-session -t Annie       # Reattach session
tmux kill-session -t Annie         # Kill bot session
rm -rf AnnieXMusic                # Uninstall bot

🐳 Docker Deployment

Toggle Docker Steps

Details
### Step 1: Clone Repo
git clone https://github.com/CertifiedCoders/AnnieXMusic
cd AnnieXMusic

### Step 2: Create .env File
nano .env
# Paste your environment variables here and save (Ctrl+O, Enter, Ctrl+X)

### Step 3: Build Image
docker build -t anniexmusic .

### Step 4: Run Container
docker run -d --name annie --env-file .env --restart unless-stopped anniexmusic

### Step 5: Manage Container
docker logs -f annie        # View logs (Ctrl+C to exit)
docker stop annie           # Stop container
docker start annie          # Start again
docker rm -f annie          # Remove container
docker rmi anniexmusic      # Remove image

☁️ Quick Deploy

Platform Deploy Link
🔑 Generate Session
🌍 Heroku Deploy

💬 Community & Support

🔖 Credits

About

🎵 Advanced Telegram music bot built with Python, Pyrogram, and PyTgCalls. Features include playlists, lyrics search, live concert updates, and full music + group management.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 7

Languages