TGMusicBot Beta
TgMusicBot is a telegram userbot for playing songs in telegram voice calls based on Pyrogram and PyTgCalls.
Show the commands!helpPlay a song in voice call, if already playing add to queueOr you can reply to a message with !play, it's same!play falling, !play https://www.youtube.com/watch?v=eIc4mqyN1Q8Play a remote stream in voice call, if already playing add to queue!remote http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/nonuk/sbr_low/ak/bbc_world_service.m3u8Skip to next song!skipLeave from voice call and clear the queue!leaveShow songs in the queue!queueShuflle the queue!shuffleShow currently playing song!nowChange the stream mode (audio/video)!modeMute stream!muteUnmute stream!unmutePause stream!pauseResume stream!resumeSwitch the loop mode!loopSwitch the quiet mode!quietSet bot language in a group!language enAdd user to blacklist in groupOr reply the user's message with !addbl you want to blacklist!addbl 111111111, !addbl (with reply)Remove user from blacklist in groupOr reply the user's message with !rmbl you want to unblacklist!rmbl 111111111, !rmbl (with reply)Get blacklisted user's ids in group!getblExport the queue for import in future (like playlist)Save the exported file!exportImport queue from exported fileReply the exported file with !import!import (with reply)Import playlist from youtube/spotifyThis command has some bugs!playlist https://open.spotify.com/playlist/3ZgmfR6lsnCwdffZUan8EARequires:
Python3.7+
Node.js15+
FFmpeg
git clone github.com/kursadHD/TgMusicBot.gitcd TgMusicBotmv config.env.example config.envnano config.env # edit your config filepip(3) install -r requirements.txt -Upython(3) main.py
| VARIABLE | DESCRIPTION | REQUIRED/OPTIONAL |
|---|---|---|
| SESSION | Pyrogram string session. (run python(3) session.py or @kursadHD/Pyrogram-String-Session-Generator">Generate Session String ) |
Required |
| API_ID | Telegram api id (get from https://my.telegram.org) | Required |
| API_HASH | Telegram api hash (get from https://my.telegram.org) | Required |
| SUDO | Sudo user ids (separate with space if more than one sudo) | Optional (default: Userbot’s id) |
| SPOTIFY_CLIENT_ID | Spotify client id (get from https://developer.spotify.com/dashboard) | Optional |
| SPOTIFY_CLIENT_SECRET | Spotify client secret (get from https://developer.spotify.com/dashboard) | Optional |
| LOG_LEVEL | Log level | Optional (default: error) |
| PREFIXES | Bot prefixes (separate with space) | Optional (default: !) |
| DEFAULT_LANG | Default language for groups | Optional (default: tr) |
| DEFAULT_STREAM_MODE | Default stream mode for groups (audio or video) | Optional (default: audio) |
If you find a bug, contact me via Telegram or create an issue