Play any song directly into your group voice chat.
Official Bot : VCPlayerBot | Discussion Group : VoiceChat Music Player Support
- Telegram Api Id and Hash [ Get it from my.telegram.org ]
- A Telegram Bot Token. Get it from @botfather.
- Python 3.6+
- ffmpeg [ How to Install ? ]
- [ Optional ] Mongo DB [ Create free account from mongo website and get your connection string. ]
- Get your telegram API ID and API HASH from my.telegram.org and the BOT TOKEN from @botfather.
- Generate your telegram session string using the
Run on Repl
button below (Click on run after opening the url below) or use thegenerateSession.py
file.
- Clcik on the
Deploy to Heroku
button below. Fill in the required fields on the website that opens.
- Add the bot to your group and send the commands to start using the VCPlayer Bot :)
- Install pyrogram for generatong session string :
pip3 install -U pyrogram
- Generate your telegram session string. Run
python3 generateSession.py
- Rename
.env copy
to.env
and fill all the required/mandatory fields in there. - [ Optional ] In Mongo DB a database named
sktechhub
will be created with the collectionstgcalls_chats
,tgcalls_playbacks
,tgcalls_users
( if not present then create them manually).
- After the setup is done.
- Install ffmpeg :
sudo apt-get install ffmpeg
- Install the requirements :
pip3 install -U -r requirements.txt
- Run the service by :
- Run
python3 main.py --help
for available settings. - Or Run
python3 main.py -env prod
to use default settings
Starting from command line:
- python3 main.py -env
prod|local
-modesingle|multiple
-autoleaveon|off
Available env varibales
Mandataory
API_ID : get it from my.telegram.orgMandataory
API_HASH : get it from my.telegram.orgMandataory
BOT_TOKEN : bot token of your music bot, get it from @botfatherMandataory
USERBOT_SESSION : user bot pyrogram session string, generate it using thegenerateSession.py
file present in the root directory of repo.Optional
MONGO_URL : connection url for mongo databse. needed if you wnat to run the service in single modeOptional
MODE : single|multiple single mode means bot will be allowed only in one group, multiple means allowed in multiple groups. It ismultiple
by default. If you want to run in single mode thenMONGO_URL
is must.Optional
AUTO_LEAVE : on|off turning this on will make the user bot to leave the grp automatically at regular intervals. It isoff
by default.
Command | Description |
---|---|
/start , /help | Lists the available commands. |
/play song_name | Starts the song in the voice chat. |
/skip | Skips the current song. |
/stop | Stops the playback. |
/loop off , /loop [2-5] | Loops the song to x times. |
/info | Shows the info of the playback in the chat. |
/refreshadmins | Refreshes the admin list in the chat. |
/auth | Adds the user mentioned in the reply to bot admin list. |
/unauth | Removes the user mentioned in the reply from bot admin list. |
/listadmins | Lists all the bot admins. |
/adminmode [on,off] | Turn on/off the admin mode. |
For any issues/questions please contact here
Pull Requests are more than welcome.