westacks / telebot
Easy way to create Telegram-bots in PHP
Installs: 73 053
Dependents: 3
Suggesters: 1
Security: 0
Stars: 283
Watchers: 16
Forks: 44
Open Issues: 0
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^6.0 || ^7.0
Requires (Dev)
- laravel/pint: ^1.0
- phpunit/phpunit: ^8.0 || ^9.0 || ^10.0
- rector/rector: ^0.17
- dev-master
- 3.3.0
- 3.2.0
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 2.x-dev
- 2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-alpha.1
- 1.x-dev
- 1.14.9
- 1.14.8
- 1.14.7
- 1.14.6
- 1.14.5
- 1.14.4
- 1.14.3
- 1.14.2
- 1.14.1
- 1.14.0
- 1.13.0
- 1.12.1
- 1.12.0
- 1.11.0
- 1.10.3
- 1.10.2
- 1.10.1
- 1.10.0
- 1.9.4
- 1.9.3
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.0
- 1.7.1
- 1.7.0
- 1.6.0
- 1.5.1
- 1.5.0
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-11-16 21:31:41 UTC
README
TeleBot is a PHP library for telegram bots development. Rich Laravel support out of the box. Has an easy, clean, and extendable way to handle telegram Updates.
Documentation
Documentation for the library can be found on the website.
Features
Bot Manager
Work easily with multiple bots using BotManager
:
$manager->getMe(); // Fired by default bot specified in BotManager $manager->bot('bot2')->getMe(); // Fired by `bot2` specified in BotManager
Object oriented and functional handlers
// Functional handler $handler = function(TeleBot $bot, Update $update, $next) { if ($update->message->text === '/start') { return $bot->sendMessage([ 'chat_id' => $update->chat()->id, 'text' => 'Hello, World!' ]); } return $next(); }; // Object oriented handler class YourUpdateHandler extends CommandHandler { protected static $aliases = ['/start']; protected static $description = 'Your description'; public function handle() { return $this->sendMessage([ 'text' => 'Hello, World!' ]); } }
Laravel Support
Check out Laravel Adapter for TeleBot
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.