0

请告诉我,如何调整 Telegram 机器人中的内联(不回复)按钮的大小?该文档根本没有说明内联按钮的大小调整。

代码:

foreach ($sections as $section) {
  $arrKeyboard[] = [
    'text' => $section->getTitle(),
    'callback_data' => '....'
  ];
}

$keyboard = new \TelegramBot\Api\Types\Inline\InlineKeyboardMarkup([$arrKeyboard]);
$telegramBot->sendMessage($message->getChat()->getId(), $answer, 'markdown', false, null, $keyboard);

它看起来如何

4

1 回答 1

0
foreach ($sections as $section) {
  $arrKeyboard[] = [
    [
        'text' => $section->getTitle(),
        'callback_data' => '....'
    ]
  ];
}

$keyboard = new \TelegramBot\Api\Types\Inline\InlineKeyboardMarkup($arrKeyboard);
$telegramBot->sendMessage($message->getChat()->getId(), $answer, 'markdown', false, null, $keyboard);
于 2021-11-19T11:48:24.270 回答