uniborg is a modular Telegram userbot built on the Telethon framework. Its design allows users to enhance their Telegram experience through a variety of plugins that can be enabled or disabled as needed.
- Modular Design: Easily add or remove plugins to customize functionality.
- Asynchronous Operation: Built with Python's
asynciofor efficient performance. - Event Handling: Utilizes Telethon's event system to respond to various Telegram events.
- Simple Variables: Each plugin gets the
borg,loggerandstoragevariables to ease their use.
The core features offered by the custom TelegramClient live under the
uniborg/
directory, with some utilities, enhancements and the core plugin.
Before installing, ensure you have:
-
Clone the Repository:
git clone https://github.com/udf/uniborg.git
-
Navigate to the Project Directory:
cd uniborg -
Switch to the kate Branch:
git checkout kate
-
Install Dependencies:
pip install -r requirements.txt
-
Configure the Userbot:
- Rename
api_key.example.pytoapi_key.py. - Edit
api_key.pyto include your Telegram API credentials:api_id = 'YOUR_API_ID' api_hash = 'YOUR_API_HASH'
- Rename
-
Run the Userbot:
python stdborg.py
-
Create a New Plugin File:
Add a new Python file in the
stdpluginsdirectory. For example,stdplugins/myplugin.py. -
Define Event Handlers:
# stdplugins/myplugin.py
from telethon import events
@borg.on(events.NewMessage(pattern='hi'))
async def handler(event):
await event.reply('hey')In this snippet, the bot listens for messages containing 'hi' and responds with 'hey'.
Check out the plugins directory to learn how to write your own, and consider reading Telethon's documentation for further information.
- Fork the Repository.
- Create a New Branch:
git checkout -b feature-branch
- Commit Your Changes:
git commit -m "Added new feature" - Push to Your Fork:
git push origin feature-branch
- Submit a Pull Request.
This project is licensed under the Mozilla Public License 2.0.
- Telethon - The Python Telegram client library powering uniborg.
📌 Note: This README is tailored for the kate branch of the UniBorg project. Ensure you're on the correct branch when following these instructions.