Telegram music bot for searching, playing, downloading, lyrics, trending songs, queue, playlists, resume uploads, and inline search.
- Commit:
5955e26 - Message:
fix_inline_help_jsruntime - Includes:
- Fixed inline search flow and result payload
- Added
/helpwith detailed examples - Fixed
yt-dlpjs_runtimesformat error
- MP3 delivery from YouTube search/url
/searchwith paginated buttons (Play/Queue)/downloadand/play/lyrics(Genius + fallback)/info/trending- Queue:
/queue,/skip - Playlists: create/list/add/show/play/remove/removeitem
/resumefor failed/partial uploads- Inline mode:
@your_bot_username <song or artist>
/start/help/play <song|artist|url>/search <song|artist>/download <song|artist|url>/lyrics <song and artist>/info <song|artist|url>/trending/queue/skip/playlist <subcommand>/resume
Unmusic_Bastard/
bot/
main.py
handlers.py
player.py
lyrics.py
trending.py
queue.py
downloads/
covers/
logs/
.env
requirements.txt
docker-compose.yml
- Clone repo:
git clone https://github.com/David15935/Unmusic_Bastard.git
cd Unmusic_Bastard- Create venv and install dependencies:
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt- Install FFmpeg (Windows):
winget install --id Gyan.FFmpeg -e --source winget --accept-source-agreements --accept-package-agreements- Install Node.js (recommended for yt-dlp JS extraction):
winget install -e --id OpenJS.NodeJS.LTS --source winget --accept-source-agreements --accept-package-agreements- Create
.env:
BOT_TOKEN=your_telegram_bot_token
GENIUS_TOKEN=your_genius_api_token.venv\Scripts\python -m bot.main- Push this repo to GitHub (already done).
- Go to Railway dashboard and create a new project from GitHub repo
David15935/Unmusic_Bastard. - Railway will detect
Dockerfileand build automatically. - Add environment variables in Railway service:
BOT_TOKEN=your_telegram_bot_tokenGENIUS_TOKEN=your_genius_api_token
- Deploy the service.
- Verify logs show
Starting Music Bot...andApplication started.
Notes:
- This bot is a background worker (long polling), not a web server.
- Keep only one active bot instance to avoid Telegram polling conflicts.
- Open bot chat and run:
/start
/help
- Quick examples:
/play burna boy last last
/search adele hello
/download https://www.youtube.com/watch?v=dQw4w9WgXcQ
/lyrics love nwantiti ckay
/info calm down rema
/trending
- Inline mode usage:
- Enable inline mode in BotFather (
/setinline) - In any chat type:
@your_bot_username asake lonely at the top
- If upload breaks on long file:
/resume
- Install Docker Desktop.
- Configure
local-bot-api.envfromlocal-bot-api.env.example. - Start:
docker compose up -d- Add to
.env:
LOCAL_BOT_API_URL=http://localhost:8081/bot
LOCAL_BOT_API_FILE_URL=http://localhost:8081/file/bot- Telegram cloud Bot API has upload limits per file.
- This bot can split large files and send in parts.
- For very high concurrency, use VPS + webhook + queue workers.