Giter Club home page Giter Club logo

telegram_vc_bot's Introduction

Telegram Voice-Chat Bot [PyTGCalls] Mentioned in Awesome Telegram Calls

Telegram Voice-Chat Bot To Play Music With Pytgcalls From Various Sources In Your Group.

Requirements

Account requirements

  • A Telegram account to use as the music bot, You cannot use regular bot accounts, as they cannot join voice chats. It must be a user account.
  • API_ID and API_HASH for that account.
  • The account must be an admin of the chat, with Manage Voice Chats and Delete Messages permissions.

Environment requirements

  • Linux-based OS. You cannot run this on Windows natively, Use WSL
  • Python 3.9 or later.
  • ffmpeg package, look below for instructions.

Run (Assuming you have a debian-based distro)

$ git clone https://github.com/thehamkercat/Telegram_VC_Bot
$ cd Telegram_VC_Bot
$ sudo apt-get install ffmpeg
$ pip3 install -U pip
$ pip3 install -U -r requirements.txt
$ cp sample_config.py config.py

Edit config.py with your own values.

$ python3 main.py

Heroku

Read this -> https://t.me/TGVCSupport/17542

Generate String session [IMPORTANT]

Download this file generate_string_session.py

$ pip3 install pyrogram TgCrypto
$ python3 generate_string_session.py

Fork this repository and change name of sample_config.py to config.py Then you will need get a session string, copy it, then press heroku deploy button.

Deploy

Send commands to bot to play music.

Docker

$ git clone https://github.com/thehamkercat/Telegram_VC_Bot && cd Telegram_VC_Bot
$ cp sample.env .env

Edit .env with your own values.

$ sudo docker build . -t tgvc-bot
$ sudo docker run tgvc-bot

To stop use CTRL+C

Commands

Command Description
/help Show Help Message.
/skip Skip Any Playing Music.
/play [SONG_NAME] To Play A Song Using Saavn.
Service used can be changed in config (DEFAULT_SERVICE).
/play youtube/saavn [SONG_NAME] To Play A Song Using Specific Service.
/play [with reply to an audio file] To Play A Song With TG Audio File.
/queue Check Queue Status.
/delqueue Deletes Queue List and Playlist.
/playlist [songs name separated by line] Start Playing Playlist.
/joinvc Join Voice Chat.
/leavevc Leave Voice Chat.
/volume [1-200] Adjust Volume.
/pause Pause Music.
/resume Resume Music.

Note

  1. If you want any help you can ask here

Credits

  1. @MarshalX, For TGCalls
  2. Thanks to everyone who contributed to the project.

telegram_vc_bot's People

Contributors

ajayk-01 avatar asmsafone avatar devanagaraj avatar moji-asg avatar predator-dev avatar remls avatar subinps avatar tejas61900 avatar thehamkercat avatar tiodexty 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram_vc_bot's Issues

VPS

can I run it at VPS?

unable to deploy on heroku using deploy button

Item could not be created:

We couldn't deploy your app because the source code violates the Salesforce Acceptable Use and External-Facing Services Policy.

heroku is showing this, what if i used heroku cli will it still show this error or get deployed?

Termux debian

Traceback (most recent call last): File "/root/Telegram_VC_Bot/main.py", line 21, in from functions import (CHAT_ID, app, get_default_service, play_song, File "/root/Telegram_VC_Bot/functions.py", line 6, in import aiofiles ModuleNotFoundError: No module named 'aiofiles'


Traceback (most recent call last): File "/root/Telegram_VC_Bot/main.py", line 21, in from functions import (CHAT_ID, app, get_default_service, play_song, File "/root/Telegram_VC_Bot/functions.py", line 9, in from aiohttp import ClientSession ModuleNotFoundError: No module named 'aiohttp'


Traceback (most recent call last): File "/root/Telegram_VC_Bot/main.py", line 21, in from functions import (CHAT_ID, app, get_default_service, play_song, File "/root/Telegram_VC_Bot/functions.py", line 10, in from PIL import Image, ImageDraw, ImageFont ModuleNotFoundError: No module named 'PIL'


Traceback (most recent call last): File "/root/Telegram_VC_Bot/main.py", line 21, in from functions import (CHAT_ID, app, get_default_service, play_song, File "/root/Telegram_VC_Bot/functions.py", line 15, in from Python_ARQ import ARQ ModuleNotFoundError: No module named 'Python_ARQ'

Not working sometimes

Sometimes I have to rerun it many times or using /leavevc and /joinvc several times to make it work.
whenever the bot is in voicechat and doesn't singing, it will leave the voicechat automatically after 10-120s.

Bot started but command not recognising

I get bot started message but commands not recognising. I gave all permission to user.

config.py

HEROKU = False  # NOTE Make it false if you're not deploying on heroku.

# NOTE these values are for heroku & Docker.
if HEROKU:
    from os import environ

    from dotenv import load_dotenv

    load_dotenv()  # take environment variables from .env.
    API_ID =7666666666 
    API_HASH ="xxxxxx"
    SESSION_STRING ="xxxxx"
    ARQ_API_KEY ="Axxxxxxx"
    CHAT_ID =-100950500428
    DEFAULT_SERVICE ="youtube"
    BITRATE =512 

# NOTE Fill this if you are not deploying on heroku.
if not HEROKU:
    API_ID =6666666 
    API_HASH ="xxdddddd"
    SESSION_STRING ="xxxxxxx"
    ARQ_API_KEY ="xxxdddddd"
    CHAT_ID =-100950500428
    DEFAULT_SERVICE ="youtube"
    BITRATE =512 

    
# don't make changes below this line
ARQ_API = "https://arq.hamker.in"

mpv issue

Every time i want to play radio, console says mpv: no process found
What should i do. (I am running bot on linux server)

Bot doesnt respond to messages

I followed the installation instructions. Launched the bot. The terminal displays the message "Bot started" but the bot does not respond to messages. What should I do?

ERROR: Cannot install -r requirements.txt (line 2) because these package versions have conflicting dependencies.

The conflict is caused by:
pytgcalls 0.0.19 depends on tgcalls==0.0.12
pytgcalls 0.0.18 depends on tgcalls==0.0.12
pytgcalls 0.0.17 depends on tgcalls==0.0.11
pytgcalls 0.0.16 depends on tgcalls==0.0.10
pytgcalls 0.0.15 depends on tgcalls==0.0.10
pytgcalls 0.0.14 depends on tgcalls==0.0.10
pytgcalls 0.0.13 depends on tgcalls==0.0.9
pytgcalls 0.0.12 depends on tgcalls==0.0.8
pytgcalls 0.0.11 depends on tgcalls==0.0.7
pytgcalls 0.0.10 depends on tgcalls==0.0.6
pytgcalls 0.0.9 depends on tgcalls==0.0.5
pytgcalls 0.0.8 depends on tgcalls==0.0.4
pytgcalls 0.0.7 depends on tgcalls==0.0.4
pytgcalls 0.0.6 depends on tgcalls==0.0.4
pytgcalls 0.0.5 depends on tgcalls==0.0.3
pytgcalls 0.0.4 depends on tgcalls==0.0.3
pytgcalls 0.0.3 depends on tgcalls==0.0.3
pytgcalls 0.0.2 depends on tgcalls==0.0.2

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict
    Screenshot (3)

showing key error in config file

2021-04-04T17:57:37.121624+00:00 app[worker.1]: Traceback (most recent call last):
2021-04-04T17:57:37.121670+00:00 app[worker.1]: File "main.py", line 19, in
2021-04-04T17:57:37.121875+00:00 app[worker.1]: from config import (
2021-04-04T17:57:37.121902+00:00 app[worker.1]: File "/app/config.py", line 7, in
2021-04-04T17:57:37.122050+00:00 app[worker.1]: API_ID = int(environ["1389947"])
2021-04-04T17:57:37.130217+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/os.py", line 669, in getitem
2021-04-04T17:57:37.130945+00:00 app[worker.1]: raise KeyError(key) from None
2021-04-04T17:57:37.131000+00:00 app[worker.1]: KeyError: '1389947'

Unable to run pip3 install -r requirements.txt

When i tried to run pip3 install -r requirements.txt, it was showing me the following error (in short):
ERROR: Could not find a version that satisfies the requirement OpenCC
ERROR: No matching distribution found for OpenCC

image

Kindly help me to resolve this issue on git bash...

Bot isn't working

On checking log in heroku I found this error

heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=bhojpuri-chat.herokuapp.com request_id=a118f8fd-ffb7-415b-8c01-5ad7887ac461 fwd="47.29.123.63" dyno= connect= service= status=503 bytes= protocol=https

Default /play service

Thoughts about using a default service when people use /play [song-name] (without specifying a service)?

It's a bit inconvenient to have to type in a service every time, especially if you always use the same one.

Willing to submit a PR myself if you think this is a good idea.

issue

Item could not be created:
We couldn't deploy your app because the source code violates the Salesforce Acceptable Use and External-Facing Services Policy.

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.