I'm testing botman in Laravel and it works very well. But I can not find how to put a message by default. Can someone give me an orientation ?
$botman->hears('Hi', function ($bot) {
$bot->reply('Hello!');
});
BotMan allows you to create a fallback method, that gets called if none of your "hears" patterns matches. You may use this feature to give your bot users guidance on how to use your bot.
$botman->fallback(function($bot) {
$bot->reply('Sorry, I did not understand these commands. Here is a list of commands I understand: ...');
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.