tgbotxx 1.1.6.9
Telegram Bot C++ Library
Loading...
Searching...
No Matches
BotDescription.hpp
Go to the documentation of this file.
1#pragma once
3
4namespace tgbotxx {
8 BotDescription() = default;
9 explicit BotDescription(const nl::json& json) {
10 fromJson(json);
11 }
12
14 std::string description;
15
18 nl::json toJson() const {
19 nl::json json = nl::json::object();
20 OBJECT_SERIALIZE_FIELD(json, "description", description);
21 return json;
22 }
23
25 void fromJson(const nl::json& json) {
26 OBJECT_DESERIALIZE_FIELD(json, "description", description, "", false);
27 }
28 };
29}
#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
This object represents the bot's description. https://core.telegram.org/bots/api#botdescription.
BotDescription(const nl::json &json)
void fromJson(const nl::json &json)
Deserializes this object from JSON.
nl::json toJson() const
Serializes this object to JSON.
std::string description
The bot's description.