Giter VIP home page Giter VIP logo

uniborg's Introduction

uniborg

Pluggable asyncio Telegram userbot based on Telethon.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Mozilla Public License for more details.

disclaimer

⚠️ This fork uses "requests" module in various places, instead of the async alternative. ⚠️

  • This was an attempt to learn userbot development using Telethon, this project is now no longer usable, and is FORKed and MODIFied to suit MY needs, so use at your own risk.

installing

The Easiest Way

  • Install Docker by following the official docker docs

  • Start docker daemon [skip if already running]:

dockerd
  • Build Docker image:
docker build . -t uniborg
  • Run the image:
docker run uniborg

It is not recommended to use "sudo", while using Docker. GNU/Linux Permissions are highly customisable, and it is generally not required to have "ROOT" permission, unless you know what you are doing. You can still install all the dependencies in your system [with ROOT permissions], but please be aware of the potential issues when doing so. The installed packages may conflict with the system package manager's installed packages, which can cause trouble down the road and errors when upgrading conflicting packages. You have been warned.

The Legacy Way

Simply clone the repository and run the main file:

git clone https://github.com/udf/uniborg.git
cd uniborg
python3 -m venv venv
. ./venv/bin/activate
pip install -r requirements.txt
cp sample_config.env config.env
# <edit config.env with appropriate values>
python3 -m kopp

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 five of the environment variables are mandatory.
  • Please read the WiKi to understand the use of the variables.
  • This is because of telethon.errors.ApiIdPublishedFloodError
    • APP_ID:
    • API_HASH:
    • TG_BOT_TOKEN_BF_HER:
    • TG_BOT_USER_NAME_BF_HER:
    • DATABASE_URL:
  • The userbot should 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 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
@borg.on(slitu.admin_cmd(pattern="hi"))
async def handler(event):
    await event.client.send_message(
        event.chat_id,
        "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:

uniborg's People

Contributors

spechide avatar 9ary avatar lonami avatar udf avatar phyco-ninja avatar expectocode avatar paulsonoflars avatar nitanmarcel avatar muhammedfurkan avatar yusufusta avatar cyberboysumanjay avatar rking32 avatar halodragon7410 avatar sunda001 avatar jaskaransm avatar samadii avatar aykxt avatar gautamajay52 avatar gauthamramravichandran avatar lucciferoo7 avatar hikaruichijyo avatar tgexplore avatar vrumger avatar baalajimaestro avatar penn5 avatar sourcery-ai[bot] avatar hashanant avatar nkonin avatar

Stargazers

Jagdeep gill [jatt life thuglife] avatar Dendi Suhubdy avatar PEP 8 Speaks 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.