Pluggable Telegram bot and userbot based on Telethon
This repository has been archived on 2020-08-02. You can view files and clone it, but cannot push or open issues/pull-requests.
Go to file
Dan Elkouby cc98721120 Improve command support
- Support commands with the bot's username
- Make matching case-insensitive by default
- Merge cmd and admin_cmd for better maintainability
2020-08-02 15:32:44 +00:00
botplugins Port tl plugin to bots 2020-08-02 15:08:46 +00:00
stdplugins Port tl plugin to bots 2020-08-02 15:08:46 +00:00
uniborg Improve command support 2020-08-02 15:32:44 +00:00
.gitignore add *.session-journal to `.gitignore` 2018-07-03 11:26:45 +03:00
LICENSE Initial commit 2018-04-06 18:47:57 +03:00
README.md Don't allow unloading _core 2018-07-01 17:44:56 +03:00
requirements-stdborg.txt create stdborg requirements file 2018-06-01 01:18:34 +01:00
requirements.txt Fix #13 2018-07-01 16:19:27 +03:00
stdborg.py Use connection_retries 2018-06-21 18:57:06 +03:00
stdbot.py Add stdbot, to showcase plugins that work from a bot account 2020-08-02 14:42:25 +00:00

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.