afionov / tg-bot
Telegram bot library
dev-main
2023-12-16 11:20 UTC
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
- guzzlehttp/psr7: 2.4.3
Requires (Dev)
- guzzlehttp/guzzle: ^7.0
- phpunit/phpunit: 9.5.27
- vimeo/psalm: *
This package is not auto-updated.
Last update: 2025-03-09 15:34:18 UTC
README
Бот для Telegram
Usage
$configuration = new \Bot\Configuration( token: '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew1', httpClient: new \GuzzleHttp\Client() ) $configuration->setCommands( [ '/start' => fn (): \Bot\Command\CommandInterface => new \Bot\Command\DefaultStartCommand() ] ); $configuration->setMode(\Bot\Mode\NullMode::class); $bot = new \Bot\Bot($configuration); *** endpoint $bot->handleWebhook();
TODO
- Tests
- Documentation
- Full telegram api support