Pluggable Telegram bot and userbot based on Telethon
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udf 27d7b5ed82
Merge branch 'master' of https://git.togrand.xyz/uniborg/uniborg
4 years ago
stdplugins Count messages and sort by top posters 4 years ago
uniborg await the now async remove_plugin 4 years ago
.gitignore add *.session-journal to `.gitignore` 5 years ago
LICENSE Initial commit 6 years ago
README.md Don't allow unloading _core 5 years ago
requirements-stdborg.txt create stdborg requirements file 5 years ago
requirements.txt Fix #13 5 years ago
stdborg.py Use connection_retries 5 years ago

README.md

uniborg

Pluggable asyncio Telegram userbot based on Telethon.

installing

Simply clone the repository and run the main file:

git clone https://github.com/uniborg/uniborg.git
cd uniborg
python stdborg.py

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 and storage 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

@borg.on(events.NewMessage(pattern='hi'))
async def handler(event):
    await event.reply('hey')

internals

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

learning

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