tgbotxx
1.1.6.9
Telegram Bot C++ Library
|
This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). https://core.telegram.org/bots/api#replykeyboardmarkup. More...
#include <ReplyKeyboardMarkup.hpp>
Public Member Functions | |
ReplyKeyboardMarkup ()=default | |
ReplyKeyboardMarkup (const nl::json &json) | |
nl::json | toJson () const override |
Serializes this object to JSON. More... | |
void | fromJson (const nl::json &json) override |
Deserializes this object from JSON. More... | |
Public Attributes | |
std::vector< std::vector< Ptr< KeyboardButton > > > | keyboard |
Array of button rows, each represented by an Array of KeyboardButton objects @type Array of Array of KeyboardButton. More... | |
bool | isPersistent {} |
Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon. More... | |
bool | resizeKeyboard {} |
Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard. More... | |
bool | oneTimeKeyboard {} |
Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false. More... | |
std::string | inputFieldPlaceholder |
Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters. More... | |
bool | selective {} |
Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: More... | |
This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). https://core.telegram.org/bots/api#replykeyboardmarkup.
Definition at line 9 of file ReplyKeyboardMarkup.hpp.
|
default |
|
inlineexplicit |
Definition at line 11 of file ReplyKeyboardMarkup.hpp.
|
inlineoverridevirtual |
Deserializes this object from JSON.
Implements tgbotxx::IReplyMarkup.
Definition at line 60 of file ReplyKeyboardMarkup.hpp.
|
inlineoverridevirtual |
Serializes this object to JSON.
Implements tgbotxx::IReplyMarkup.
Definition at line 48 of file ReplyKeyboardMarkup.hpp.
std::string tgbotxx::ReplyKeyboardMarkup::inputFieldPlaceholder |
Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters.
Definition at line 35 of file ReplyKeyboardMarkup.hpp.
bool tgbotxx::ReplyKeyboardMarkup::isPersistent {} |
Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon.
Definition at line 21 of file ReplyKeyboardMarkup.hpp.
std::vector<std::vector<Ptr<KeyboardButton> > > tgbotxx::ReplyKeyboardMarkup::keyboard |
Array of button rows, each represented by an Array of KeyboardButton objects @type Array of Array of KeyboardButton.
Definition at line 17 of file ReplyKeyboardMarkup.hpp.
bool tgbotxx::ReplyKeyboardMarkup::oneTimeKeyboard {} |
Optional. Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to false.
Definition at line 32 of file ReplyKeyboardMarkup.hpp.
bool tgbotxx::ReplyKeyboardMarkup::resizeKeyboard {} |
Optional. Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.
Definition at line 26 of file ReplyKeyboardMarkup.hpp.
bool tgbotxx::ReplyKeyboardMarkup::selective {} |
Optional. Use this parameter if you want to show the keyboard to specific users only. Targets:
Example A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.
Definition at line 44 of file ReplyKeyboardMarkup.hpp.