me a few things like such as "When is the conference?", "Who is speaking?"'); $bot->typesAndWaits(1); $bot->reply('You can even ask me about a specific speaker or sponsor with "Tell me about SDPHP" or "tell me about Cal Evans"'); } 35
with sponsor logo image $attachment = new Image($sponsorData['logo_url'], [ 'custom_payload' => true, ]); // build the logo message $message = OutgoingMessage::create() ->withAttachment($attachment); // send the logo $bot->reply($message); } 37
function askFirstname() { $this->ask('Hello! What is your firstname?', function(Answer $answer) { // Save result $this->firstname = $answer->getText(); $this->say('Nice to meet you '.$this->firstname); $this->askEmail(); }); } public function askEmail() { $this->ask('One more thing - what is your email?', function(Answer $answer) { // Save result $this->email = $answer->getText(); $this->say('Great - that is all we need, '.$this->firstname); }); } public function run() { // This will be called immediately $this->askFirstname(); } } 38
database?') ->fallback('Unable to create a new database') ->callbackId('create_database') ->addButtons([ Button::create('Of course')->value('yes'), Button::create('Hell no!')->value('no'), ]); $this->ask($question, function (Answer $answer) { // Detect if button was clicked: if ($answer->isInteractiveMessageReply()) { $selectedValue = $answer->getValue(); // will be either 'yes' or 'no' $selectedText = $answer->getText(); // will be either 'Of course' or 'Hell no!' } }); } 39