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
HinamiRobot - Telegram Group Manager Bot Written In Python Using Pyrogram

✨ HINAMI CHAN ✨ Telegram Group Manager Bot Written In Python Using Pyrogram. Rea

DARK LEGEND088 2 Jan 27, 2022
Spacecrypto-bombcrypto-bot - SpaceCrypto And Bombcrypto Bot - MultiScreen

SpaceCrypto And Bombcrypto Bot - MultiScreen This is a open source project inspi

Paulo Bramante 5 Nov 03, 2022
Hello i am TELEGRAM GROUP MANAGEMENT BOT MY NAME IS Evil-Inside ⚡ i have both amazing modules

Evil-Inside DEMO BOT - Evil-Inside Hello i am TELEGRAM GROUP MANAGEMENT BOT MY NAME IS Evil-Inside ⚡ i have both amazing modules ℂ𝕆ℕ𝕋𝔸ℂ𝕋 𝕄𝔼 𝕆ℕ

PANDITHAN 52 Nov 20, 2022
RaidBot for WhatsApp

WhatsappRaid Скрипт подготовлен специально для сайта https://pysoc.ru и Ютуб канала PyPro Русский Простой спам бот для WhatsApp на Python3. Работает с

2 May 12, 2022
List of twitch bots n bigots

This is a collection of bot account names NamelistMASTER contains all the names we reccomend you ban in your channel Sometimes people get on that list

62 Sep 05, 2021
An API wrapper library for opensea api.

Opensea API An API wrapper library for opensea api. Installation pip3 install opensea Usage Retrieving assets: from opensea import get_assets # This

Ankush Singh 38 Jul 17, 2022
Flaga ze Szturmu na AWS.

Witaj Jesteś na GitHub'ie i czytasz właśnie plik README.md który znajduje się wewnątrz repozytorium Flaga z 7 i 8 etapu Szturmu na AWS. W tym etapie w

9 May 16, 2022
This an API wrapper library for the OpenSea API written in Python 3.

OpenSea NFT API Python 3 wrapper This an API wrapper library for the OpenSea API written in Python 3. The library provides a simplified interface to f

Attila Tóth 159 Dec 26, 2022
Guildead - Guilded api wrapper written in python

Guildead Guilded api wrapper written in python. I have found "exploit" (guilded

0хVιcнy#1337 5 Sep 23, 2022
Automatically commits and pushes changes from a specified directory to remote repository

autopush a simple python program that checks a directory for updates and automatically commits any updated files (and optionally pushes them) installa

carreb 1 Jan 16, 2022
A custom discord bot maker in python

custom-discord-bot-maker Sorry for using Translator. Each description may be inaccurate. how to use 1. Make new application at https://discord.com/dev

2 Nov 29, 2021
Dribble sign up screen built in python and kivy

Dribble sign up screen built in python and kivy contains Dribble icon with icon position and shadow animation.

1 Dec 06, 2021
API para realizar parser de frases

NLP API Simple api to parse and apply some preprocessing steps in portuguses phrases (pt_BR) This api uses the great FastAPI and spaCy packages! Usage

⟠ Rodolfo De Nadai 1 Dec 28, 2021
Python SDK for IEX Cloud

iexfinance Python SDK for IEX Cloud. Architecture mirrors that of the IEX Cloud API (and its documentation). An easy-to-use toolkit to obtain data for

Addison Lynch 640 Jan 07, 2023
A python script that can send notifications to your phone via SMS text

Discord SMS Notification A python script that help you send text message to your phone one of your desire discord channel have a new message. The proj

2 Apr 25, 2022
A simple object model for the Notion SDK.

A simplified object model for the Notion SDK. This is loosely modeled after concepts found in SQLAlchemy.

Jason Heddings 54 Jan 02, 2023
🛒 Bot de lista de compras compartilhada para o Telegram

Lista de Compras Lista de compras de Cuducos e Flávia. Comandos do bot Comando Descrição /add item Adiciona item à lista de compras /remove item

Eduardo Cuducos 4 Jan 15, 2022
Smilecreator4 - This site is for people who want to hack or want to learn it!

smilecreator4 This site is for people who want to hack or want to learn it! Furthermore, this program does not work without turning off Antivirus or W

1 Jan 04, 2022
A stable and Fast telegram video convertor bot which can compress, convert(video into audio and other video formats), rename with permanent thumbnail and trim.

ᴠɪᴅᴇᴏ ᴄᴏɴᴠᴇʀᴛᴏʀ A stable and Fast telegram video convertor bot which can compress, convert(video into audio and other video formats), rename and trim.

Mahesh Chauhan 183 Jan 04, 2023
Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

Telegram VCVideoPlayBot An Telegram Bot By @ZauteKm To Stream Videos in Telegram Voice Chat. NOTE: Make sure you have started a VoiceChat in your Grou

Zaute 20 Oct 21, 2022