tgbot-cpp
Loading...
Searching...
No Matches
TgBot::User Class Reference

This object represents a Telegram user or bot. More...

#include <User.h>

Public Types

typedef std::shared_ptr< UserPtr
 

Public Attributes

std::int64_t id
 Unique identifier for this user or bot.
 
bool isBot
 True, if this user is a bot.
 
std::string firstName
 User's or bot's first name.
 
std::string lastName
 Optional. User's or bot's last name.
 
std::string username
 Optional. User's or bot's username.
 
std::string languageCode
 Optional. IETF language tag of the user's language.
 
bool isPremium
 Optional. True, if this user is a Telegram Premium user.
 
bool addedToAttachmentMenu
 Optional. True, if this user added the bot to the attachment menu.
 
bool canJoinGroups
 Optional. True, if the bot can be invited to groups.
 
bool canReadAllGroupMessages
 Optional. True, if privacy mode is disabled for the bot.
 
bool supportsInlineQueries
 Optional. True, if the bot supports inline queries.
 
bool canConnectToBusiness
 Optional. True, if the bot can be connected to a Telegram Business account to receive its messages.
 

Detailed Description

This object represents a Telegram user or bot.

Definition at line 15 of file User.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<User> TgBot::User::Ptr

Definition at line 18 of file User.h.

Member Data Documentation

◆ addedToAttachmentMenu

bool TgBot::User::addedToAttachmentMenu

Optional. True, if this user added the bot to the attachment menu.

Definition at line 61 of file User.h.

◆ canConnectToBusiness

bool TgBot::User::canConnectToBusiness

Optional. True, if the bot can be connected to a Telegram Business account to receive its messages.

Returned only in Api::getMe.

Definition at line 89 of file User.h.

◆ canJoinGroups

bool TgBot::User::canJoinGroups

Optional. True, if the bot can be invited to groups.

Returned only in Api::getMe.

Definition at line 68 of file User.h.

◆ canReadAllGroupMessages

bool TgBot::User::canReadAllGroupMessages

Optional. True, if privacy mode is disabled for the bot.

Returned only in Api::getMe.

Definition at line 75 of file User.h.

◆ firstName

std::string TgBot::User::firstName

User's or bot's first name.

Definition at line 36 of file User.h.

◆ id

std::int64_t TgBot::User::id

Unique identifier for this user or bot.

This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.

Definition at line 26 of file User.h.

◆ isBot

bool TgBot::User::isBot

True, if this user is a bot.

Definition at line 31 of file User.h.

◆ isPremium

bool TgBot::User::isPremium

Optional. True, if this user is a Telegram Premium user.

Definition at line 56 of file User.h.

◆ languageCode

std::string TgBot::User::languageCode

Optional. IETF language tag of the user's language.

Definition at line 51 of file User.h.

◆ lastName

std::string TgBot::User::lastName

Optional. User's or bot's last name.

Definition at line 41 of file User.h.

◆ supportsInlineQueries

bool TgBot::User::supportsInlineQueries

Optional. True, if the bot supports inline queries.

Returned only in Api::getMe.

Definition at line 82 of file User.h.

◆ username

std::string TgBot::User::username

Optional. User's or bot's username.

Definition at line 46 of file User.h.


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