botify-framework / botify
Installs: 93
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/botify-framework/botify
Requires
This package is auto-updated.
Last update: 2025-09-29 02:44:16 UTC
README
Create your own Telegram API bot asynchronously in PHP
How to use
Installation
- Install with git
git clone https://github.com/botify-framework/botify
Then
composer install
- Install with composer
composer create-project --prefer-dist botify-framework/botify
Note You must install the framework directly as a master project
Webhook mode
use Botify\Events\Handler; use Botify\TelegramAPI; require_once __DIR__ .'/bootstrap/app.php'; $bot = new TelegramAPI([ 'token' => '123456789:AAABBBCCCDDDEEE', ]); $bot->loopAndHear(Handler::UPDATE_TYPE_WEBHOOK);
Http server mode
use Botify\Events\Handler; use Botify\TelegramAPI; require_once __DIR__ .'/bootstrap/app.php'; $bot = new TelegramAPI([ 'token' => '123456789:AAABBBCCCDDDEEE', ]); $bot->loopAndHear(Handler::UPDATE_TYPE_SOCKET_SERVER);
Long polling mode
use Botify\Events\Handler; use Botify\TelegramAPI; require_once __DIR__ .'/bootstrap/app.php'; $bot = new TelegramAPI([ 'token' => '123456789:AAABBBCCCDDDEEE', ]); $bot->loopAndHear(Handler::UPDATE_TYPE_POLLING);