Looking to hire Laravel developers? Try LaraJobs

laravel-telegram-bot maintained by lermal

Description
Laravel package for Telegram Bot API interactions with webhook and polling support.
Author
lermal
Last update
2026/04/30 23:28 (dev-main)
License
Downloads
1

Comments
comments powered by Disqus

lermal/laravel-telegram-bot

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:info
  • php 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

Tests

composer test

License

MIT