Giter Site home page Giter Site logo

kshubham506 / vcplayerbot Goto Github PK

View Code? Open in Web Editor NEW
51.0 3.0 115.0 1.52 MB

Play songs directly in telegram voice chats.

Home Page: https://t.me/voicechatsupport

Python 99.76% Dockerfile 0.22% Procfile 0.02%
telegram-bot telegram voice-chat song songs music music-player vc sktechhub vcplayer

vcplayerbot's Introduction

Telegram VCPlayer Bot

Play any media(song, video, live, remote) directly into your group voice chat.

Official Bot : VCPlayerBot | Discussion Group : VoiceChat Music Player Support

Checkout AutoForwarder Bot | Try Code Compile Bot

Requirements

  1. Telegram Api Id and Hash [ Get it from http://my.telegram.org ]
  2. A Telegram Bot Token. Get it from @botfather
  3. Python 3.6+
  4. [ Optional, only use if you are an advanced user ] Mongo DB [ Create free account from mongo website and get your connection string. ]

Deploying To Heroku

  1. Get your telegram API ID and API HASH from my.telegram.org and the BOT TOKEN from @botfather
  2. Generate your telegram session string using the Run on Repl button below (Click on run after opening the url below) or use the generateSession.py file or read the steps mentioned here.
  • Run on Repl.it
  1. Click on the Deploy to Heroku button below. Fill in the required fields on the website that opens.
  • Deploy
  1. Add the bot to your group and send the commands to start using the VCPlayer Bot :)

Steps To Setup on VPC or Locally

  1. Read the steps mentioned here to get your session string.
  2. Rename .env copy to .env and fill all the values there. You can leave the MONGO_URL line as it is (only fill if you know what you are doing)

Steps to Run

  1. After the setup is done.
  2. Install the requirements : pip3 install -U -r requirements.txt
  3. Run the service by :
  • Run python3 main.py -env prod

  • (make sure -env prod flag is provided, if not rename .env file to .env.copy)

Environmental Variables

Starting from command line:

  • python3 main.py -env prod|local

Available env variables

  • Mandataory API_ID : get it from my.telegram.org

  • Mandataory API_HASH : get it from my.telegram.org

  • Mandataory BOT_TOKEN : bot token of your music bot, get it from @botfather

  • Mandataory USERBOT_SESSION : user bot pyrogram session string, read the steps mentioned here to get your session string.

  • Optional MONGO_URL : connection url for mongo databse. needed if you wnat to run the service in single mode

  • Many other optional variables, check Config.py file for details.

Features

Streams directly from url, Playlist support

Command Description
/start , /help Lists the available commands.
/play song_name/song_url -res[num] Starts the song in the voice chat, num specifies the audio resolution. eg. /play coldplay -res256 โ†’ plays coldplay song in 256 bit rate
/play song_name/song_url -video -res[num] Starts the video in the voice chat, num specifies the video resolution. eg. /play coldplay -res2480 โ†’ plays coldplay video in 480p
/skip Skip the current media playback.
/stop Stops the playback.

Developer

Shubham Kumar

For any issues/questions please contact here

Pull Requests are more than welcome.

vcplayerbot's People

Contributors

kshubham506 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vcplayerbot's Issues

error

File "/opt/virtualenvs/python3/lib/python3.8/site-packages/asyncio/base_events.py", line 296
future = tasks.async(future, loop=self)

youtube-dl blocks the main thread

  • Use a queue to maintain the number of simultaneous downloads in a separate thread.
  • This will allow the bot to respond to user events and also prevent the over utilisation of resources.

is the buffering issue from a long time?

Like after playing one or two songs.. the song play quality gets very low.. and it strucks a lot in the playback .

Is this problem from the very start or is this started occuring in recent days?

Bot isn't reading commands from other group bots

I have two bots in my group, ROSE and this music bot.

I set ROSE up so when someone posts a keyword (ie SONG) then ROSE will reply in the group with the command /play and a youtube url i have saved.

The vcplayerbot is not doing anything.

If I manually enter the command myself it works and the bot plays.

If I remove all mentions of ~filters.bot in all the files, it doesn't change the behavior for me.

If I change the filters to specify filters.bot instead of ~filters.bot , it stil doesn't work.

Again, If I manually enter the command it does work.

I've tried this with ROSE, GROUP BUTLER and also a custom made message bot and none of their commands are listened to by vcplayerbot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.