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

This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. https://core.telegram.org/bots/api#proximityalerttriggered. More...

#include <ProximityAlertTriggered.hpp>

Public Member Functions

 ProximityAlertTriggered ()=default
 
 ProximityAlertTriggered (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON. More...
 

Public Attributes

Ptr< Usertraveler
 User that triggered the alert. More...
 
Ptr< Userwatcher
 User that set the alert. More...
 
std::int32_t distance {}
 The distance between the users. More...
 

Detailed Description

This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. https://core.telegram.org/bots/api#proximityalerttriggered.

Definition at line 8 of file ProximityAlertTriggered.hpp.

Constructor & Destructor Documentation

◆ ProximityAlertTriggered() [1/2]

tgbotxx::ProximityAlertTriggered::ProximityAlertTriggered ( )
default

◆ ProximityAlertTriggered() [2/2]

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

Definition at line 10 of file ProximityAlertTriggered.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::ProximityAlertTriggered::fromJson ( const nl::json &  json)
inline

Deserializes this object from JSON.

Definition at line 35 of file ProximityAlertTriggered.hpp.

◆ toJson()

nl::json tgbotxx::ProximityAlertTriggered::toJson ( ) const
inline

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 26 of file ProximityAlertTriggered.hpp.

Member Data Documentation

◆ distance

std::int32_t tgbotxx::ProximityAlertTriggered::distance {}

The distance between the users.

Definition at line 21 of file ProximityAlertTriggered.hpp.

◆ traveler

Ptr<User> tgbotxx::ProximityAlertTriggered::traveler

User that triggered the alert.

Definition at line 15 of file ProximityAlertTriggered.hpp.

◆ watcher

Ptr<User> tgbotxx::ProximityAlertTriggered::watcher

User that set the alert.

Definition at line 18 of file ProximityAlertTriggered.hpp.


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