tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::ReplyKeyboardRemove Struct Reference

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). https://core.telegram.org/bots/api#replykeyboardremove. More...

#include <ReplyKeyboardRemove.hpp>

Inheritance diagram for tgbotxx::ReplyKeyboardRemove:
tgbotxx::IReplyMarkup

Public Member Functions

 ReplyKeyboardRemove ()=default
 
 ReplyKeyboardRemove (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

bool removeKeyboard {}
 Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use oneTimeKeyboard in ReplyKeyboardMarkup) More...
 
bool selective {}
 Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: More...
 

Detailed Description

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). https://core.telegram.org/bots/api#replykeyboardremove.

Definition at line 9 of file ReplyKeyboardRemove.hpp.

Constructor & Destructor Documentation

◆ ReplyKeyboardRemove() [1/2]

tgbotxx::ReplyKeyboardRemove::ReplyKeyboardRemove ( )
default

◆ ReplyKeyboardRemove() [2/2]

tgbotxx::ReplyKeyboardRemove::ReplyKeyboardRemove ( const nl::json &  json)
inlineexplicit

Definition at line 11 of file ReplyKeyboardRemove.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::ReplyKeyboardRemove::fromJson ( const nl::json &  json)
inlineoverridevirtual

Deserializes this object from JSON.

Implements tgbotxx::IReplyMarkup.

Definition at line 38 of file ReplyKeyboardRemove.hpp.

◆ toJson()

nl::json tgbotxx::ReplyKeyboardRemove::toJson ( ) const
inlineoverridevirtual

Serializes this object to JSON.

Returns
JSON representation of this object

Implements tgbotxx::IReplyMarkup.

Definition at line 30 of file ReplyKeyboardRemove.hpp.

Member Data Documentation

◆ removeKeyboard

bool tgbotxx::ReplyKeyboardRemove::removeKeyboard {}

Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use oneTimeKeyboard in ReplyKeyboardMarkup)

Definition at line 17 of file ReplyKeyboardRemove.hpp.

◆ selective

bool tgbotxx::ReplyKeyboardRemove::selective {}

Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets:

  • 1) users that are @mentioned in the text of the Message object;
  • 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

Example A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.

Definition at line 26 of file ReplyKeyboardRemove.hpp.


The documentation for this struct was generated from the following file: