0

I have BotMan Studio installed and can run Tinker on my Windows 10 PC

I want to experiment with using Twilio, I looked up the documenatation and see how to set up the code, but need to know where to put it. I am pretty sure it wouldn't go in /routes as that is where the current botman.php is.

I made the updates detailed on the BotMan.io page , and configured BotMan for my Twilio number. I am running ngrok. I set up a simple Bot that does work in a browser.

?php
use App\Http\Controllers\BotManController;
use BotMan\BotMan\Messages\Attachments\Audio; 
use BotMan\BotMan\Messages\Attachments\Image;
use BotMan\BotMan\Messages\Attachments\Video;
use BotMan\BotMan\Messages\Outgoing\OutgoingMessage; 

$botman = resolve('botman');

$botman->hears('Hello|Hi', function ($bot) { //Use | to separate inputs 
    $bot->reply('Hi there!');
});

$botman->hears('Buenos dias', function ($bot) {
    $bot->reply('Hola!');
});

$botman->hears('What is your name(.*)', function ($bot) {
    $bot->reply('You may call me Jarvis');
});

I added the ngrok url to Twilio as an SMS hook. When I send a message to my Twilio number, I get no response

0 Answers0