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.0
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.0.tar.gz | 39.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| libbot-5.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.8 kB
Release files / libbot-5.0.0.tar.gz
| Download URL | libbot-5.0.0.tar.gz |
|---|---|
| Size | 39.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
934a23e11f1d90cc2db83911312064a5dba8910f8ca9a9af738f80a93afaa9c0
|
|
BLAKE2b-256 checksum How to use checksums |
8da763e3cfab411c8fec8e541e383ea948213101b741498c14fbca93dae9c467
|
| 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.0-py3-none-any.whl
| Download URL | libbot-5.0.0-py3-none-any.whl |
|---|---|
| Size | 45.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ee39c6319ea2df0cc84463519947e7438c8133f8e53d52fb4e06ae89e3abf93
|
|
BLAKE2b-256 checksum How to use checksums |
18dc7514511d09738a49e6535cac26758f51b5a193fa099775b09b5d9f30c781
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|