Giter VIP home page Giter VIP logo

tguserbot's Introduction

TGUserBot

Pluggable asyncio Telegram userbot based on Telethon. Forked by cHAuHaN from Uniborg

**Your Telegram account might get banned.**

I am not responsible for ANY improper use of this bot.

This userbot is intended for the purpose of having fun with memes,
as well as efficiently managing groups.

You ended up spamming groups, getting reported left and right,
and you ended up in a Final Battle with Telegram and at the end
Telegram Team deleted your account?

and then if you pointed your fingers at me for getting your acoount deleted, 
I will be rolling on the floor laughing at you.

Installing

The Easy Way

Deploy

The Legacy Way

Simply clone the repository and run the main file:

git clone https://github.com/udf/uniborg.git
cd uniborg
virtualenv -p /usr/bin/python3 venv
. ./venv/bin/activate
pip install -r requirements.txt
# <Create config.py with variables as given below>
python3 -m stdborg YourSessionName

An example config.py file could be:

Not All of the variables are mandatory

The UniBorg should work by setting only these variables

from sample_config import Config

class Development(Config):
  APP_ID = 6
  API_HASH = "eb06d4abfb49dc3eeb1aeb98ae0f581e"
  TG_BOT_TOKEN_BF_HER = ""
  TG_BOT_USER_NAME_BF_HER = ""
  UB_BLACK_LIST_CHAT = [
    -1001220993104,
    -1001365798550,
    -1001158304289,
    -1001212593743,
    -1001195845680,
    -1001330468518,
    -1001221185967,
    -1001340243678,
    -1001311056733,
    -1001135438308,
    -1001038774929,
    -1001070622614,
    -1001119331451,
    -1001095401841
  ]
  # specify LOAD and NO_LOAD
  LOAD = []
  NO_LOAD = []

Internals

The core features offered by the custom TelegramClient live under the uniborg/ directory, with some utilities, enhancements, the _core plugin, and the _inline_bot plugin.

  • Only two of the environment variables are mandatory.
  • This is because of telethon.errors.rpc_error_list.ApiIdPublishedFloodError
  • The userbot will work without setting the non-mandatory environment variables.

Design

The modular design of the project enhances your Telegram experience through plugins which you can enable or disable on demand.

Each plugin gets the borg, logger, Config, tgbot magical variables to ease their use. Thus creating a plugin as easy as adding a new file under the plugin directory to do the job:

# stdplugins/myplugin.py
from telethon import events
from uniborg.util import admin_cmd

@borg.on(admin_cmd(pattern="hi"))
async def handler(event):
    await event.reply("hey")

Learning

Check out the already-mentioned plugins directory, or some third-party plugins to learn how to write your own, and consider reading Telethon's documentation.

Credits

Thanks to: lonami for creating Telethon

tguserbot's People

Contributors

chauhanz avatar

Watchers

 avatar

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.