yatbcpp
0.0.1
Yet another Telegram Bot CPP Library
|
#include "Message.h"
Public Member Functions | |
Message (std::int32_t message_id, std::int32_t date, Chat chat) | |
Message (const Message &Message) | |
void | setFrom (const std::optional< User > &from) |
void | setForward_from (const std::optional< User > &forward_from) |
void | setForward_from_chat (const std::optional< Chat > &forward_from_chat) |
void | setForward_from_message_id (const std::optional< std::int32_t > &forward_from_message_id) |
void | setForward_signature (const std::optional< std::string > &forward_signature) |
void | setForward_date (const std::optional< std::int32_t > &forward_date) |
void | setEdit_date (const std::optional< std::int32_t > &edit_date) |
void | setAuthor_signature (const std::optional< std::string > &author_signature) |
void | setText (const std::optional< std::string > &text) |
void | addEntity (const MessageEntity &messageEntity) |
void | setAudio (const std::optional< Audio > &audio) |
void | setDocument (const std::optional< Document > &document) |
void | addPhoto (const PhotoSize &Photo) |
void | setVideo (const std::optional< Video > &video) |
void | setVoice (const std::optional< Voice > &voice) |
void | setVideo_note (const std::optional< VideoNote > &video_note) |
void | addNew_chat_members (const User &new_chat_member) |
void | setCaption (const std::optional< std::string > &caption) |
void | setContact (const std::optional< Contact > &contact) |
void | setLocation (const std::optional< Location > &location) |
void | setVenue (const std::optional< Venue > &venue) |
void | setNew_chat_member (const std::optional< User > &new_chat_member) |
void | setLeft_chat_member (const std::optional< User > &left_chat_member) |
void | setNew_chat_title (const std::optional< std::string > &new_chat_title) |
void | addNew_chat_photo (const PhotoSize &newchatphoto) |
void | setDelete_chat_photo (const std::optional< bool > &delete_chat_photo) |
void | setGroup_chat_created (const std::optional< bool > &group_chat_created) |
void | setSupergroup_chat_created (const std::optional< bool > &supergroup_chat_created) |
void | setChannel_chat_created (const std::optional< bool > &channel_chat_created) |
void | setMigrate_to_chat_id (const std::optional< long > &migrate_to_chat_id) |
void | setMigrate_from_chat_id (const std::optional< long > &migrate_from_chat_id) |
std::int32_t | getMessage_id () const |
const std::optional< User > & | getFrom () const |
std::int32_t | getDate () const |
const Chat & | getChat () const |
const std::optional< User > & | getForward_from () const |
const std::optional< Chat > & | getForward_from_chat () const |
const std::optional< std::int32_t > & | getForward_from_message_id () const |
const std::optional< std::string > & | getForward_signature () const |
const std::optional< std::int32_t > & | getForward_date () const |
const std::optional< std::int32_t > & | getEdit_date () const |
const std::optional< std::string > & | getAuthor_signature () const |
const std::optional< std::string > & | getText () const |
const std::vector< MessageEntity > & | getEntities () const |
const std::optional< Audio > & | getAudio () const |
const std::optional< Document > & | getDocument () const |
const std::vector< PhotoSize > & | getPhoto () const |
const std::optional< Video > & | getVideo () const |
const std::optional< Voice > & | getVoice () const |
const std::optional< VideoNote > & | getVideo_note () const |
const std::vector< User > & | getNew_chat_members () const |
const std::optional< std::string > & | getCaption () const |
const std::optional< Contact > & | getContact () const |
const std::optional< Location > & | getLocation () const |
const std::optional< Venue > & | getVenue () const |
const std::optional< User > & | getNew_chat_member () const |
const std::optional< User > & | getLeft_chat_member () const |
const std::optional< std::string > & | getNew_chat_title () const |
const std::vector< PhotoSize > & | getNew_chat_photo () const |
const std::optional< bool > & | getDelete_chat_photo () const |
const std::optional< bool > & | getGroup_chat_created () const |
const std::optional< bool > & | getSupergroup_chat_created () const |
const std::optional< bool > & | getChannel_chat_created () const |
const std::optional< long > & | getMigrate_to_chat_id () const |
const std::optional< long > & | getMigrate_from_chat_id () const |
Private Attributes | |
std::int32_t | message_id |
std::optional< User > | from |
std::int32_t | date |
Chat | chat |
std::optional< User > | forward_from |
std::optional< Chat > | forward_from_chat |
std::optional< std::int32_t > | forward_from_message_id |
std::optional< std::string > | forward_signature |
std::optional< std::int32_t > | forward_date |
std::optional< std::int32_t > | edit_date |
std::optional< std::string > | author_signature |
std::optional< std::string > | text |
std::vector< MessageEntity > | entities |
std::optional< Audio > | audio |
std::optional< Document > | document |
std::vector< PhotoSize > | photo |
std::optional< Video > | video |
std::optional< Voice > | voice |
std::optional< VideoNote > | video_note |
std::vector< User > | new_chat_members |
std::optional< std::string > | caption |
std::optional< Contact > | contact |
std::optional< Location > | location |
std::optional< Venue > | venue |
std::optional< User > | new_chat_member |
std::optional< User > | left_chat_member |
std::optional< std::string > | new_chat_title |
std::vector< PhotoSize > | new_chat_photo |
std::optional< bool > | delete_chat_photo |
std::optional< bool > | group_chat_created |
std::optional< bool > | supergroup_chat_created |
std::optional< bool > | channel_chat_created |
std::optional< long > | migrate_to_chat_id |
std::optional< long > | migrate_from_chat_id |
yatbcpp::Message::Message | ( | std::int32_t | message_id, |
std::int32_t | date, | ||
Chat | chat | ||
) |
Message::Message | ( | const Message & | Message | ) |
Definition at line 33 of file Message.cc.
void Message::addEntity | ( | const MessageEntity & | messageEntity | ) |
Definition at line 100 of file Message.cc.
void Message::addNew_chat_members | ( | const User & | new_chat_member | ) |
Definition at line 132 of file Message.cc.
void Message::addNew_chat_photo | ( | const PhotoSize & | newchatphoto | ) |
Definition at line 164 of file Message.cc.
void Message::addPhoto | ( | const PhotoSize & | Photo | ) |
Definition at line 114 of file Message.cc.
const optional< Audio > & Message::getAudio | ( | ) | const |
Definition at line 252 of file Message.cc.
const optional< string > & Message::getAuthor_signature | ( | ) | const |
Definition at line 240 of file Message.cc.
const optional< string > & Message::getCaption | ( | ) | const |
Definition at line 280 of file Message.cc.
const optional< bool > & Message::getChannel_chat_created | ( | ) | const |
Definition at line 324 of file Message.cc.
const Chat & Message::getChat | ( | ) | const |
Definition at line 208 of file Message.cc.
const optional< Contact > & Message::getContact | ( | ) | const |
Definition at line 284 of file Message.cc.
int32_t Message::getDate | ( | ) | const |
Definition at line 204 of file Message.cc.
const optional< bool > & Message::getDelete_chat_photo | ( | ) | const |
Definition at line 312 of file Message.cc.
const optional< Document > & Message::getDocument | ( | ) | const |
Definition at line 256 of file Message.cc.
const optional< int32_t > & Message::getEdit_date | ( | ) | const |
Definition at line 236 of file Message.cc.
const vector< MessageEntity > & Message::getEntities | ( | ) | const |
Definition at line 248 of file Message.cc.
const optional< int32_t > & Message::getForward_date | ( | ) | const |
Definition at line 228 of file Message.cc.
const optional< User > & Message::getForward_from | ( | ) | const |
Definition at line 212 of file Message.cc.
const optional< Chat > & Message::getForward_from_chat | ( | ) | const |
Definition at line 216 of file Message.cc.
const optional< int32_t > & Message::getForward_from_message_id | ( | ) | const |
Definition at line 220 of file Message.cc.
const optional< string > & Message::getForward_signature | ( | ) | const |
Definition at line 224 of file Message.cc.
const optional< User > & Message::getFrom | ( | ) | const |
Definition at line 200 of file Message.cc.
const optional< bool > & Message::getGroup_chat_created | ( | ) | const |
Definition at line 316 of file Message.cc.
const optional< User > & Message::getLeft_chat_member | ( | ) | const |
Definition at line 300 of file Message.cc.
const optional< Location > & Message::getLocation | ( | ) | const |
Definition at line 288 of file Message.cc.
int32_t Message::getMessage_id | ( | ) | const |
Definition at line 196 of file Message.cc.
const optional< long > & Message::getMigrate_from_chat_id | ( | ) | const |
Definition at line 332 of file Message.cc.
const optional< long > & Message::getMigrate_to_chat_id | ( | ) | const |
Definition at line 328 of file Message.cc.
const optional< User > & Message::getNew_chat_member | ( | ) | const |
Definition at line 296 of file Message.cc.
const vector< User > & Message::getNew_chat_members | ( | ) | const |
Definition at line 276 of file Message.cc.
const vector< PhotoSize > & Message::getNew_chat_photo | ( | ) | const |
Definition at line 308 of file Message.cc.
const optional< string > & Message::getNew_chat_title | ( | ) | const |
Definition at line 304 of file Message.cc.
const vector< PhotoSize > & Message::getPhoto | ( | ) | const |
Definition at line 260 of file Message.cc.
const optional< bool > & Message::getSupergroup_chat_created | ( | ) | const |
Definition at line 320 of file Message.cc.
const optional< string > & Message::getText | ( | ) | const |
Definition at line 244 of file Message.cc.
const optional< Venue > & Message::getVenue | ( | ) | const |
Definition at line 292 of file Message.cc.
const optional< Video > & Message::getVideo | ( | ) | const |
Definition at line 264 of file Message.cc.
const optional< VideoNote > & Message::getVideo_note | ( | ) | const |
Definition at line 272 of file Message.cc.
const optional< Voice > & Message::getVoice | ( | ) | const |
Definition at line 268 of file Message.cc.
void Message::setAudio | ( | const std::optional< Audio > & | audio | ) |
Definition at line 104 of file Message.cc.
void Message::setAuthor_signature | ( | const std::optional< std::string > & | author_signature | ) |
Definition at line 92 of file Message.cc.
void Message::setCaption | ( | const std::optional< std::string > & | caption | ) |
Definition at line 136 of file Message.cc.
void Message::setChannel_chat_created | ( | const std::optional< bool > & | channel_chat_created | ) |
Definition at line 180 of file Message.cc.
void Message::setContact | ( | const std::optional< Contact > & | contact | ) |
Definition at line 140 of file Message.cc.
void Message::setDelete_chat_photo | ( | const std::optional< bool > & | delete_chat_photo | ) |
Definition at line 168 of file Message.cc.
void Message::setDocument | ( | const std::optional< Document > & | document | ) |
Definition at line 108 of file Message.cc.
void Message::setEdit_date | ( | const std::optional< std::int32_t > & | edit_date | ) |
Definition at line 88 of file Message.cc.
void Message::setForward_date | ( | const std::optional< std::int32_t > & | forward_date | ) |
Definition at line 80 of file Message.cc.
void Message::setForward_from | ( | const std::optional< User > & | forward_from | ) |
Definition at line 64 of file Message.cc.
void Message::setForward_from_chat | ( | const std::optional< Chat > & | forward_from_chat | ) |
Definition at line 68 of file Message.cc.
void Message::setForward_from_message_id | ( | const std::optional< std::int32_t > & | forward_from_message_id | ) |
Definition at line 72 of file Message.cc.
void Message::setForward_signature | ( | const std::optional< std::string > & | forward_signature | ) |
Definition at line 76 of file Message.cc.
void Message::setFrom | ( | const std::optional< User > & | from | ) |
Definition at line 60 of file Message.cc.
void Message::setGroup_chat_created | ( | const std::optional< bool > & | group_chat_created | ) |
Definition at line 172 of file Message.cc.
void Message::setLeft_chat_member | ( | const std::optional< User > & | left_chat_member | ) |
Definition at line 156 of file Message.cc.
void Message::setLocation | ( | const std::optional< Location > & | location | ) |
Definition at line 144 of file Message.cc.
void Message::setMigrate_from_chat_id | ( | const std::optional< long > & | migrate_from_chat_id | ) |
Definition at line 188 of file Message.cc.
void Message::setMigrate_to_chat_id | ( | const std::optional< long > & | migrate_to_chat_id | ) |
Definition at line 184 of file Message.cc.
void Message::setNew_chat_member | ( | const std::optional< User > & | new_chat_member | ) |
Definition at line 152 of file Message.cc.
void Message::setNew_chat_title | ( | const std::optional< std::string > & | new_chat_title | ) |
Definition at line 160 of file Message.cc.
void Message::setSupergroup_chat_created | ( | const std::optional< bool > & | supergroup_chat_created | ) |
Definition at line 176 of file Message.cc.
void Message::setText | ( | const std::optional< std::string > & | text | ) |
Definition at line 96 of file Message.cc.
void Message::setVenue | ( | const std::optional< Venue > & | venue | ) |
Definition at line 148 of file Message.cc.
void Message::setVideo | ( | const std::optional< Video > & | video | ) |
Definition at line 120 of file Message.cc.
void Message::setVideo_note | ( | const std::optional< VideoNote > & | video_note | ) |
Definition at line 128 of file Message.cc.
void Message::setVoice | ( | const std::optional< Voice > & | voice | ) |
Definition at line 124 of file Message.cc.
|
private |
|
private |
|
private |
|
private |
Optional. Service message: the channel has been created. This field can‘t be received in a message coming through updates, because bot can’t be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Optional. The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
|
private |
Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Optional. Service message: the supergroup has been created. This field can‘t be received in a message coming through updates, because bot can’t be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
|
private |
|
private |
|
private |
|
private |
|
private |