简体   繁体   English

Codeigniter - Botman - 对话方法没有回复

[英]Codeigniter - Botman - Conversations method not replying

I'm using Botman 2.0 and Codeigniter 3.1.6我正在使用Botman 2.0Codeigniter 3.1.6

Ngrok & FB Webhook setup successfully.. Ngrok & FB Webhook 设置成功..

Did a simple hears & reply method, working good :做了一个简单的收听和回复方法,效果很好:

$this->botman->hears('foo','HelloWorld@handleFoo');
$this->botman->hears('hello',function($bot){
    $bot->reply('bye~');
 });

在此处输入图片说明

But when using Botman's conversation method , then Bot is not replying...my conversation code as below:但是当使用Botman 的对话方法时,Bot 没有回复……我的对话代码如下:

$this->load->library('BotConversations/OnboardingConversation');
$this->botman->hears('sup', function($bot) {
    $bot->startConversation(OnboardingConversation);
});
// Listen
$this->botman->listen();

在此处输入图片说明

anyhow, I've follow Botman's Cache conf 's guide to setup Cache via Codeigniter method无论如何,我已经按照Botman 的 Cache conf指南通过 Codeigniter 方法设置缓存

Below are some of my test files:以下是我的一些测试文件:

appreciate your help!感谢你的帮助! thanks....谢谢....

Everything works fine right now, I overlook on a simple syntax issue... updated my code as below :现在一切正常,我忽略了一个简单的语法问题......更新了我的代码如下:

$this->botman->hears('sup', function($bot) {
    $bot->startConversation(New OnboardingConversation);
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM