|
tgbotxx 1.1.9.2
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. | |
| void | fromJson (const nl::json &json) override |
| Deserializes this object from JSON. | |
Public Member Functions inherited from tgbotxx::IReplyMarkup | |
| virtual | ~IReplyMarkup ()=default |
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. | |
| 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. | |
| 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. | |
| 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. | |
| std::string | inputFieldPlaceholder |
| Optional. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters. | |
| bool | selective {} |
| Optional. Use this parameter if you want to show the keyboard to specific users only. Targets: | |
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 10 of file ReplyKeyboardMarkup.hpp.
|
default |
|
inlineexplicit |
Definition at line 12 of file ReplyKeyboardMarkup.hpp.
|
inlineoverridevirtual |
Deserializes this object from JSON.
Implements tgbotxx::IReplyMarkup.
Definition at line 61 of file ReplyKeyboardMarkup.hpp.
|
inlineoverridevirtual |
Serializes this object to JSON.
Implements tgbotxx::IReplyMarkup.
Definition at line 49 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 36 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 22 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 18 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 33 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 27 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 45 of file ReplyKeyboardMarkup.hpp.