-
-
Notifications
You must be signed in to change notification settings - Fork 965
Closed
Description
So I migrated my bot to 0.37 from 0.35 following all changes and it seems like something is wrong with Keyboard/InlineKeyboard entity.
Assuming we have buttons array like this (shows buttons under each other):
$inline_keyboard = [
[
[
'text' => $text['button_text'],
'url' => $text['button_url']
]
],
[
[
'text' => 'Clear',
'callback_data' => 'clear'
]
]
];
$data['reply_markup'] = new InlineKeyboardMarkup(['inline_keyboard' => $inline_keyboard]);in 0.35 worked fine, migrating to 0.37 with following change doesn't work:
$data['reply_markup'] = new InlineKeyboard($inline_keyboard);Telegram API replies Bad Request: REPLY_MARKUP_INVALID
Changing code to:
$inline_keyboard = [
[
'text' => $text['button_text'],
'url' => $text['button_url']
],
[
'text' => 'Clear',
'callback_data' => 'clear'
]
];Works, but will make the buttons show up next to each other, not under each other!
Metadata
Metadata
Assignees
Labels
No labels