I’ve got telegram bot in php, and I show custom keyboard doing :
$replyMarkup = array(
'keyboard' => array(
array('/help')
)
);
$keyboard = json_encode($replyMarkup)
$this->client->request('POST', 'sendmessage', ['query' => ['chat_id' => $chatId, 'text' => $text, 'reply_markup' => $keyboard]]);
All works right.
My question is : is there a way to map a keyboard command to a different message?
So in this case i want to show custom keyboard that shows “Help” and on click send /help.
Thanks.
2
Answers
For now, custom keyboard’s buttons are simply templates for messages, so “No, it’s not possible”.
Using InlineKeyboardMarkup can solve this issue.
Basic usage for C#
Taked from this post.