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

This object represents a chat. More...

#include <Types.h>

Public Types

enum class  Type { Private , Group , Supergroup , Channel }
using Ptr = std::shared_ptr<Chat>

Public Attributes

std::int64_t id { }
 Unique identifier for this chat. 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 signed 64-bit integer or double-precision float type are safe for storing this identifier.
Type type { }
 Type of the chat, can be either “private”, “group”, “supergroup” or “channel”
std::optional< std::string > title { }
 Optional. Title, for supergroups, channels and group chats.
std::optional< std::string > username { }
 Optional. Username, for private chats, supergroups and channels if available.
std::optional< std::string > firstName { }
 Optional. First name of the other party in a private chat.
std::optional< std::string > lastName { }
 Optional. Last name of the other party in a private chat.
std::optional< bool > isForum { }
 Optional. True, if the supergroup chat is a forum (has topics enabled).
std::optional< bool > isDirectMessages { }
 Optional. True, if the chat is the direct messages chat of a channel.

Detailed Description

This object represents a chat.

Definition at line 1493 of file Types.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 1494 of file Types.h.

Member Enumeration Documentation

◆ Type

enum class TgBot::Chat::Type
strong
Enumerator
Private 
Group 
Supergroup 
Channel 

Definition at line 1496 of file Types.h.

Member Data Documentation

◆ firstName

std::optional<std::string> TgBot::Chat::firstName { }

Optional. First name of the other party in a private chat.

Definition at line 1524 of file Types.h.

◆ id

std::int64_t TgBot::Chat::id { }

Unique identifier for this chat. 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 signed 64-bit integer or double-precision float type are safe for storing this identifier.

Definition at line 1504 of file Types.h.

◆ isDirectMessages

std::optional<bool> TgBot::Chat::isDirectMessages { }

Optional. True, if the chat is the direct messages chat of a channel.

Definition at line 1539 of file Types.h.

◆ isForum

std::optional<bool> TgBot::Chat::isForum { }

Optional. True, if the supergroup chat is a forum (has topics enabled).

Definition at line 1534 of file Types.h.

◆ lastName

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

Optional. Last name of the other party in a private chat.

Definition at line 1529 of file Types.h.

◆ title

std::optional<std::string> TgBot::Chat::title { }

Optional. Title, for supergroups, channels and group chats.

Definition at line 1514 of file Types.h.

◆ type

Type TgBot::Chat::type { }

Type of the chat, can be either “private”, “group”, “supergroup” or “channel”

Definition at line 1509 of file Types.h.

◆ username

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

Optional. Username, for private chats, supergroups and channels if available.

Definition at line 1519 of file Types.h.


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