Pre-release
This release is a pre-release and may not be stable for production use.
LibBotUniversal
Handy library for Telegram/Discord bots development.
Getting started
There are different sub-packages available:
- pyrogram - Telegram bots with Pyrogram's fork "Pyrofork"
- pycord - Discord bots with Pycord
- speed - Performance improvements
- cache - Support for Redis and Memcached
- dev - Dependencies for package development purposes
- docs - Zensical and all related dependencies
You can freely choose any sub-package you want, as well as add multiple (comma-separated) or none at all.
# Only general features
pip install libbot
# Only with Pyrogram
pip install libbot[pyrogram]
# With Pycord and Performance improvements
pip install libbot[pycord,speed]
Examples
Pyrogram
import sys
from libbot.pyrogram.classes import PyroClient
def main():
client: PyroClient = PyroClient()
try:
client.run()
except KeyboardInterrupt:
print("Shutting down...")
finally:
sys.exit()
if __name__ == "__main__":
main()
Pycord
import asyncio
from asyncio import AbstractEventLoop
from discord import Intents
from libbot.utils import config_get
from libbot.pycord.classes import PycordBot
async def main():
intents: Intents = Intents.default()
bot: PycordBot = PycordBot(intents=intents)
bot.load_extension("cogs")
try:
await bot.start()
except KeyboardInterrupt:
print("Shutting down...")
await bot.close()
if __name__ == "__main__":
loop: AbstractEventLoop = asyncio.get_event_loop()
loop.run_until_complete(main())
Config examples
For bot config examples please check the examples directory. Without a valid config file, the bot won't start at all, so you need to make sure the correct config file is used.
Documentation
Project documentation and API reference are available as a website.
Release files for libbot 5.0.0rc2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| libbot-5.0.0rc2.tar.gz | 39.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libbot-5.0.0rc2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.8 kB
Release files / libbot-5.0.0rc2.tar.gz
| Download URL | libbot-5.0.0rc2.tar.gz |
|---|---|
| Size | 39.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52e08dfce18e405b91997766aa049da49813d344c24bb58cfcdceafa58731f64
|
|
BLAKE2b-256 checksum How to use checksums |
9e21159be0286e89ee40b4c029c962560d88eee6bc1379da8a0f0bc94007765c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / libbot-5.0.0rc2-py3-none-any.whl
| Download URL | libbot-5.0.0rc2-py3-none-any.whl |
|---|---|
| Size | 45.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7408cfc7cdbb917378743ed007b516d76347ccb103fb295c30d82b4fbc41f37a
|
|
BLAKE2b-256 checksum How to use checksums |
4915b2fedfe2e4b2044b2f3c1357a9226f1beb75a00ec82d6d8732b459b13896
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|