Api
Api copied to clipboard
sendMessage - does not work ReplyKeyboardMarkup with array - text send, keyboard not update
$keyboard = new \TelegramBot\Api\Types\ReplyKeyboardMarkup
(
[
[
["text" => "Способы голосования"],
["text" => "Избирательный участок"]
],
[
["text" => "Даты голосования"],
["text" => "Кандидаты"]
]
],
false,
true
);
bot->sendMessage($message->getChat()->getId(), "Выберете какую информацию Вы хотите получить ", false, null, null, $keyboard);
It's ok, so:
$art = array();
while ($row = $query->fetch_assoc()) {
array_push($art,array(
"text" => $row["gorod"]));
}
$keygorodart = new \TelegramBot\Api\Types\ReplyKeyboardMarkup ( $art, false,true );
$bot->sendMessage($id, $oi, false, null, null, $keygorodart );
Not work, text $oi send in bot, Keyboard not update....$art is normal array (see print_r)
@irinahart still facing this issue ?