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/Api.h
+11-7Lines changed: 11 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -770,7 +770,7 @@ friend class Bot;
770
770
* @brief Use this method to get basic information about a file and prepare it for downloading.
771
771
*
772
772
* For the moment, bots can download files of up to 20MB in size.
773
-
* The file can then be downloaded via Api::downloadFile, where filePath is taken from the response.
773
+
* The file can then be downloaded via Api::downloadFile or via the link https://api.telegram.org/file/bot<token>/<filePath>, where filePath is taken from the response.
774
774
* It is guaranteed that the filePath will be valid for at least 1 hour.
775
775
* When the link expires, a new one can be requested by calling Api::getFile again.
776
776
*
@@ -823,20 +823,22 @@ friend class Bot;
823
823
/**
824
824
* @brief Use this method to restrict a user in a supergroup.
825
825
*
826
-
* The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights.
826
+
* The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights.
827
827
* Pass True for all permissions to lift restrictions from a user.
828
828
*
829
829
* @param chatId Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
830
830
* @param userId Unique identifier of the target user
831
831
* @param permissions A JSON-serialized object for new user permissions
832
832
* @param untilDate Optional. Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever
833
+
* @param useIndependentChatPermissions Optional. Pass True if chat permissions are set independently. Otherwise, the canSendOtherMessages and canAddWebPagPreviews permissions will imply the canSendMessages, canSendAudios, canSendDocuments, canSendPhotos, canSendVideos, canSendVideoNotes, and canSendVoiceNotes permissions; the canSendPolls permission will imply the canSendMessages permission.
* @brief Use this method to promote or demote a user in a supergroup or a channel.
@@ -852,7 +854,7 @@ friend class Bot;
852
854
* @param canDeleteMessages Optional. Pass True if the administrator can delete messages of other users
853
855
* @param canInviteUsers Optional. Pass True if the administrator can invite new users to the chat
854
856
* @param canPinMessages Optional. Pass True if the administrator can pin messages, supergroups only
855
-
* @param canPromoteMembers Optional. Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)
857
+
* @param canPromoteMembers Optional. Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)
856
858
* @param isAnonymous Optional. Pass True if the administrator's presence in the chat is hidden
857
859
* @param canManageChat Optional. Pass 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. Implied by any other administrator privilege
858
860
* @param canManageVideoChats Optional. Pass True if the administrator can manage video chats
@@ -923,11 +925,13 @@ friend class Bot;
923
925
*
924
926
* @param chatId Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
925
927
* @param permissions A JSON-serialized object for new default chat permissions
928
+
* @param useIndependentChatPermissions Optional. Pass True if chat permissions are set independently. Otherwise, the canSendOtherMessages and canAddWebPagPreviews permissions will imply the canSendMessages, canSendAudios, canSendDocuments, canSendPhotos, canSendVideos, canSendVideoNotes, and canSendVoiceNotes permissions; the canSendPolls permission will imply the canSendMessages permission.
* @brief Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked.
@@ -1157,7 +1161,7 @@ friend class Bot;
1157
1161
/**
1158
1162
* @brief Use this method to get information about a member of a chat.
1159
1163
*
1160
-
* The method is guaranteed to work for other users, only if the bot is an administrator in the chat.
1164
+
* The method is only guaranteed to work for other users if the bot is an administrator in the chat.
1161
1165
*
1162
1166
* @param chatId Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
1163
1167
* @param userId Unique identifier of the target user
@@ -1207,7 +1211,7 @@ friend class Bot;
1207
1211
*
1208
1212
* @param chatId Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
1209
1213
* @param name Topic name, 1-128 characters
1210
-
* @param iconColor Optional. Color of the topic icon in RGB format. Currently, must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F
1214
+
* @param iconColor Optional. Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)
1211
1215
* @param iconCustomEmojiId Optional. Unique identifier of the custom emoji shown as the topic icon. Use Api::getForumTopicIconStickers to get all allowed custom emoji identifiers.
1212
1216
*
1213
1217
* @return Returns information about the created topic as a ForumTopic object.
Copy file name to clipboardExpand all lines: include/tgbot/types/ChatAdministratorRights.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ class ChatAdministratorRights {
42
42
bool canRestrictMembers;
43
43
44
44
/**
45
-
* @brief True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
45
+
* @brief True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
Copy file name to clipboardExpand all lines: include/tgbot/types/ChatJoinRequest.h
+13-3Lines changed: 13 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
-
#ifndefTGBOT_CPP_CHATJOINREQUEST_H
2
-
#defineTGBOT_CPP_CHATJOINREQUEST_H
1
+
#ifndefTGBOT_CHATJOINREQUEST_H
2
+
#defineTGBOT_CHATJOINREQUEST_H
3
3
4
4
#include"tgbot/types/Chat.h"
5
5
#include"tgbot/types/User.h"
@@ -31,6 +31,16 @@ class ChatJoinRequest {
31
31
*/
32
32
User::Ptr from;
33
33
34
+
/**
35
+
* @brief Identifier of a private chat with the user who sent the join request.
36
+
*
37
+
* The bot can use this identifier for 24 hours to send messages until the join request is processed, assuming no other administrator contacted the user.
38
+
*
39
+
* This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
40
+
* But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
Copy file name to clipboardExpand all lines: include/tgbot/types/ChatMemberAdministrator.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ class ChatMemberAdministrator : public ChatMember {
56
56
bool canRestrictMembers;
57
57
58
58
/**
59
-
* @brief True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
59
+
* @brief True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
0 commit comments