driver-telegram icon indicating copy to clipboard operation
driver-telegram copied to clipboard

Ability to set reply_markup manually for question in params

Open vdomah opened this issue 5 years ago • 0 comments

Hi! This is simple commit to allow defining reply_markup parameter manually when doing ask() in conversation. This doesn't change any existing behavior. Just allows freely configure my desired keyboard if needed custom solution.

For example, I use it this way:

$question = Question::create($text);

$columns_number = count($menu) / 2;
$parameters['reply_markup'] = ConversationHelper::instance()->getKeyboard($question, $columns_number, Keyboard::TYPE_KEYBOARD);

$this->ask($question, $this->defaultQuestionCallback(), $parameters);

Also I got plans to implement other reply markup features so for now doing the minimum PR for that later purpose. Thanks!

vdomah avatar Jul 06 '20 12:07 vdomah