Skip to content

PBModular/bot

Repository files navigation

PBModular

Python Linux Windows

Python Version GitHub code size in bytes GitHub

PBModular is a lightweight and flexible bot framework designed for anything you code. Something between a userbot and a standard bot.

Key Features

  • Modular Design: Easily extend and customize your bot features with a plugin-based modules
  • Cross-Platform: Supports Linux, Windows, and Android (Termux).
    • Note for Windows and Android: Remove the uvloop dependency from requirements.txt before installation.
  • Open Source: Contribute, modify, and adapt the bot to your specific needs.

Getting Started

Quick Installation (Linux/Windows)

We provide convenient installation scripts for Linux and Windows:

Linux:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/pbmodular/bot/master/install.sh)"

Windows (PowerShell):

iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/PBModular/bot/master/install.ps1'))

Manual Installation

  1. Clone the repository:

    git clone https://github.com/PBModular/bot PBModular
  2. Install dependencies (using a virtual environment is recommended):

    python -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  3. Configure your bot:

    cp config.example.yaml config.yaml
    nano config.yaml # Edit the configuration file
  4. Run the bot:

    python main.py

Running as a Systemd Service (Linux)

Use this example systemd service file to run your bot automatically at system boot:

[Unit]
Description=PBModular Bot
After=network.target

[Service]
WorkingDirectory=/path/to/bot/sources
Type=simple
User=your_user
# If you don't use venv, change python path to /usr/bin/python3 in a command below
ExecStart=/path/to/bot/sources/venv/bin/python3 -u /path/to/bot/sources/main.py
# Restart bot after fail
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Remember to replace placeholders like /path/to/bot/sources and your_user with your actual paths and username.

Documentation

Want to contribute documentation in your language? Contact @SanyaPilot or @Ultra119

Windows Support Notice

While we strive for cross-platform compatibility, Windows support is not fully guaranteed. Minor issues might arise due to the primary development environment being *nix-based.

Contributors

Contributing

We welcome contributions! Feel free to open issues, submit pull requests, or join the discussion in our Telegram Chat

License

GNU GPLv3

About

Modular Telegram bot built on top of Pyrogram for anything you code

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6