The crust of this fork is the advanced_get plugin, which gives you a unix shell in Telegram, with the ability to exchange files. I’ll update the README when I have the time to document it.
Needs Python 3.7.2+.
Pluggable =asyncio= Telegram userbot based on Telethon.
Simply clone the repository and run the main file:
sudo apt-get install -y coreutils fzf zsh python3 mkdir -p ~/code cd ~/code git clone 'https://github.com/NightMachinary/betterborg.git' cd betterborg pip3 install -r requirements.txt python3 stdborg.py
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')
The core features offered by the custom TelegramClient
live under the =uniborg/= directory, with some utilities, enhancements and the core plugin.
Check out the already-mentioned plugins directory to learn how to write your own, and consider reading Telethon’s documentation.