You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings everyone, I have the following problem. I am using botman with the telegram driver. I have created a conversation that allows users in a group to request a ride. For this I want to use buttons in lines. The button is sent correctly, the problem is when you click on it, it is as if it did not send the callback and does nothing. Can you help me with this issue?
`<?php
namespace App\Http\Conversation;
use BotMan\BotMan\Messages\Incoming\Answer;
use BotMan\BotMan\Messages\Outgoing\Question;
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
use BotMan\BotMan\Messages\Conversations\Conversation;
use BotMan\Drivers\Telegram\Extensions\KeyboardButton;
class SolicitarViaje extends Conversation
{
public function askSolicitarViaje()
{
$question = Question::create('Todos los datos del viaje')
->fallback('unknow')
->callbackId('solicitud_viaje')
->addButtons([
Button::create('La Quiero')->value('yo'),
]);
$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!'
$this->say('Captura: '.$selectedValue.' -- '.$selectedText);
}
});
}
public function run()
{
// This will be called immediately
$this->askSolicitarViaje();
}
}`
Steps To Reproduce:
The text was updated successfully, but these errors were encountered:
Description:
Greetings everyone, I have the following problem. I am using botman with the telegram driver. I have created a conversation that allows users in a group to request a ride. For this I want to use buttons in lines. The button is sent correctly, the problem is when you click on it, it is as if it did not send the callback and does nothing. Can you help me with this issue?
`<?php
namespace App\Http\Conversation;
use BotMan\BotMan\Messages\Incoming\Answer;
use BotMan\BotMan\Messages\Outgoing\Question;
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
use BotMan\BotMan\Messages\Conversations\Conversation;
use BotMan\Drivers\Telegram\Extensions\KeyboardButton;
class SolicitarViaje extends Conversation
{
public function askSolicitarViaje()
{
$question = Question::create('Todos los datos del viaje')
->fallback('unknow')
->callbackId('solicitud_viaje')
->addButtons([
Button::create('La Quiero')->value('yo'),
]);
}`
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: