lermal / laravel-telegram-bot
Laravel package for Telegram Bot API interactions with webhook and polling support.
v1.0.0
2026-04-30 21:28 UTC
Requires
- php: ^8.3
- illuminate/console: ^13.0
- illuminate/http: ^13.0
- illuminate/support: ^13.0
Requires (Dev)
- orchestra/testbench: ^11.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
README
Laravel package for Telegram Bot API with webhook and polling support.
Language: English | Русский
Features
- Telegram API client with typed methods and raw API calls.
- Webhook mode with secret validation.
- Polling mode with retries, backoff,
--max-iterations, and--stop-when-empty. - Update dispatcher with handler pipeline.
- Built-in anti-spam for repeated chat commands.
- Telemetry events for polling and update processing lifecycle.
Quick start
composer require lermal/laravel-telegram-bot php artisan telegram:install
Then configure handlers in config/telegram.php.
Requirements
- PHP 8.3+
- Laravel 13+
Main commands
php artisan telegram:webhook:set {url?}php artisan telegram:webhook:infophp artisan telegram:webhook:delete {--drop-pending-updates}php artisan telegram:poll {--once} {--max-iterations=} {--stop-when-empty}php artisan telegram:install
Documentation
Detailed setup, architecture notes, examples, and troubleshooting are in wiki: https://github.com/lermal/laravel-telegram-bot/wiki
Support
- Issues: https://github.com/lermal/laravel-telegram-bot/issues
- Source: https://github.com/lermal/laravel-telegram-bot
Tests
composer test
License
MIT