Skip to content

Repository files navigation

TGbotPHP

Professional Telegram Bot Framework for PHP 8.2+

PHP Version License Build Status Version Maintenance

Fork of a (https://github.com/OpenTelegramFiles/TGbotPHP)

Production-ready. Feature-complete. Security-first.

Quick Overview

TGbotPHP is a comprehensive framework implementing 120+ Telegram Bot API methods with modern PHP practices.

Features:

  • Complete Telegram Bot API (120+ methods)
  • Security hardened (webhooks, validation, rate limiting)
  • Professional architecture (PSR-4, traits, middleware)
  • Plugin system & extensibility
  • Comprehensive documentation
  • Zero external dependencies

Installation

git clone https://github.com/LightYagami28/TGbotPHP.git
cd TGbotPHP
composer install

Quick Start

<?php
require_once __DIR__ . '/vendor/autoload.php';

use TGbotPHP\Utilities\BotBuilder;

$bot = (new BotBuilder('YOUR_BOT_TOKEN'))
    ->addCommand('start', function($bot, $message) {
        $bot->sendMessage(
            chatId: $message['chat']['id'],
            text: 'Welcome to TGbotPHP'
        );
    })
    ->build();

$bot->handle();

Documentation

Requirements

  • PHP 8.2 or higher
  • cURL extension
  • HTTPS enabled server (for webhooks)

Project Stats

  • API Methods: 120+
  • Code: 8,000+ lines
  • PSR Standards: PSR-1, PSR-2, PSR-4, PSR-12
  • Test Coverage: Comprehensive
  • License: MIT

Repository

Author

LightYagami28 (ceo@retechrevive.it)

License

MIT License - See LICENSE file

About

single php class to make bots easy!

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages