Stars: 198
Forks: 28
Pull Requests: 22
Issues: 68
Watchers: 10
Last Updated: 2023-07-18 00:48:52
Asynchronous PHP Telegram Bot Framework built on top of ReactPHP
License: MIT License
Languages: PHP, Shell, Dockerfile
Asynchronous PHP Telegram Bot Framework built on top of ReactPHP
composer require badfarm/zanzara
Create a file named bot.php
and paste the following code:
<?php
use Zanzara\Zanzara;
use Zanzara\Context;
require __DIR__ . '/vendor/autoload.php';
$bot = new Zanzara("YOUR-BOT-TOKEN");
$bot->onCommand('start', function (Context $ctx) {
$ctx->sendMessage('Hello');
});
$bot->run();
Then run it from command line as follows:
$ php bot.php
Enjoy your bot!
Check out the Wiki for documentation.