You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: include/tgbot/types/Chat.h
+39-3Lines changed: 39 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
#include<cstdint>
9
9
#include<memory>
10
10
#include<string>
11
+
#include<vector>
11
12
12
13
namespaceTgBot {
13
14
@@ -33,8 +34,8 @@ class Chat {
33
34
/**
34
35
* @brief Unique identifier for this chat.
35
36
*
36
-
* This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it.
37
-
* But it is smaller than 52 bits, so a signed 64bit integer or double-precision float type are safe for storing this identifier.
37
+
* This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
38
+
* 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.
38
39
*/
39
40
std::int64_t id;
40
41
@@ -63,107 +64,142 @@ class Chat {
63
64
*/
64
65
std::string lastName;
65
66
67
+
/**
68
+
* @brief Optional. True, if the supergroup chat is a forum (has topics enabled)
69
+
*/
70
+
bool isForum;
71
+
66
72
/**
67
73
* @brief Optional. Chat photo.
74
+
*
68
75
* Returned only in Api::getChat.
69
76
*/
70
77
ChatPhoto::Ptr photo;
71
78
79
+
/**
80
+
* @brief Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels.
81
+
*
82
+
* Returned only in Api::getChat.
83
+
*/
84
+
std::vector<std::string> activeUsernames;
85
+
86
+
/**
87
+
* @brief Optional. Custom emoji identifier of emoji status of the other party in a private chat.
88
+
*
89
+
* Returned only in Api::getChat.
90
+
*/
91
+
std::string emojiStatusCustomEmojiId;
92
+
72
93
/**
73
94
* @brief Optional. Bio of the other party in a private chat.
95
+
*
74
96
* Returned only in Api::getChat.
75
97
*/
76
98
std::string bio;
77
99
78
100
/**
79
101
* @brief Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user.
102
+
*
80
103
* Returned only in Api::getChat.
81
104
*/
82
105
bool hasPrivateForwards;
83
106
84
107
/**
85
108
* @brief Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat.
109
+
*
86
110
* Returned only in Api::getChat.
87
111
*/
88
112
bool hasRestrictedVoiceAndVideoMessages;
89
113
90
114
/**
91
115
* @brief Optional. True, if users need to join the supergroup before they can send messages.
116
+
*
92
117
* Returned only in Api::getChat.
93
118
*/
94
119
bool joinToSendMessages;
95
120
96
121
/**
97
122
* @brief Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators.
123
+
*
98
124
* Returned only in Api::getChat.
99
125
*/
100
126
bool joinByRequest;
101
127
102
128
/**
103
129
* @brief Optional. Description, for groups, supergroups and channel chats.
130
+
*
104
131
* Returned only in Api::getChat.
105
132
*/
106
133
std::string description;
107
134
108
135
/**
109
136
* @brief Optional. Primary invite link, for groups, supergroups and channel chats.
137
+
*
110
138
* Returned only in Api::getChat.
111
139
*/
112
140
std::string inviteLink;
113
141
114
142
/**
115
143
* @brief Optional. The most recent pinned message (by sending date).
144
+
*
116
145
* Returned only in Api::getChat.
117
146
*/
118
147
std::shared_ptr<Message> pinnedMessage;
119
148
120
149
/**
121
150
* @brief Optional. Default chat member permissions, for groups and supergroups.
151
+
*
122
152
* Returned only in Api::getChat.
123
153
*/
124
154
ChatPermissions::Ptr permissions;
125
155
126
156
/**
127
157
* @brief Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds.
158
+
*
128
159
* Returned only in Api::getChat.
129
160
*/
130
161
std::int32_t slowModeDelay;
131
162
132
163
/**
133
164
* @brief Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds.
165
+
*
134
166
* Returned only in Api::getChat.
135
167
*/
136
168
std::int32_t messageAutoDeleteTime;
137
169
138
170
/**
139
171
* @brief Optional. True, if messages from the chat can't be forwarded to other chats.
172
+
*
140
173
* Returned only in Api::getChat.
141
174
*/
142
175
bool hasProtectedContent;
143
176
144
177
/**
145
178
* @brief Optional. For supergroups, name of group sticker set.
179
+
*
146
180
* Returned only in Api::getChat.
147
181
*/
148
182
std::string stickerSetName;
149
183
150
184
/**
151
185
* @brief Optional. True, if the bot can change the group sticker set.
186
+
*
152
187
* Returned only in Api::getChat.
153
188
*/
154
189
bool canSetStickerSet;
155
190
156
191
/**
157
192
* @brief Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats.
158
-
* Returned only in Api::getChat.
159
193
*
160
194
* This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it.
161
195
* But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
196
+
* Returned only in Api::getChat.
162
197
*/
163
198
std::int64_t linkedChatId;
164
199
165
200
/**
166
201
* @brief Optional. For supergroups, the location to which the supergroup is connected.
Copy file name to clipboardExpand all lines: include/tgbot/types/ChatAdministratorRights.h
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ class ChatAdministratorRights {
21
21
22
22
/**
23
23
* @brief True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode.
24
+
*
24
25
* Implied by any other administrator privilege
25
26
*/
26
27
bool canManageChat;
@@ -69,6 +70,11 @@ class ChatAdministratorRights {
69
70
* @brief Optional. True, if the user is allowed to pin messages; groups and supergroups only
70
71
*/
71
72
bool canPinMessages;
73
+
74
+
/**
75
+
* @brief Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
Copy file name to clipboardExpand all lines: include/tgbot/types/ChatMemberAdministrator.h
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ class ChatMemberAdministrator : public ChatMember {
35
35
36
36
/**
37
37
* @brief True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode.
38
+
*
38
39
* Implied by any other administrator privilege
39
40
*/
40
41
bool canManageChat;
@@ -45,7 +46,7 @@ class ChatMemberAdministrator : public ChatMember {
45
46
bool canDeleteMessages;
46
47
47
48
/**
48
-
* @brief rue, if the administrator can manage video chats
49
+
* @brief True, if the administrator can manage video chats
49
50
*/
50
51
bool canManageVideoChats;
51
52
@@ -84,6 +85,11 @@ class ChatMemberAdministrator : public ChatMember {
84
85
*/
85
86
bool canPinMessages;
86
87
88
+
/**
89
+
* @brief Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only
0 commit comments