Sometimes, we need to check if bot is has already understood some answer, so it won't override old answer, we'll create hasAnswer() or understood() method:
or
For example:
if ( ! $bot->understand('hi'))
{
$bot->answer('hi', 'Hi [first_name]!');
}
// Which equal to
if ($bot->doesntUnderstand('hi'))
{
$bot->answer('hi', 'Hi [first_name]!');
}
Sometimes, we need to check if bot is has already understood some answer, so it won't override old answer, we'll create hasAnswer() or understood() method:
or
For example: