https://github.com/deepanik/uniborg
https://github.com/deepanik/uniborg
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/deepanik/uniborg
- Owner: deepanik
- License: mpl-2.0
- Created: 2021-02-03T05:42:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-03T06:38:31.000Z (over 4 years ago)
- Last Synced: 2025-01-31T17:05:47.484Z (4 months ago)
- Language: Python
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# uniborg
Pluggable [``asyncio``](https://docs.python.org/3/library/asyncio.html)
[Telegram](https://telegram.org) userbot based on
[Telethon](https://github.com/LonamiWebs/Telethon).## installing
Simply clone the repository and run the main file:
```sh
git clone https://github.com/DeepAnik/uniborg.git
cd uniborg
python stdborg.py
```## design
The modular design of the project enhances your Telegram experience
through [plugins](https://github.com/DeepAnik/uniborg/tree/master/stdplugins)
which you can enable or disable on demand.Each plugin gets the `borg`, `logger` and `storage` magical
[variables](https://github.com/deepanik/uniborg/tree/master/blob/master/uniborg)
to ease their use. Thus creating a plugin as easy as adding
a new file under the plugin directory to do the job:```python
# 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/`](https://github.com/DeepAnik/uniborg/tree/master/uniborg)
directory, with some utilities, enhancements and the core plugin.## learning
Check out the already-mentioned
[plugins](https://github.com/DeepAnik/uniborg/tree/master/stdplugins)
directory to learn how to write your own, and consider reading
[Telethon's documentation](http://telethon.readthedocs.io/).