Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

LibBotUniversal

PyPI - License Gitea Release PyPI - Python Version Code style: black

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(config_get("bot_token", "bot"))
    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.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for libbot 5.0.0rc1
File Size Uploaded
libbot-5.0.0rc1.tar.gz 38.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for libbot 5.0.0rc1
File Interpreter ABI Platform
libbot-5.0.0rc1-py3-none-any.whl Python 3 none any Details

Total release size: 82.8 kB

Release files / libbot-5.0.0rc1.tar.gz

Download URL libbot-5.0.0rc1.tar.gz
Size 38.2 kB
Tags Source
SHA-256 checksum
How to use checksums
219d05b769a9577704a3416583f0100e93d768cfbdff9d67fa9b3187c2bf4183
BLAKE2b-256 checksum
How to use checksums
d4799348255888e825bf8ef67f81faaaee42830030af9d6c929998d41ad39a7c
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.0rc1-py3-none-any.whl

Download URL libbot-5.0.0rc1-py3-none-any.whl
Size 44.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b0dd3cff9ae358740955db9f942de17788870b111b8b1107660db62938c8d7c
BLAKE2b-256 checksum
How to use checksums
a4e0b79be25ba67f9a63b15f61f7e79dc03a7513143f68eff116e17ef144510f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

5.0.0

2 release files

This release

5.0.0rc1 This release

2 release files

4.6.2

2 release files

4.6.1

2 release files

4.6.0

2 release files

4.5.0

2 release files

4.4.1

2 release files

4.4.0

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.0

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.3.1

2 release files

3.2.3

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page