benedya/bbot

There is no license information available for the latest version (0.9.1) of this package.

Bot framework. One server-side for different platforms.

0.9.1 2016-10-25 14:19 UTC

README

The goal of the framework is to make development telegram-bot easier. Here you will find ready-for-use architecture where you have to put only your logic and enjoy working telegram-bot.

Using it you can:

  • handling text-requests
  • handling commands
  • set an action for a button click (postback-request)
  • set a certain action for text-request

Example handling telegram request

<?php

include "./vendor/autoload.php";

$chatId = '<chat-id>';
$requestItem = ['<request-item>'];

(new \Bbot\Builder\TelegramFactory($apiKey, $chatId))
    ->buildKernel()
    ->handle(\Bbot\Request\TelegramRequest::fromArray($requestItem))
;

Plz see example folder for more use cases.