A next-generation, ultra-fast, lag-free Telegram Music Bot built with Pyrogram v2 and PyTgCalls. Designed to deliver the smoothest audio experience on low-resource servers like Render.
- ⚡️ Stable Streaming: Songs are pre-downloaded and converted to 48 kHz stereo PCM WAV before playback to reduce live-stream buffering.
- 🎨 Premium UI/UX:
- 𝖡𝗈𝗅𝖽 𝖲𝖺𝗇𝗌, 𝙄𝙩𝙖𝙡𝙞𝙘, and sᴍᴀʟʟ ᴄᴀᴘꜱ fonts for all messages.
- ① ② ③ Circled numbering for the queue system.
- ▰▰▰▱▱▱ Sleek progress bars with glow separators.
- 🔍 Single animated status emoji for Telegram's native emoji animation.
- 🎵 Advanced Search: High-speed search with branded results and rich metadata.
- 🎛 Interactive Controls: 4-row button grid for Play, Pause, Skip, Stop, Replay, and more.
- 🚀 Mini App Support: Integrated link to launch a beautiful mini app interface.
- 🔄 Smart Queue: Automated playback with background pre-fetching.
Before running the bot, ensure you have the following installed:
- Python 3.10 or higher
- FFmpeg: Required by the voice streaming stack.
Click the button below to deploy directly to Render. The repo includes a Dockerfile to automatically handle FFmpeg installation!
-
Clone the repository:
git clone http://github.com/ajisth69/pain-music-bot.git cd pain-music-bot -
Install dependencies:
pip install -r requirements.txt
-
Configure Environment Variables: Create a
.envfile in the root directory and fill in your credentials (see configuration section below). -
Run the Bot:
python main.py
Create a .env file or set these variables in your hosting provider:
API_ID=your_api_id
API_HASH=your_api_hash
BOT_TOKEN=your_bot_token
SESSION_STRING=your_pyrogram_session_string
OWNER_ID=your_telegram_user_id
OWNER_USERNAME=your_telegram_username
BOT_USERNAME=your_bot_username/play <song name>- Search and play a song in voice chat./pause- Pause the current stream./resume- Resume the paused stream./skip- Skip to the next song in queue./stop- Stop streaming and leave the voice chat./ping- Check bot's latency and system stats./owner- Get owner and support information.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to read the CODE_OF_CONDUCT.md before contributing.
This project is licensed under the MIT License - see the LICENSE file for details.
If you discover any security-related issues, please refer to our SECURITY.md for reporting guidelines.
Made with ❤️ by ajisth69