tgbotxx  1.1.6.9
Telegram Bot C++ Library
ReplyKeyboardRemove.hpp
Go to the documentation of this file.
1 #pragma once
3 
4 namespace tgbotxx {
10  ReplyKeyboardRemove() = default;
11  explicit ReplyKeyboardRemove(const nl::json& json) {
12  _fromJson(json);
13  }
14 
18 
26  bool selective{};
27 
30  nl::json toJson() const override {
31  nl::json json = nl::json::object();
32  OBJECT_SERIALIZE_FIELD(json, "remove_keyboard", removeKeyboard);
33  OBJECT_SERIALIZE_FIELD(json, "selective", selective);
34  return json;
35  }
36 
38  void fromJson(const nl::json& json) override {
39  OBJECT_DESERIALIZE_FIELD(json, "remove_keyboard", removeKeyboard, false, false);
40  OBJECT_DESERIALIZE_FIELD(json, "selective", selective, false, true);
41  }
42 
43  private:
45  void _fromJson(const nl::json& json) {
46  fromJson(json);
47  }
48  };
49 }
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
Definition: Object.hpp:19
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
Definition: Object.hpp:44
Definition: Api.hpp:14
The interface of reply markup objects InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove ...
Definition: IReplyMarkup.hpp:7
Upon receiving a message with this object, Telegram clients will remove the current custom keyboard a...
bool selective
Optional. Use this parameter if you want to remove the keyboard for specific users only....
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
nl::json toJson() const override
Serializes this object to JSON.
ReplyKeyboardRemove(const nl::json &json)
bool removeKeyboard
Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you...