lermal/laravel-telegram-bot

Laravel package for Telegram Bot API interactions with webhook and polling support.

Maintainers

Package info

github.com/lermal/laravel-telegram-bot

pkg:composer/lermal/laravel-telegram-bot

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-04-30 21:28 UTC

This package is auto-updated.

Last update: 2026-04-30 21:31:58 UTC


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: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