- π΅ 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
- Python 3.10+ installed
- Deno & FFmpeg installed on your system
- Required variables mentioned in sample.env
- Python 3.12+
- MongoDB Database
- Telegram Bot Token
- Telegram API ID & Hash
- Pyrogram String Session
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)- Clone the repository
git clone https://github.com/hasindu-nagolla/HasiiMusicBot
cd HasiiMusicBot- Install dependencies
pip install -r requirements.txt- Set up environment variables
cp sample.env .env
# Edit .env with your values- Run the bot
bash startdocker build -t hasii-music-bot .
docker run -d --env-file .env hasii-music-bot/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
/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
/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
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
- Modify language files in
HasiiMusic/locales/ - Customize thumbnails and images in
config.py - Adjust queue limits and duration in
config.py
- Developer: Hasindu Nagolla
- Telegram Channel: @TheInfinityAI
- Support Group: @Hasindu_Lakshan
- GitHub: hasindu-nagolla
- 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
.envfile 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
Special thanks to AnonymousX1025 for the original inspiration.
