Closed Mccay closed 4 years ago
You can use code like this:
// start command
$bot->command('start', function (Message $message) use ($bot) {
/** @var BotApi $bot */
$bot->sendMessage(
$message->getChat()->getId(),
'Welcome text here',
'html',
false,
null,
new ReplyKeyboardMarkup(
[
[
['text' => 'my button 1'],
]
],
false,
true
)
);
});
More info about ReplyKeyboardMarkup: https://github.com/TelegramBot/Api/blob/master/src/Types/ReplyKeyboardMarkup.php#L68 https://core.telegram.org/bots/api#replykeyboardmarkup
Buttons appear with fixed size, no matter what text is involved. How do i resize them?