Closed dzarezenko closed 7 years ago
Store which buttons are checked using Conversation's notes array?
@jacklul Sorry, what do you mean?
Look into surveycommand example, use Conversation to store which ones are checked.
"Hello world" is handled by Callbackquerycommand, that's where you can remove it and place your own code.
Thank you for the response. I have resolved both my issues:
Resolved with Request::editMessageReplyMarkup
:
Longman\TelegramBot\Request::editMessageReplyMarkup([
'chat_id' => $this->chatId,
'message_id' => $this->messageId,
'reply_markup' => $this->generateKeyboard()
]);
I detect what button is pressed by callback_data
parameter of the InlineKeyboard
button, something like
[
'text' => (isset($userCategories[$category->id]) ? Icons::LARGE_RED_CIRCLE . " " : "") . $category->title,
'callback_data' => "setCategory:{$category->id}"
]
so I know what action to perform and with what category (what button pressed).
I have resolved by replacing CallbackqueryCommand
class with my own class as you suggested.
Thanks!
Hi, I have implemented
InlineKeyboard
functionality in my bot. This is a set of buttons with bullets, each button represents a category. All works fine on the server side, but I need changes on the client in the Telegram:Thanks!