Telegram Userbot built with Pyrogram

Overview

Pyrogram Userbot

Python Version Repo Size Commit Activity Codacy Badge HitCount Contributors Last Commit Issues Pull Requests StyleCI License

A Telegram Userbot based on Pyrogram

This repository contains the source code of a Telegram Userbot and the instructions for running a copy yourself. Beside its main purpose, the bot is featuring Pyrogram Asyncio and Smart Plugins; feel free to explore the source code to learn more about these topics.

I assume you will read this whole README.md file before continuing.

Development in progress.

Requirements

You're gonna need to get the following programs and services either installed on your server or signed up for. You must do all. It is a cardinal sin if you don't.

  • virtualenv installed so that the packages don't interfere with other system packages.

  • MongoDB on your server or a free server from MongoDB Atlas. (I recommend Atlas as I used it during development with no issues.)

  • carbon-now-cli on your server too generate code images for the carbon.py module. I use this CLI tool cause I don't know and couldn't get selenium and chromedriver to work nicely on my server/code. I'll be nice and even give you the command to install this. I assume you already have NPM installed.

    Windows: npm install -g carbon-now-cli
    Linux: sudo npm install -g carbon-now-cli --unsafe-perm=true --allow-root
    MacOS: I assume almost the same as linux ¯\_(ツ)_/¯
    

Installation and Deployment

The way I deploy

git clone https://github.com/athphane/userbot.git
cd userbot
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
python -m userbot

Spotify integration

To get the Spotify commands working on the Userbot, you need to get a CLIENT_ID and CLIENT_SECRET form the Spotify Developer Portal and add them into your userbot.ini file.

On the Spotify developer portal, make sure to set your application Redirect URI to 'http://localhost:8888/callback'.

Now is a good time Then go ahead and run the command python spotify.py in the projects root directory.

This will create a file called .cache-yourusername. You need to transfer this file to the project root of the server that will be running your userbot. This is a one time setup.

Developing

To add extra modules to the bot, simply add the code into userbot/plugins. Each file that is added to the plugins directory should have the following code at a minimum.

from pyrogram import Message, Filters

from userbot import UserBot

@UserBot.on_message(Filters.command('sample', ['.']))
async def module_name(bot: UserBot, message: Message):
    await message.edit(
        "This is a sample module"
    )

This example is only for Pyrogram on_message events.

Known issues

Credits, and Thanks to


Made with love from the Maldives

Owner
Athfan Khaleel
I like potatoes
Athfan Khaleel
A complete Python application to automatize the process of uploading files to Amazon S3

Upload files or folders (even with subfolders) to Amazon S3 in a totally automatized way taking advantage of: Amazon S3 Multipart Upload: The uploaded

Pol Alzina 1 Nov 20, 2021
Deploy a STAC API and a dynamic mosaic tiler API using AWS CDK.

Earth Observation API Deploy a STAC API and a dynamic mosaic tiler API using AWS CDK.

Development Seed 39 Oct 30, 2022
Currency Merger is a simple tool for joining values in different currencies

Currency Merger Description Currency Merger is a simple tool for joining values in different currencies. For example, if I have money in USD, EUR, BRL

Arthur Diniz 1 Feb 08, 2022
DongTai API SDK For Python

DongTai-SDK-Python Quick start You need a config file config.json { "DongTai":{ "token":"your token", "url":"http://127.0.0.1:90"

huoxian 50 Nov 24, 2022
WhatsApp Status Tracker With Python

Warning!! This Repo is Purly educational purpose Don't use this to stalk on others, which is subjective to crime Pre-Req: Telegram bot of your own wit

Vignesh Karunagaran 10 Dec 09, 2022
Real-time cryptocurrencies prices.

New update added more cryptocurrencies and GBP If you like it give it a star Crypto-watcher is simple program showing price of cryptocurrency in USD a

Adrijan 25 Dec 13, 2022
One of Best renamer bot with python

🌀 One of Best renamer bot repo Please Give a ☆ if You like This Open Source and Don't Forget to Follow Me On Github For More Repos And Codes. Scrappe

1 Dec 14, 2021
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.

disfork A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async a

2 Feb 09, 2022
A pre-attack hacker tool which aims to find out sensitives comments in HTML comment tag and to help on reconnaissance process

Find Out in Comment Find sensetive comment out in HTML ⚈ About This is a pre-attack hacker tool that searches for sensitives words in HTML comments ta

Pablo Emídio S.S 8 Dec 31, 2022
It is a useful project for developers that includes useful tools for Instagram

InstagramIG It is a useful project for developers that includes useful tools for Instagram Installation : pip install InstagramIG Logan Usage from In

Sidra ELEzz 14 Mar 14, 2022
Make WhatsApp ChatBot and use WhatsApp API to send the WhatsApp messages in python .

Ultramsg.com WhatsApp Bot using WhatsApp API and ultramsg Demo WhatsApp API ChatBot using Ultramsg API with python. Opportunities and tasks: The outpu

Ultramsg 64 Dec 29, 2022
Discord-Bot - Bot using nextcord for beginners

Discord-Bot Bot using nextcord for beginners! Requirements: 1 :- Install nextcord by typing "pip install nextcord" Thats it! You can use this code any

INFINITE_. 3 Jan 10, 2022
Sakura: an powerfull Autofilter bot that can be used in your groups

Sakura AutoFilter This Bot May Look Like Mwk_AutofilterBot And Its Because I Like Its UI, That's All Sakura is an powerfull Autofilter bot that can be

PaulWalker 12 Oct 21, 2022
Slash util - A simple script to add application command support to discord.py v2.0

slash_util is a simple wrapper around slash commands for discord.py This is writ

Maya 28 Nov 16, 2022
Vhook: A Discord webhook spammer / deleter open source coded by vesper

Vhook_Spammer Vhook is a advanced Discord webhook spammer / deleter with embeds,

Vesper 17 Nov 13, 2022
Program that uses Python to monitor grade updates in the Genesis Platform

Genesis-Grade-Monitor Program that uses Python to monitor grade updates in the Genesis Platform Guide: Install by either cloning the repo or downloadi

Steven Gatanas 1 Feb 12, 2022
Minecraft name sniper written in python.

⚠️ IMPORTANT ⚠️ DO NOT USE MCSNIPERPY -- READ BELOW This sniper does not support Microsoft accounts or prename / gc sniping and is MUCH harder to use

MCsniperPY 201 Dec 30, 2022
Local community telegram bot

Бот на районе Телеграм-бот для поиска адресов и заведений в вашем районе города или в небольшом городке. Требует недели прогулок по району д

Ilya Zverev 32 Jan 19, 2022
Random Geek Jokes REST API

Geek-Jokes A RESTful API to get random geek jokes written in Flask What is the Geek-Jokes-api? The Geek Jokes RESTful API lets you fetch a random geek

Sameer Kumar 84 Dec 15, 2022
♻️ API to run evaluations of the FAIR principles (Findable, Accessible, Interoperable, Reusable) on online resources

♻️ FAIR enough 🎯 An OpenAPI where anyone can run evaluations to assess how compliant to the FAIR principles is a resource, given the resource identif

Maastricht University IDS 4 Oct 20, 2022