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

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

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<User>

Public Attributes

std::int64_t 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.
bool isBot { }
 True, if this user is a bot.
std::string firstName { }
 User's or bot's first name.
std::optional< std::string > lastName { }
 Optional. User's or bot's last name.
std::optional< std::string > username { }
 Optional. User's or bot's username.
std::optional< std::string > languageCode { }
 Optional. IETF language tag of the user's language.
std::optional< bool > isPremium { }
 Optional. True, if this user is a Telegram Premium user.
std::optional< bool > addedToAttachmentMenu { }
 Optional. True, if this user added the bot to the attachment menu.
std::optional< bool > canJoinGroups { }
 Optional. True, if the bot can be invited to groups. Returned only in getMe.
std::optional< bool > canReadAllGroupMessages { }
 Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
std::optional< bool > supportsGuestQueries { }
 Optional. True, if the bot supports guest queries from chats it is not a member of. Returned only in getMe.
std::optional< bool > supportsInlineQueries { }
 Optional. True, if the bot supports inline queries. Returned only in getMe.
std::optional< bool > canConnectToBusiness { }
 Optional. True, if the bot can be connected to a user account to manage it. Returned only in getMe.
std::optional< bool > hasMainWebApp { }
 Optional. True, if the bot has a main Web App. Returned only in getMe.
std::optional< bool > hasTopicsEnabled { }
 Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.
std::optional< bool > allowsUsersToCreateTopics { }
 Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.
std::optional< bool > canManageBots { }
 Optional. True, if other bots can be created to be controlled by the bot. Returned only in getMe.
std::optional< bool > supportsJoinRequestQueries { }
 Optional. True, if the bot supports join request queries and can be assigned to process them. Returned only in getMe.

Detailed Description

This object represents a Telegram user or bot.

Definition at line 14786 of file Types.h.

Member Typedef Documentation

◆ Ptr

using TgBot::User::Ptr = std::shared_ptr<User>

Definition at line 14787 of file Types.h.

Member Data Documentation

◆ addedToAttachmentMenu

std::optional<bool> TgBot::User::addedToAttachmentMenu { }

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

Definition at line 14830 of file Types.h.

◆ allowsUsersToCreateTopics

std::optional<bool> TgBot::User::allowsUsersToCreateTopics { }

Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.

Definition at line 14874 of file Types.h.

◆ canConnectToBusiness

std::optional<bool> TgBot::User::canConnectToBusiness { }

Optional. True, if the bot can be connected to a user account to manage it. Returned only in getMe.

Definition at line 14857 of file Types.h.

◆ canJoinGroups

std::optional<bool> TgBot::User::canJoinGroups { }

Optional. True, if the bot can be invited to groups. Returned only in getMe.

Definition at line 14835 of file Types.h.

◆ canManageBots

std::optional<bool> TgBot::User::canManageBots { }

Optional. True, if other bots can be created to be controlled by the bot. Returned only in getMe.

Definition at line 14880 of file Types.h.

◆ canReadAllGroupMessages

std::optional<bool> TgBot::User::canReadAllGroupMessages { }

Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.

Definition at line 14840 of file Types.h.

◆ firstName

std::string TgBot::User::firstName { }

User's or bot's first name.

Definition at line 14805 of file Types.h.

◆ hasMainWebApp

std::optional<bool> TgBot::User::hasMainWebApp { }

Optional. True, if the bot has a main Web App. Returned only in getMe.

Definition at line 14862 of file Types.h.

◆ hasTopicsEnabled

std::optional<bool> TgBot::User::hasTopicsEnabled { }

Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.

Definition at line 14868 of file Types.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 14795 of file Types.h.

◆ isBot

bool TgBot::User::isBot { }

True, if this user is a bot.

Definition at line 14800 of file Types.h.

◆ isPremium

std::optional<bool> TgBot::User::isPremium { }

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

Definition at line 14825 of file Types.h.

◆ languageCode

std::optional<std::string> TgBot::User::languageCode { }

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

Definition at line 14820 of file Types.h.

◆ lastName

std::optional<std::string> TgBot::User::lastName { }

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

Definition at line 14810 of file Types.h.

◆ supportsGuestQueries

std::optional<bool> TgBot::User::supportsGuestQueries { }

Optional. True, if the bot supports guest queries from chats it is not a member of. Returned only in getMe.

Definition at line 14846 of file Types.h.

◆ supportsInlineQueries

std::optional<bool> TgBot::User::supportsInlineQueries { }

Optional. True, if the bot supports inline queries. Returned only in getMe.

Definition at line 14851 of file Types.h.

◆ supportsJoinRequestQueries

std::optional<bool> TgBot::User::supportsJoinRequestQueries { }

Optional. True, if the bot supports join request queries and can be assigned to process them. Returned only in getMe.

Definition at line 14886 of file Types.h.

◆ username

std::optional<std::string> TgBot::User::username { }

Optional. User's or bot's username.

Definition at line 14815 of file Types.h.


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