Professional Telegram Bot Framework for PHP 8.2+
Fork of a (https://github.com/OpenTelegramFiles/TGbotPHP)
Production-ready. Feature-complete. Security-first.
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
git clone https://github.com/LightYagami28/TGbotPHP.git
cd TGbotPHP
composer install<?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();- Getting Started - Setup and first bot
- API Reference - Complete method documentation
- Security Guide - Security best practices
- Deployment - Production deployment
- Advanced Features - Plugins, caching, sessions
- Wiki - Tutorials and guides
- PHP 8.2 or higher
- cURL extension
- HTTPS enabled server (for webhooks)
- API Methods: 120+
- Code: 8,000+ lines
- PSR Standards: PSR-1, PSR-2, PSR-4, PSR-12
- Test Coverage: Comprehensive
- License: MIT
- GitHub: https://github.com/LightYagami28/TGbotPHP
- Issues: https://github.com/LightYagami28/TGbotPHP/issues
LightYagami28 (ceo@retechrevive.it)
MIT License - See LICENSE file