Telegram Voice Chat UserBot made with Pyrogram and MarshalX/tgcalls with playlist and Heroku support

Overview

Telegram Voice Chat UserBot

A Telegram UserBot to Play Audio in Voice Chats.

This is also the source code of the userbot which is being used for playing DJ/Live Sets music in VC DJ/Live Sets group.

Made with tgcalls and Pyrogram Smart Plugin

It's recommended to use tgmusicbot along with this userbot.

Deploy to Heroku

Deploy

  • Session string can be exported by using Pyrogram
    # pip install Pyrogram TgCrypto
    from pyrogram import Client
    
    api_id = 1234567
    api_hash = "0123456789abcdef0123456789abcdef"
    
    with Client(":memory:", api_id, api_hash) as app, open("session.txt", "w+") as s_file:
        session_string = app.export_session_string()
        s_file.write(session_string)
        print("Session string has been saved to session.txt")
        print(session_string)
    
  • Enable the worker after deploy the project to Heroku
  • Send !join to a voice chat enabled group chat from userbot account itself or its contacts
  • Reply to an audio with /play to start playing it in the voice chat, every member of the group can use the !play and other common commands now, check !help for more commands

There are some other branchs for other plugins, you can press the "Deploy to Heroku" button there to deploy it as well.

Introduction

Features

  • Playlist, queue
  • Loop one track when there is only one track in the playlist
  • Automatically downloads audio for the first two tracks in the playlist to ensure smooth playing
  • Automatically pin the current playing track
  • Show current playing position of the audio

How to Use the Player plugin

  1. Start the userbot
  2. send !join to a voice chat enabled group chat from userbot account itself or its contacts, be sure to make the userbot account as group admin and give it at least the following permissions:
    • Delete messages
    • Manage voice chats (optional)
  3. reply to an audio with /play to start playing it in the voice chat, every member of the group can use common commands such like /play, /current and !help now.
  4. check !help for more commands

Commands

The main plugin is vc.player which has the following command commands and admin commands. After start the bot, send !join to a voice chat enabeld group chat from userbot account itself or its contacts, and then common commands like /play and /current will be available to every member of the group. send !help to check more commands.

  • Common commands, available to group members of current voice chat
  • starts with / (slash) or ! (exclamation mark)
Common Commands Description
/play reply with an audio to play/queue it, or show playlist
/current show current playing time of current track
/repo show git repository of the userbot
!help show help for commands
  • Admin commands, available to userbot account itself and its contacts
  • starts with ! (exclamation mark)
Admin Commands Description
!skip [n] ... skip current or n where n >= 2
!join join voice chat of current group
!leave leave current voice chat
!vc check which VC is joined
!stop stop playing
!replay play from the beginning
!clean remove unused RAW PCM files
!pause pause playing
!resume resume playing
!mute mute the VC userbot
!unmute unmute the VC userbot
  • Commands from other plugins, available only to userbot account itself
Plugin Commands Description
ping !ping show ping time
uptime !uptime show userbot uptime
sysinfo !sysinfo show system info

Requirements

  • Python 3.6 or higher
  • A Telegram API key and a Telegram account
  • Choose plugins you need, install dependencies which listed above and run pip install -U -r requirements.txt to install python package dependencies as well
  • FFmpeg

Run

Choose one of the two methods and run the userbot with python userbot.py, stop with CTRL+c. The following example assume that you were going to use vc.player and ping plugin, replace api_id, api_hash to your own value.

Method 1: use config.ini

Create a config.ini file

[pyrogram]
api_id = 1234567
api_hash = 0123456789abcdef0123456789abcdef

[plugins]
root = plugins
include =
    vc.player
    ping
    sysinfo

Method 2: write your own userbot.py

Replace the file content of userbot.py

from pyrogram import Client, idle

api_id = 1234567
api_hash = "0123456789abcdef0123456789abcdef"

plugins = dict(
    root="plugins",
    include=[
        "vc.player",
        "ping"
    ]
)

app = Client("tgvc", api_id, api_hash, plugins=plugins)
app.start()
print('>>> USERBOT STARTED')
idle()
app.stop()
print('\n>>> USERBOT STOPPED')

Notes

  • Read module docstrings of plugins/ you are going to use at the beginning of the file for extra notes

License

AGPL-3.0-or-later

Owner
Calls Music
A team of developers focusing on Telegram group call-related projects.
Calls Music
Nft-maker - Create your own NFT!

nft-maker How to If you're going to use this program, change the pictures in the "images" folder. All images must be of the same resolution and size.

Georgii Arakelian 4 Mar 13, 2022
Bot Realm of the Mad God Exalt (ROTMG). (Auto_nexus, Auto_HP, Auto_Loot)

Bot_ROTMG Bot Realm of the Mad God Exalt (ROTMG). (Auto_nexus, Auto_HP, Auto_Loot) *Este projeto visa apenas o aprendizado, quem faz mal uso é o único

Guilherme Silva Uchoa 1 Oct 30, 2021
A Pancakeswap and Uniswap trading client (and bot) with limit orders, marker orders, stop-loss, custom gas strategies, a GUI and much more.

Pancakeswap and Uniswap trading client Adam A A Pancakeswap and Uniswap trading client (and bot) with market orders, limit orders, stop-loss, custom g

570 Mar 09, 2022
Simple Bot With Python 3.8+ For Converstaion Your Media

Media-Conversation Simple Bot With Python 3.8+ For Converstaion Your Media

Farzin 2 Dec 06, 2021
数字货币BTC量化交易系统-实盘行情服务器,虚拟币自动炒币-火币API-币安交易所-量化交易-网格策略。趋势跟踪策略,最简源码,可在线回测,一键部署,可定制的比特币量化交易框架,3年实盘检验!

huobi_intf 提供火币网的实时行情服务器(支持火币网所有交易对的实时行情),自带API缓存,可用于实盘交易和模拟回测。 行情数据,是一切量化交易的基础,可以获取1min、60min、4hour、1day等数据。数据能进行缓存,可以在多个币种,多个时间段查询的时候,查询速度依然很快。 服务框架

dev 258 Sep 20, 2021
This repository contains ready to deploy automations on AWS

aws-automation-plugins This repository contains ready to deploy automations on AWS. How-To All projects in this repository contain a deploy.sh file wh

Akesh Patil 8 Sep 20, 2022
An NFTGenerator to generate NFTs and send them to nft.storage

NFTGenerator Table of Contents Overview Installation Introduction Features Reflection Issues & bug reports Show your support Credits Overview The NFTG

3 Mar 14, 2022
This is a okay that is okay that means none is okay

Owner: Masterolic 🇮🇳 CatUB A Powerful, Smart And Simple Userbot In Telethon. Credits This is A Remix Bot Of Many UserBot. DARKCOBRA FridayUserBot Ja

Masterolic 1 Nov 28, 2021
Twitter automation tool for growing organic followers.

Tiwoto Tiwoto is a simple python program that automates some kind of behaviors and keep your account active. Create an .env file in this directory and

Mehmetcan Yildiz 6 Sep 22, 2022
Reddit cli to slack at work

Reddit CLI (v1.0) Introduction Why Reddit CLI? Coworker who sees me looking at something in a browser: "Glad you're not busy; I need you to do this, t

3 Jun 22, 2021
A simple test repo created following docker docs.

docker_sampleRepo A simple test repo created following docker docs. Link to docs: https://docs.docker.com/language/python/develop/ Other links: https:

Suraj Verma 2 Sep 16, 2022
:evergreen_tree: Python module for communicating with the Taiga API

python-taiga A python wrapper for the Taiga REST API. Documentation: https://python-taiga.readthedocs.io/ Usage: : https://python-taiga.readthedocs.io

Nephila 87 Oct 12, 2022
Send automated wishes to your contacts at scheduled time through WhatsApp. Written for Raspberry pi.

Whatsapp Automated Wishes Helps to send automated wishes to your contacts in Whatsapp at scheduled time using pywhatkit . Written for Raspberry pi. Wi

Uthayamurthy 2 Dec 13, 2022
Automate HoYoLAB Genshin Daily Check-In Using Github Actions

Genshin Daily Check-In 🤖 Automate HoYoLAB Daily Check-In Using Github Actions KOR, ENG Instructions Fork the repository Go to Settings - Secrets Cli

Leo Kim 41 Jun 24, 2022
Assistant made in python to control your spotify via voice

Spotify-Assistant Assistant made in python to control your spotify via voice Overview 🚀 PLAY, PAUSE, NEXT, PREVIOUS, VOLUME COMMANDS 📝 Toast notific

Mauri 6 Jan 18, 2022
Aio-binance-library - Async library for connecting to the Binance API on Python

aio-binance-library Async library for connecting to the Binance API on Python Th

GRinvest 10 Nov 21, 2022
52pojie 吾爱破解论坛 签到 支持云函数/服务器等Py3环境运行

52pojie-Checkin 52pojie 吾爱破解论坛 签到 Py3单程序 支持云函数/服务器等Py3环境运行 只需要Cookie即可运行 新版说明 依赖包请用项目 https://github.com/BlueSkyXN/requirements-serverless 需要填写的参数有 co

BlueSkyXN 22 Sep 15, 2022
Automatically Forward files from groups to channel & FSub

Backup & ForceSub Automatically Forward files from groups to channel & Do force sub on members Variables API_ID : Get from my.telegram.org API_HASH :

Arunkumar Shibu 7 Nov 06, 2022
Grocy-create-product - A script supports the batch creation of new products in Grocy

grocy-create-product This script supports the batch creation of new products in

André Heuer 6 Jul 28, 2022
CRUD database for python discord bot developers that stores data on discord text channels

Discord Database A CRUD (Create Read Update Delete) database for python Discord bot developers. All data is stored in key-value pairs directly on disc

Ankush Singh 7 Oct 22, 2022