bot php code example
Example 1: make bot in php
<?php
$botman->hears('Hello BotMan!', function($bot) {
$bot->reply('Hello!');
$bot->ask('Whats your name?', function($answer, $bot) {
$bot->say('Welcome '.$answer->getText());
});
});
$botman->listen();
Example 2: php bot libraries
$botman->hears('single response', function (BotMan $bot) {
$bot->reply("Tell me more!");
});