Skip to content

Advanced Telegram Music Bot with YouTube/yt-dlp streaming, live radio, studio-quality audio playback in voice chats. Python-based with Pyrogram & PyTgCalls. Features: playlist/queue management, multi-language support, MongoDB integration, multi-assistant load balancing, admin controls, async architecture. Perfect for group music streaming.

License

Notifications You must be signed in to change notification settings

hasindu-nagolla/HasiiMusicBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hasii Music Bot

🎡 Hasii Music Bot

A Powerful Telegram Music Player Bot

Telegram Telegram


✨ Features

  • 🎡 High Quality Music Streaming - Crystal clear audio with STUDIO quality
  • πŸ“» Live Radio Streaming - 50+ international and local radio stations
  • 🎧 YouTube Support - Play music from YouTube links or search
  • πŸ“ Queue System - Manage multiple songs in queue
  • ⚑ Fast & Reliable - Built with Pyrogram and PyTgCalls
  • πŸŽ› Admin Controls - Pause, resume, skip, and stop controls
  • 🌐 Multi-Language - Supports English and Sinhala
  • πŸ‘₯ User Authorization - Authorized users can control playback
  • πŸ“Š Statistics - Track bot usage and performance
  • πŸ”„ Auto-Leave - Automatically leaves inactive voice chats

πŸš€ Deployment

βœ”οΈ Prerequisites

  • Python 3.10+ installed
  • Deno & FFmpeg installed on your system
  • Required variables mentioned in sample.env

Requirements

  • Python 3.12+
  • MongoDB Database
  • Telegram Bot Token
  • Telegram API ID & Hash
  • Pyrogram String Session

Environment Variables

Create a .env file with the following variables:

API_ID=your_api_id
API_HASH=your_api_hash
BOT_TOKEN=your_bot_token
MONGO_DB_URI=your_mongodb_uri
LOGGER_ID=your_logger_group_id
OWNER_ID=your_user_id
STRING_SESSION=your_pyrogram_session
COOKIE_URL=youtube_cookies_url (optional)

Installation

  1. Clone the repository
git clone https://github.com/hasindu-nagolla/HasiiMusicBot
cd HasiiMusicBot
  1. Install dependencies
pip install -r requirements.txt
  1. Set up environment variables
cp sample.env .env
# Edit .env with your values
  1. Run the bot
bash start

Docker Deployment

docker build -t hasii-music-bot .
docker run -d --env-file .env hasii-music-bot

πŸ“– Commands

User Commands

  • /play - Play a song (YouTube URL or search query)
  • /radio - Browse and play live radio stations
  • /queue - View current queue
  • /ping - Check bot status
  • /help - Show help menu
  • /lang - Change language

Admin Commands

  • /pause - Pause current stream
  • /resume - Resume paused stream
  • /skip - Skip current track
  • /stop - Stop playing and clear queue
  • /seek - Seek to specific timestamp
  • /reload - Reload admin cache

Sudo Commands

  • /stats - View bot statistics
  • /broadcast - Broadcast message to all chats
  • /addsudo - Add sudo user
  • /rmsudo - Remove sudo user
  • /restart - Restart the bot
  • /logs - Get bot logs

πŸ›  Configuration

Audio Quality Settings

The bot streams audio at STUDIO quality (highest available) with:

  • Codec: Opus (best quality for music)
  • Format: WebM container for audio downloads
  • Sample Rate: 48kHz
  • Channels: Stereo
  • Optimization: 16 concurrent downloads, 1MB chunks

Customization

  • Modify language files in HasiiMusic/locales/
  • Customize thumbnails and images in config.py
  • Adjust queue limits and duration in config.py

πŸ“ž Support & Contact


πŸ“ Notes

  • Make sure your bot is admin in both the group and logger group
  • The assistant account will auto-join groups when needed for playback
  • Keep your .env file secure and never share it publicly
  • For YouTube downloads, cookies may be required for some videos
  • Radio streams are live - no duration limits or downloads needed

πŸ™ Credits

Special thanks to AnonymousX1025 for the original inspiration.


Made with ❀️ by Hasindu Nagolla

Β© 2025 Hasii Music Bot. All rights reserved.

About

Advanced Telegram Music Bot with YouTube/yt-dlp streaming, live radio, studio-quality audio playback in voice chats. Python-based with Pyrogram & PyTgCalls. Features: playlist/queue management, multi-language support, MongoDB integration, multi-assistant load balancing, admin controls, async architecture. Perfect for group music streaming.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages