Closed amirhshokri closed 8 months ago
For now, it is usable like this:
$keyboard = [
['7', '8', '9'],
['4', '5', '6'],
['1', '2', '3'],
['0']
];
Telegram::sendMessage([
'chat_id' => $updates->getChat()->getId(),
'text' => 'Hello World',
'reply_markup' => json_encode([
'keyboard' => $keyboard,
'resize_keyboard' => true,
'one_time_keyboard' => true
])
]);
Please fix this issue in later updates.
目前,它可以像这样使用:
$keyboard = [ ['7', '8', '9'], ['4', '5', '6'], ['1', '2', '3'], ['0'] ]; Telegram::sendMessage([ 'chat_id' => $updates->getChat()->getId(), 'text' => 'Hello World', 'reply_markup' => json_encode([ 'keyboard' => $keyboard, 'resize_keyboard' => true, 'one_time_keyboard' => true ]) ]);
请在以后的更新中修复此问题。
https://github.com/irazasyed/telegram-bot-sdk/issues/497#issuecomment-623721743
Hi, I'm using this package with Laravel. According to the link below:
https://telegram-bot-sdk.com/docs/guides/keyboards?language=laravel#reply-keyboard-markup
the method 'replyKeyboardMarkup' must exist and usable. But when i use it as mentioned in the example, following error appears:
Method [replyKeyboardMarkup] does not exist. {"exception":"[object] (BadMethodCallException(code: 0): Method [replyKeyboardMarkup] does not exist. at /.../vendor/irazasyed/telegram-bot-sdk/src/Api.php:127)