Skip to content

Instantly share code, notes, and snippets.

$bot_object = new Client($token);
// Загружаем простые команды
$bot_object->command('say_hello', function ($message) use ($bot_object){
$bot_object->sendMessage($message->getChat()->getId(), "Hello!");
});
// Отлавливаем более сложные команды
$bot_object->on(
function($hook) use ($bot_object)