tgbotxx 1.1.6.9
Telegram Bot C++ Library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MessageAutoDeleteTimerChanged.hpp
Go to the documentation of this file.
1#pragma once
3
4namespace tgbotxx {
9 explicit MessageAutoDeleteTimerChanged(const nl::json& json) {
10 fromJson(json);
11 }
13 std::int32_t messageAutoDeleteTime{};
14
17 nl::json toJson() const {
18 nl::json json = nl::json::object();
19 OBJECT_SERIALIZE_FIELD(json, "message_auto_delete_time", messageAutoDeleteTime);
20 return json;
21 }
22
24 void fromJson(const nl::json& json) {
25 OBJECT_DESERIALIZE_FIELD(json, "message_auto_delete_time", messageAutoDeleteTime, 0, false);
26 }
27 };
28}
#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 a service message about a change in auto-delete timer settings....
nl::json toJson() const
Serializes this object to JSON.
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::int32_t messageAutoDeleteTime
New auto-delete time for messages in the chat; in seconds.