我在Laravel中测试botman,它工作得很好。但是我找不到如何在默认情况下放置消息。有人能给我介绍一下吗?
$botman->hears('Hi', function ($bot) {
$bot->reply('Hello!');
});发布于 2020-05-29 06:17:45
BotMan允许您创建一个fallback方法,如果您的"hears“模式都不匹配,则调用该方法。您可以使用此功能来指导您的机器人用户如何使用您的机器人。
$botman->fallback(function($bot) {
$bot->reply('Sorry, I did not understand these commands. Here is a list of commands I understand: ...');});
https://stackoverflow.com/questions/56597977
复制相似问题