From 4c55a147e9f616c74b49a8651a27596d604f763d Mon Sep 17 00:00:00 2001 From: Nikolay M Date: Tue, 20 Feb 2024 13:56:42 +0400 Subject: [PATCH] Update Bot API to 7.1.0 (#73) --- src/Funogram.Generator/out/methods.json | 54 ++--- src/Funogram.Generator/out/types.json | 209 ++++++++++++++------ src/Funogram.Telegram/Directory.Build.props | 2 +- src/Funogram.Telegram/RequestsTypes.fs | 22 +-- src/Funogram.Telegram/Types.fs | 166 ++++++++++------ 5 files changed, 288 insertions(+), 165 deletions(-) diff --git a/src/Funogram.Generator/out/methods.json b/src/Funogram.Generator/out/methods.json index d01e9b9..8870634 100644 --- a/src/Funogram.Generator/out/methods.json +++ b/src/Funogram.Generator/out/methods.json @@ -1376,7 +1376,7 @@ "OriginalName": "latitude", "ConvertedName": "Latitude", "Description": "Latitude of the location", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false }, @@ -1384,7 +1384,7 @@ "OriginalName": "longitude", "ConvertedName": "Longitude", "Description": "Longitude of the location", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false }, @@ -1392,7 +1392,7 @@ "OriginalName": "horizontal_accuracy", "ConvertedName": "HorizontalAccuracy", "Description": "The radius of uncertainty for the location, measured in meters; 0-1500", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": true }, @@ -1481,7 +1481,7 @@ "OriginalName": "latitude", "ConvertedName": "Latitude", "Description": "Latitude of the venue", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false }, @@ -1489,7 +1489,7 @@ "OriginalName": "longitude", "ConvertedName": "Longitude", "Description": "Longitude of the venue", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false }, @@ -2163,7 +2163,7 @@ { "OriginalName": "can_manage_chat", "ConvertedName": "CanManageChat", - "Description": "Pass True if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "Description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -2217,49 +2217,49 @@ "Optional": true }, { - "OriginalName": "can_post_messages", - "ConvertedName": "CanPostMessages", - "Description": "Pass True if the administrator can post messages in the channel, or access channel statistics; channels only", + "OriginalName": "can_post_stories", + "ConvertedName": "CanPostStories", + "Description": "Pass True if the administrator can post stories to the chat", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true }, { - "OriginalName": "can_edit_messages", - "ConvertedName": "CanEditMessages", - "Description": "Pass True if the administrator can edit messages of other users and can pin messages; channels only", + "OriginalName": "can_edit_stories", + "ConvertedName": "CanEditStories", + "Description": "Pass True if the administrator can edit stories posted by other users", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true }, { - "OriginalName": "can_pin_messages", - "ConvertedName": "CanPinMessages", - "Description": "Pass True if the administrator can pin messages, supergroups only", + "OriginalName": "can_delete_stories", + "ConvertedName": "CanDeleteStories", + "Description": "Pass True if the administrator can delete stories posted by other users", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true }, { - "OriginalName": "can_post_stories", - "ConvertedName": "CanPostStories", - "Description": "Pass True if the administrator can post stories in the channel; channels only", + "OriginalName": "can_post_messages", + "ConvertedName": "CanPostMessages", + "Description": "Pass True if the administrator can post messages in the channel, or access channel statistics; channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true }, { - "OriginalName": "can_edit_stories", - "ConvertedName": "CanEditStories", - "Description": "Pass True if the administrator can edit stories posted by other users; channels only", + "OriginalName": "can_edit_messages", + "ConvertedName": "CanEditMessages", + "Description": "Pass True if the administrator can edit messages of other users and can pin messages; channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true }, { - "OriginalName": "can_delete_stories", - "ConvertedName": "CanDeleteStories", - "Description": "Pass True if the administrator can delete stories posted by other users; channels only", + "OriginalName": "can_pin_messages", + "ConvertedName": "CanPinMessages", + "Description": "Pass True if the administrator can pin messages, supergroups only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -3779,7 +3779,7 @@ "OriginalName": "latitude", "ConvertedName": "Latitude", "Description": "Latitude of new location", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false }, @@ -3787,7 +3787,7 @@ "OriginalName": "longitude", "ConvertedName": "Longitude", "Description": "Longitude of new location", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false }, @@ -3795,7 +3795,7 @@ "OriginalName": "horizontal_accuracy", "ConvertedName": "HorizontalAccuracy", "Description": "The radius of uncertainty for the location, measured in meters; 0-1500", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": true }, diff --git a/src/Funogram.Generator/out/types.json b/src/Funogram.Generator/out/types.json index 3b76334..1991ea1 100644 --- a/src/Funogram.Generator/out/types.json +++ b/src/Funogram.Generator/out/types.json @@ -554,7 +554,15 @@ { "OriginalName": "slow_mode_delay", "ConvertedName": "SlowModeDelay", - "Description": "For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.", + "Description": "For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in getChat.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "unrestrict_boost_count", + "ConvertedName": "UnrestrictBoostCount", + "Description": "For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions. Returned only in getChat.", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -615,6 +623,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "custom_emoji_sticker_set_name", + "ConvertedName": "CustomEmojiStickerSetName", + "Description": "For supergroups, the name of the group\u0027s custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. Returned only in getChat.", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "linked_chat_id", "ConvertedName": "LinkedChatId", @@ -674,6 +690,14 @@ "ConvertedFieldType": "Chat", "Optional": true }, + { + "OriginalName": "sender_boost_count", + "ConvertedName": "SenderBoostCount", + "Description": "If the sender of the message boosted the chat, the number of boosts added by the user", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, { "OriginalName": "date", "ConvertedName": "Date", @@ -738,6 +762,14 @@ "ConvertedFieldType": "TextQuote", "Optional": true }, + { + "OriginalName": "reply_to_story", + "ConvertedName": "ReplyToStory", + "Description": "For replies to a story, the original story", + "OriginalFieldType": "Story", + "ConvertedFieldType": "Story", + "Optional": true + }, { "OriginalName": "via_bot", "ConvertedName": "ViaBot", @@ -1106,6 +1138,14 @@ "ConvertedFieldType": "ProximityAlertTriggered", "Optional": true }, + { + "OriginalName": "boost_added", + "ConvertedName": "BoostAdded", + "Description": "Service message: user boosted the chat", + "OriginalFieldType": "ChatBoostAdded", + "ConvertedFieldType": "ChatBoostAdded", + "Optional": true + }, { "OriginalName": "forum_topic_created", "ConvertedName": "ForumTopicCreated", @@ -2152,9 +2192,29 @@ }, { "Name": "Story", - "Description": "This object represents a message about a forwarded story in the chat. Currently holds no information.", + "Description": "This object represents a story.", "Kind": { - "Case": "Stub" + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "chat", + "ConvertedName": "Chat", + "Description": "Chat that posted the story", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": false + }, + { + "OriginalName": "id", + "ConvertedName": "Id", + "Description": "Unique identifier for the story in the chat", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + } + ] + ] } }, { @@ -2621,17 +2681,17 @@ "Fields": [ [ { - "OriginalName": "longitude", - "ConvertedName": "Longitude", - "Description": "Longitude as defined by sender", + "OriginalName": "latitude", + "ConvertedName": "Latitude", + "Description": "Latitude as defined by sender", "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false }, { - "OriginalName": "latitude", - "ConvertedName": "Latitude", - "Description": "Latitude as defined by sender", + "OriginalName": "longitude", + "ConvertedName": "Longitude", + "Description": "Longitude as defined by sender", "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false @@ -2640,7 +2700,7 @@ "OriginalName": "horizontal_accuracy", "ConvertedName": "HorizontalAccuracy", "Description": "The radius of uncertainty for the location, measured in meters; 0-1500", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": true }, @@ -2820,6 +2880,25 @@ ] } }, + { + "Name": "ChatBoostAdded", + "Description": "This object represents a service message about a user boosting a chat.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "boost_count", + "ConvertedName": "BoostCount", + "Description": "Number of boosts added by the user", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + } + ] + ] + } + }, { "Name": "ForumTopicCreated", "Description": "This object represents a service message about a new forum topic created in the chat.", @@ -3163,7 +3242,7 @@ { "OriginalName": "giveaway_message_id", "ConvertedName": "GiveawayMessageId", - "Description": "Identifier of the messsage with the giveaway in the chat", + "Description": "Identifier of the message with the giveaway in the chat", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -3305,7 +3384,7 @@ { "OriginalName": "prefer_small_media", "ConvertedName": "PreferSmallMedia", - "Description": "True, if the media in the link preview is suppposed to be shrunk; ignored if the URL isn\u0027t explicitly specified or media size change isn\u0027t supported for the preview", + "Description": "True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn\u0027t explicitly specified or media size change isn\u0027t supported for the preview", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -3313,7 +3392,7 @@ { "OriginalName": "prefer_large_media", "ConvertedName": "PreferLargeMedia", - "Description": "True, if the media in the link preview is suppposed to be enlarged; ignored if the URL isn\u0027t explicitly specified or media size change isn\u0027t supported for the preview", + "Description": "True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn\u0027t explicitly specified or media size change isn\u0027t supported for the preview", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4159,7 +4238,7 @@ { "OriginalName": "can_manage_chat", "ConvertedName": "CanManageChat", - "Description": "True, if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "Description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": false @@ -4213,49 +4292,49 @@ "Optional": false }, { - "OriginalName": "can_post_messages", - "ConvertedName": "CanPostMessages", - "Description": "True, if the administrator can post messages in the channel, or access channel statistics; channels only", + "OriginalName": "can_post_stories", + "ConvertedName": "CanPostStories", + "Description": "True, if the administrator can post stories to the chat", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", - "Optional": true + "Optional": false }, { - "OriginalName": "can_edit_messages", - "ConvertedName": "CanEditMessages", - "Description": "True, if the administrator can edit messages of other users and can pin messages; channels only", + "OriginalName": "can_edit_stories", + "ConvertedName": "CanEditStories", + "Description": "True, if the administrator can edit stories posted by other users", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", - "Optional": true + "Optional": false }, { - "OriginalName": "can_pin_messages", - "ConvertedName": "CanPinMessages", - "Description": "True, if the user is allowed to pin messages; groups and supergroups only", + "OriginalName": "can_delete_stories", + "ConvertedName": "CanDeleteStories", + "Description": "True, if the administrator can delete stories posted by other users", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", - "Optional": true + "Optional": false }, { - "OriginalName": "can_post_stories", - "ConvertedName": "CanPostStories", - "Description": "True, if the administrator can post stories in the channel; channels only", + "OriginalName": "can_post_messages", + "ConvertedName": "CanPostMessages", + "Description": "True, if the administrator can post messages in the channel, or access channel statistics; channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true }, { - "OriginalName": "can_edit_stories", - "ConvertedName": "CanEditStories", - "Description": "True, if the administrator can edit stories posted by other users; channels only", + "OriginalName": "can_edit_messages", + "ConvertedName": "CanEditMessages", + "Description": "True, if the administrator can edit messages of other users and can pin messages; channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true }, { - "OriginalName": "can_delete_stories", - "ConvertedName": "CanDeleteStories", - "Description": "True, if the administrator can delete stories posted by other users; channels only", + "OriginalName": "can_pin_messages", + "ConvertedName": "CanPinMessages", + "Description": "True, if the user is allowed to pin messages; groups and supergroups only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4467,7 +4546,7 @@ { "OriginalName": "can_manage_chat", "ConvertedName": "CanManageChat", - "Description": "True, if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege", + "Description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": false @@ -4521,49 +4600,49 @@ "Optional": false }, { - "OriginalName": "can_post_messages", - "ConvertedName": "CanPostMessages", - "Description": "True, if the administrator can post messages in the channel, or access channel statistics; channels only", + "OriginalName": "can_post_stories", + "ConvertedName": "CanPostStories", + "Description": "True, if the administrator can post stories to the chat", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", - "Optional": true + "Optional": false }, { - "OriginalName": "can_edit_messages", - "ConvertedName": "CanEditMessages", - "Description": "True, if the administrator can edit messages of other users and can pin messages; channels only", + "OriginalName": "can_edit_stories", + "ConvertedName": "CanEditStories", + "Description": "True, if the administrator can edit stories posted by other users", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", - "Optional": true + "Optional": false }, { - "OriginalName": "can_pin_messages", - "ConvertedName": "CanPinMessages", - "Description": "True, if the user is allowed to pin messages; groups and supergroups only", + "OriginalName": "can_delete_stories", + "ConvertedName": "CanDeleteStories", + "Description": "True, if the administrator can delete stories posted by other users", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", - "Optional": true + "Optional": false }, { - "OriginalName": "can_post_stories", - "ConvertedName": "CanPostStories", - "Description": "True, if the administrator can post stories in the channel; channels only", + "OriginalName": "can_post_messages", + "ConvertedName": "CanPostMessages", + "Description": "True, if the administrator can post messages in the channel, or access channel statistics; channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true }, { - "OriginalName": "can_edit_stories", - "ConvertedName": "CanEditStories", - "Description": "True, if the administrator can edit stories posted by other users; channels only", + "OriginalName": "can_edit_messages", + "ConvertedName": "CanEditMessages", + "Description": "True, if the administrator can edit messages of other users and can pin messages; channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true }, { - "OriginalName": "can_delete_stories", - "ConvertedName": "CanDeleteStories", - "Description": "True, if the administrator can delete stories posted by other users; channels only", + "OriginalName": "can_pin_messages", + "ConvertedName": "CanPinMessages", + "Description": "True, if the user is allowed to pin messages; groups and supergroups only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -5867,7 +5946,7 @@ { "OriginalName": "boost", "ConvertedName": "Boost", - "Description": "Infomation about the chat boost", + "Description": "Information about the chat boost", "OriginalFieldType": "ChatBoost", "ConvertedFieldType": "ChatBoost", "Optional": false @@ -6619,7 +6698,7 @@ "OriginalName": "x_shift", "ConvertedName": "XShift", "Description": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false }, @@ -6627,7 +6706,7 @@ "OriginalName": "y_shift", "ConvertedName": "YShift", "Description": "Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false }, @@ -6635,7 +6714,7 @@ "OriginalName": "scale", "ConvertedName": "Scale", "Description": "Mask scaling coefficient. For example, 2.0 means double size.", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false } @@ -7802,7 +7881,7 @@ "OriginalName": "latitude", "ConvertedName": "Latitude", "Description": "Location latitude in degrees", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false }, @@ -7810,7 +7889,7 @@ "OriginalName": "longitude", "ConvertedName": "Longitude", "Description": "Location longitude in degrees", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false }, @@ -7826,7 +7905,7 @@ "OriginalName": "horizontal_accuracy", "ConvertedName": "HorizontalAccuracy", "Description": "The radius of uncertainty for the location, measured in meters; 0-1500", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": true }, @@ -8920,7 +8999,7 @@ "OriginalName": "horizontal_accuracy", "ConvertedName": "HorizontalAccuracy", "Description": "The radius of uncertainty for the location, measured in meters; 0-1500", - "OriginalFieldType": "Float number", + "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": true }, diff --git a/src/Funogram.Telegram/Directory.Build.props b/src/Funogram.Telegram/Directory.Build.props index 4482412..4a9e755 100644 --- a/src/Funogram.Telegram/Directory.Build.props +++ b/src/Funogram.Telegram/Directory.Build.props @@ -1,6 +1,6 @@ - 7.0.0.4 + 7.1.0 Nikolay Matyushin Funogram.Telegram Funogram.Telegram diff --git a/src/Funogram.Telegram/RequestsTypes.fs b/src/Funogram.Telegram/RequestsTypes.fs index 1d70310..9bcec38 100644 --- a/src/Funogram.Telegram/RequestsTypes.fs +++ b/src/Funogram.Telegram/RequestsTypes.fs @@ -843,15 +843,15 @@ type PromoteChatMember = CanPromoteMembers: bool option CanChangeInfo: bool option CanInviteUsers: bool option - CanPostMessages: bool option - CanEditMessages: bool option - CanPinMessages: bool option CanPostStories: bool option CanEditStories: bool option CanDeleteStories: bool option + CanPostMessages: bool option + CanEditMessages: bool option + CanPinMessages: bool option CanManageTopics: bool option } - static member Make(chatId: ChatId, userId: int64, ?canEditStories: bool, ?canPostStories: bool, ?canPinMessages: bool, ?canEditMessages: bool, ?canPostMessages: bool, ?canInviteUsers: bool, ?canChangeInfo: bool, ?canPromoteMembers: bool, ?canRestrictMembers: bool, ?canManageVideoChats: bool, ?canDeleteMessages: bool, ?canManageChat: bool, ?isAnonymous: bool, ?canDeleteStories: bool, ?canManageTopics: bool) = + static member Make(chatId: ChatId, userId: int64, ?canEditMessages: bool, ?canPostMessages: bool, ?canDeleteStories: bool, ?canEditStories: bool, ?canPostStories: bool, ?canInviteUsers: bool, ?canChangeInfo: bool, ?canPromoteMembers: bool, ?canRestrictMembers: bool, ?canManageVideoChats: bool, ?canDeleteMessages: bool, ?canManageChat: bool, ?isAnonymous: bool, ?canPinMessages: bool, ?canManageTopics: bool) = { ChatId = chatId UserId = userId @@ -863,18 +863,18 @@ type PromoteChatMember = CanPromoteMembers = canPromoteMembers CanChangeInfo = canChangeInfo CanInviteUsers = canInviteUsers - CanPostMessages = canPostMessages - CanEditMessages = canEditMessages - CanPinMessages = canPinMessages CanPostStories = canPostStories CanEditStories = canEditStories CanDeleteStories = canDeleteStories + CanPostMessages = canPostMessages + CanEditMessages = canEditMessages + CanPinMessages = canPinMessages CanManageTopics = canManageTopics } - static member Make(chatId: int64, userId: int64, ?canEditStories: bool, ?canPostStories: bool, ?canPinMessages: bool, ?canEditMessages: bool, ?canPostMessages: bool, ?canInviteUsers: bool, ?canChangeInfo: bool, ?canPromoteMembers: bool, ?canRestrictMembers: bool, ?canManageVideoChats: bool, ?canDeleteMessages: bool, ?canManageChat: bool, ?isAnonymous: bool, ?canDeleteStories: bool, ?canManageTopics: bool) = - PromoteChatMember.Make(ChatId.Int chatId, userId, ?canEditStories = canEditStories, ?canPostStories = canPostStories, ?canPinMessages = canPinMessages, ?canEditMessages = canEditMessages, ?canPostMessages = canPostMessages, ?canInviteUsers = canInviteUsers, ?canChangeInfo = canChangeInfo, ?canPromoteMembers = canPromoteMembers, ?canRestrictMembers = canRestrictMembers, ?canManageVideoChats = canManageVideoChats, ?canDeleteMessages = canDeleteMessages, ?canManageChat = canManageChat, ?isAnonymous = isAnonymous, ?canDeleteStories = canDeleteStories, ?canManageTopics = canManageTopics) - static member Make(chatId: string, userId: int64, ?canEditStories: bool, ?canPostStories: bool, ?canPinMessages: bool, ?canEditMessages: bool, ?canPostMessages: bool, ?canInviteUsers: bool, ?canChangeInfo: bool, ?canPromoteMembers: bool, ?canRestrictMembers: bool, ?canManageVideoChats: bool, ?canDeleteMessages: bool, ?canManageChat: bool, ?isAnonymous: bool, ?canDeleteStories: bool, ?canManageTopics: bool) = - PromoteChatMember.Make(ChatId.String chatId, userId, ?canEditStories = canEditStories, ?canPostStories = canPostStories, ?canPinMessages = canPinMessages, ?canEditMessages = canEditMessages, ?canPostMessages = canPostMessages, ?canInviteUsers = canInviteUsers, ?canChangeInfo = canChangeInfo, ?canPromoteMembers = canPromoteMembers, ?canRestrictMembers = canRestrictMembers, ?canManageVideoChats = canManageVideoChats, ?canDeleteMessages = canDeleteMessages, ?canManageChat = canManageChat, ?isAnonymous = isAnonymous, ?canDeleteStories = canDeleteStories, ?canManageTopics = canManageTopics) + static member Make(chatId: int64, userId: int64, ?canEditMessages: bool, ?canPostMessages: bool, ?canDeleteStories: bool, ?canEditStories: bool, ?canPostStories: bool, ?canInviteUsers: bool, ?canChangeInfo: bool, ?canPromoteMembers: bool, ?canRestrictMembers: bool, ?canManageVideoChats: bool, ?canDeleteMessages: bool, ?canManageChat: bool, ?isAnonymous: bool, ?canPinMessages: bool, ?canManageTopics: bool) = + PromoteChatMember.Make(ChatId.Int chatId, userId, ?canEditMessages = canEditMessages, ?canPostMessages = canPostMessages, ?canDeleteStories = canDeleteStories, ?canEditStories = canEditStories, ?canPostStories = canPostStories, ?canInviteUsers = canInviteUsers, ?canChangeInfo = canChangeInfo, ?canPromoteMembers = canPromoteMembers, ?canRestrictMembers = canRestrictMembers, ?canManageVideoChats = canManageVideoChats, ?canDeleteMessages = canDeleteMessages, ?canManageChat = canManageChat, ?isAnonymous = isAnonymous, ?canPinMessages = canPinMessages, ?canManageTopics = canManageTopics) + static member Make(chatId: string, userId: int64, ?canEditMessages: bool, ?canPostMessages: bool, ?canDeleteStories: bool, ?canEditStories: bool, ?canPostStories: bool, ?canInviteUsers: bool, ?canChangeInfo: bool, ?canPromoteMembers: bool, ?canRestrictMembers: bool, ?canManageVideoChats: bool, ?canDeleteMessages: bool, ?canManageChat: bool, ?isAnonymous: bool, ?canPinMessages: bool, ?canManageTopics: bool) = + PromoteChatMember.Make(ChatId.String chatId, userId, ?canEditMessages = canEditMessages, ?canPostMessages = canPostMessages, ?canDeleteStories = canDeleteStories, ?canEditStories = canEditStories, ?canPostStories = canPostStories, ?canInviteUsers = canInviteUsers, ?canChangeInfo = canChangeInfo, ?canPromoteMembers = canPromoteMembers, ?canRestrictMembers = canRestrictMembers, ?canManageVideoChats = canManageVideoChats, ?canDeleteMessages = canDeleteMessages, ?canManageChat = canManageChat, ?isAnonymous = isAnonymous, ?canPinMessages = canPinMessages, ?canManageTopics = canManageTopics) interface IRequestBase with member _.MethodName = "promoteChatMember" diff --git a/src/Funogram.Telegram/Types.fs b/src/Funogram.Telegram/Types.fs index e4379be..2cd14af 100644 --- a/src/Funogram.Telegram/Types.fs +++ b/src/Funogram.Telegram/Types.fs @@ -332,9 +332,12 @@ and [] Chat = /// Default chat member permissions, for groups and supergroups. Returned only in getChat. [] Permissions: ChatPermissions option - /// For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat. + /// For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in getChat. [] SlowModeDelay: int64 option + /// For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions. Returned only in getChat. + [] + UnrestrictBoostCount: int64 option /// The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat. [] MessageAutoDeleteTime: int64 option @@ -356,6 +359,9 @@ and [] Chat = /// True, if the bot can change the group sticker set. Returned only in getChat. [] CanSetStickerSet: bool option + /// For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. Returned only in getChat. + [] + CustomEmojiStickerSetName: string option /// Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat. [] LinkedChatId: int64 option @@ -363,16 +369,16 @@ and [] Chat = [] Location: ChatLocation option } - static member Create(id: int64, ``type``: ChatType, ?joinByRequest: bool, ?description: string, ?inviteLink: string, ?pinnedMessage: Message, ?permissions: ChatPermissions, ?slowModeDelay: int64, ?messageAutoDeleteTime: int64, ?hasAggressiveAntiSpamEnabled: bool, ?hasHiddenMembers: bool, ?hasProtectedContent: bool, ?hasVisibleHistory: bool, ?stickerSetName: string, ?canSetStickerSet: bool, ?joinToSendMessages: bool, ?hasRestrictedVoiceAndVideoMessages: bool, ?hasPrivateForwards: bool, ?bio: string, ?title: string, ?username: string, ?firstName: string, ?lastName: string, ?isForum: bool, ?photo: ChatPhoto, ?linkedChatId: int64, ?activeUsernames: string[], ?accentColorId: int64, ?backgroundCustomEmojiId: string, ?profileAccentColorId: int64, ?profileBackgroundCustomEmojiId: string, ?emojiStatusCustomEmojiId: string, ?emojiStatusExpirationDate: int64, ?availableReactions: ReactionType[], ?location: ChatLocation) = + static member Create(id: int64, ``type``: ChatType, ?description: string, ?inviteLink: string, ?pinnedMessage: Message, ?permissions: ChatPermissions, ?slowModeDelay: int64, ?unrestrictBoostCount: int64, ?messageAutoDeleteTime: int64, ?hasAggressiveAntiSpamEnabled: bool, ?hasHiddenMembers: bool, ?hasProtectedContent: bool, ?hasVisibleHistory: bool, ?stickerSetName: string, ?canSetStickerSet: bool, ?customEmojiStickerSetName: string, ?joinByRequest: bool, ?joinToSendMessages: bool, ?hasRestrictedVoiceAndVideoMessages: bool, ?hasPrivateForwards: bool, ?title: string, ?username: string, ?firstName: string, ?lastName: string, ?isForum: bool, ?photo: ChatPhoto, ?activeUsernames: string[], ?availableReactions: ReactionType[], ?accentColorId: int64, ?backgroundCustomEmojiId: string, ?profileAccentColorId: int64, ?profileBackgroundCustomEmojiId: string, ?emojiStatusCustomEmojiId: string, ?emojiStatusExpirationDate: int64, ?bio: string, ?linkedChatId: int64, ?location: ChatLocation) = { Id = id Type = ``type`` - JoinByRequest = joinByRequest Description = description InviteLink = inviteLink PinnedMessage = pinnedMessage Permissions = permissions SlowModeDelay = slowModeDelay + UnrestrictBoostCount = unrestrictBoostCount MessageAutoDeleteTime = messageAutoDeleteTime HasAggressiveAntiSpamEnabled = hasAggressiveAntiSpamEnabled HasHiddenMembers = hasHiddenMembers @@ -380,25 +386,27 @@ and [] Chat = HasVisibleHistory = hasVisibleHistory StickerSetName = stickerSetName CanSetStickerSet = canSetStickerSet + CustomEmojiStickerSetName = customEmojiStickerSetName + JoinByRequest = joinByRequest JoinToSendMessages = joinToSendMessages HasRestrictedVoiceAndVideoMessages = hasRestrictedVoiceAndVideoMessages HasPrivateForwards = hasPrivateForwards - Bio = bio Title = title Username = username FirstName = firstName LastName = lastName IsForum = isForum Photo = photo - LinkedChatId = linkedChatId ActiveUsernames = activeUsernames + AvailableReactions = availableReactions AccentColorId = accentColorId BackgroundCustomEmojiId = backgroundCustomEmojiId ProfileAccentColorId = profileAccentColorId ProfileBackgroundCustomEmojiId = profileBackgroundCustomEmojiId EmojiStatusCustomEmojiId = emojiStatusCustomEmojiId EmojiStatusExpirationDate = emojiStatusExpirationDate - AvailableReactions = availableReactions + Bio = bio + LinkedChatId = linkedChatId Location = location } @@ -417,6 +425,9 @@ and [] Message = /// Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. [] SenderChat: Chat option + /// If the sender of the message boosted the chat, the number of boosts added by the user + [] + SenderBoostCount: int64 option /// Date the message was sent in Unix time. It is always a positive number, representing a valid date. [] Date: DateTime @@ -441,6 +452,9 @@ and [] Message = /// For replies that quote part of the original message, the quoted part of the message [] Quote: TextQuote option + /// For replies to a story, the original story + [] + ReplyToStory: Story option /// Bot through which the message was sent [] ViaBot: User option @@ -579,6 +593,9 @@ and [] Message = /// Service message. A user in the chat triggered another user's proximity alert while sharing Live Location. [] ProximityAlertTriggered: ProximityAlertTriggered option + /// Service message: user boosted the chat + [] + BoostAdded: ChatBoostAdded option /// Service message: forum topic created [] ForumTopicCreated: ForumTopicCreated option @@ -628,7 +645,7 @@ and [] Message = [] ReplyMarkup: InlineKeyboardMarkup option } - static member Create(messageId: int64, date: DateTime, chat: Chat, ?chatShared: ChatShared, ?usersShared: UsersShared, ?successfulPayment: SuccessfulPayment, ?invoice: Invoice, ?pinnedMessage: MaybeInaccessibleMessage, ?migrateFromChatId: int64, ?migrateToChatId: int64, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?channelChatCreated: bool, ?supergroupChatCreated: bool, ?groupChatCreated: bool, ?deleteChatPhoto: bool, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?connectedWebsite: string, ?writeAccessAllowed: WriteAccessAllowed, ?passportData: PassportData, ?proximityAlertTriggered: ProximityAlertTriggered, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?giveawayCompleted: GiveawayCompleted, ?giveawayWinners: GiveawayWinners, ?leftChatMember: User, ?giveaway: Giveaway, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?generalForumTopicHidden: GeneralForumTopicHidden, ?forumTopicReopened: ForumTopicReopened, ?forumTopicClosed: ForumTopicClosed, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?giveawayCreated: GiveawayCreated, ?newChatMembers: User[], ?venue: Venue, ?webAppData: WebAppData, ?authorSignature: string, ?mediaGroupId: string, ?hasProtectedContent: bool, ?editDate: int64, ?viaBot: User, ?quote: TextQuote, ?text: string, ?externalReply: ExternalReplyInfo, ?isAutomaticForward: bool, ?isTopicMessage: bool, ?forwardOrigin: MessageOrigin, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?replyToMessage: Message, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?animation: Animation, ?poll: Poll, ?game: Game, ?dice: Dice, ?contact: Contact, ?hasMediaSpoiler: bool, ?captionEntities: MessageEntity[], ?caption: string, ?voice: Voice, ?videoNote: VideoNote, ?video: Video, ?story: Story, ?sticker: Sticker, ?photo: PhotoSize[], ?document: Document, ?audio: Audio, ?location: Location, ?replyMarkup: InlineKeyboardMarkup) = + static member Create(messageId: int64, date: DateTime, chat: Chat, ?chatShared: ChatShared, ?usersShared: UsersShared, ?successfulPayment: SuccessfulPayment, ?invoice: Invoice, ?pinnedMessage: MaybeInaccessibleMessage, ?migrateFromChatId: int64, ?migrateToChatId: int64, ?channelChatCreated: bool, ?connectedWebsite: string, ?supergroupChatCreated: bool, ?groupChatCreated: bool, ?deleteChatPhoto: bool, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?leftChatMember: User, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?writeAccessAllowed: WriteAccessAllowed, ?passportData: PassportData, ?proximityAlertTriggered: ProximityAlertTriggered, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?giveawayCompleted: GiveawayCompleted, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?giveawayCreated: GiveawayCreated, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?generalForumTopicHidden: GeneralForumTopicHidden, ?forumTopicReopened: ForumTopicReopened, ?forumTopicClosed: ForumTopicClosed, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?boostAdded: ChatBoostAdded, ?newChatMembers: User[], ?location: Location, ?venue: Venue, ?poll: Poll, ?mediaGroupId: string, ?hasProtectedContent: bool, ?editDate: int64, ?viaBot: User, ?replyToStory: Story, ?quote: TextQuote, ?externalReply: ExternalReplyInfo, ?replyToMessage: Message, ?isAutomaticForward: bool, ?isTopicMessage: bool, ?forwardOrigin: MessageOrigin, ?senderBoostCount: int64, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?authorSignature: string, ?webAppData: WebAppData, ?text: string, ?linkPreviewOptions: LinkPreviewOptions, ?game: Game, ?dice: Dice, ?contact: Contact, ?hasMediaSpoiler: bool, ?captionEntities: MessageEntity[], ?caption: string, ?voice: Voice, ?videoNote: VideoNote, ?video: Video, ?story: Story, ?sticker: Sticker, ?photo: PhotoSize[], ?document: Document, ?audio: Audio, ?animation: Animation, ?entities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup) = { MessageId = messageId Date = date @@ -640,14 +657,15 @@ and [] Message = PinnedMessage = pinnedMessage MigrateFromChatId = migrateFromChatId MigrateToChatId = migrateToChatId - MessageAutoDeleteTimerChanged = messageAutoDeleteTimerChanged ChannelChatCreated = channelChatCreated + ConnectedWebsite = connectedWebsite SupergroupChatCreated = supergroupChatCreated GroupChatCreated = groupChatCreated DeleteChatPhoto = deleteChatPhoto NewChatPhoto = newChatPhoto NewChatTitle = newChatTitle - ConnectedWebsite = connectedWebsite + LeftChatMember = leftChatMember + MessageAutoDeleteTimerChanged = messageAutoDeleteTimerChanged WriteAccessAllowed = writeAccessAllowed PassportData = passportData ProximityAlertTriggered = proximityAlertTriggered @@ -657,37 +675,38 @@ and [] Message = VideoChatScheduled = videoChatScheduled GiveawayCompleted = giveawayCompleted GiveawayWinners = giveawayWinners - LeftChatMember = leftChatMember Giveaway = giveaway + GiveawayCreated = giveawayCreated GeneralForumTopicUnhidden = generalForumTopicUnhidden GeneralForumTopicHidden = generalForumTopicHidden ForumTopicReopened = forumTopicReopened ForumTopicClosed = forumTopicClosed ForumTopicEdited = forumTopicEdited ForumTopicCreated = forumTopicCreated - GiveawayCreated = giveawayCreated + BoostAdded = boostAdded NewChatMembers = newChatMembers + Location = location Venue = venue - WebAppData = webAppData - AuthorSignature = authorSignature + Poll = poll MediaGroupId = mediaGroupId HasProtectedContent = hasProtectedContent EditDate = editDate ViaBot = viaBot + ReplyToStory = replyToStory Quote = quote - Text = text ExternalReply = externalReply + ReplyToMessage = replyToMessage IsAutomaticForward = isAutomaticForward IsTopicMessage = isTopicMessage ForwardOrigin = forwardOrigin + SenderBoostCount = senderBoostCount SenderChat = senderChat From = from MessageThreadId = messageThreadId - ReplyToMessage = replyToMessage - Entities = entities + AuthorSignature = authorSignature + WebAppData = webAppData + Text = text LinkPreviewOptions = linkPreviewOptions - Animation = animation - Poll = poll Game = game Dice = dice Contact = contact @@ -702,7 +721,8 @@ and [] Message = Photo = photo Document = document Audio = audio - Location = location + Animation = animation + Entities = entities ReplyMarkup = replyMarkup } @@ -1186,9 +1206,21 @@ and [] Document = FileSize = fileSize } -/// This object represents a message about a forwarded story in the chat. Currently holds no information. -and Story = - new() = {} +/// This object represents a story. +and [] Story = + { + /// Chat that posted the story + [] + Chat: Chat + /// Unique identifier for the story in the chat + [] + Id: int64 + } + static member Create(chat: Chat, id: int64) = + { + Chat = chat + Id = id + } /// This object represents a video file. and [] Video = @@ -1441,12 +1473,12 @@ and [] Poll = /// This object represents a point on the map. and [] Location = { - /// Longitude as defined by sender - [] - Longitude: float /// Latitude as defined by sender [] Latitude: float + /// Longitude as defined by sender + [] + Longitude: float /// The radius of uncertainty for the location, measured in meters; 0-1500 [] HorizontalAccuracy: float option @@ -1460,10 +1492,10 @@ and [] Location = [] ProximityAlertRadius: int64 option } - static member Create(longitude: float, latitude: float, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64) = + static member Create(latitude: float, longitude: float, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64) = { - Longitude = longitude Latitude = latitude + Longitude = longitude HorizontalAccuracy = horizontalAccuracy LivePeriod = livePeriod Heading = heading @@ -1554,6 +1586,18 @@ and [] MessageAutoDeleteTimerChanged = MessageAutoDeleteTime = messageAutoDeleteTime } +/// This object represents a service message about a user boosting a chat. +and [] ChatBoostAdded = + { + /// Number of boosts added by the user + [] + BoostCount: int64 + } + static member Create(boostCount: int64) = + { + BoostCount = boostCount + } + /// This object represents a service message about a new forum topic created in the chat. and [] ForumTopicCreated = { @@ -1748,7 +1792,7 @@ and [] GiveawayWinners = /// The chat that created the giveaway [] Chat: Chat - /// Identifier of the messsage with the giveaway in the chat + /// Identifier of the message with the giveaway in the chat [] GiveawayMessageId: int64 /// Point in time (Unix timestamp) when winners of the giveaway were selected @@ -1823,10 +1867,10 @@ and [] LinkPreviewOptions = /// URL to use for the link preview. If empty, then the first URL found in the message text will be used [] Url: string option - /// True, if the media in the link preview is suppposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview + /// True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview [] PreferSmallMedia: bool option - /// True, if the media in the link preview is suppposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview + /// True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview [] PreferLargeMedia: bool option /// True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text @@ -2310,7 +2354,7 @@ and [] ChatAdministratorRights = /// True, if the user's presence in the chat is hidden [] IsAnonymous: bool - /// True, if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege + /// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. [] CanManageChat: bool /// True, if the administrator can delete messages of other users @@ -2331,6 +2375,15 @@ and [] ChatAdministratorRights = /// True, if the user is allowed to invite new users to the chat [] CanInviteUsers: bool + /// True, if the administrator can post stories to the chat + [] + CanPostStories: bool + /// True, if the administrator can edit stories posted by other users + [] + CanEditStories: bool + /// True, if the administrator can delete stories posted by other users + [] + CanDeleteStories: bool /// True, if the administrator can post messages in the channel, or access channel statistics; channels only [] CanPostMessages: bool option @@ -2340,15 +2393,6 @@ and [] ChatAdministratorRights = /// True, if the user is allowed to pin messages; groups and supergroups only [] CanPinMessages: bool option - /// True, if the administrator can post stories in the channel; channels only - [] - CanPostStories: bool option - /// True, if the administrator can edit stories posted by other users; channels only - [] - CanEditStories: bool option - /// True, if the administrator can delete stories posted by other users; channels only - [] - CanDeleteStories: bool option /// True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only [] CanManageTopics: bool option @@ -2356,7 +2400,7 @@ and [] ChatAdministratorRights = [] CanManageVoiceChats: bool option } - static member Create(isAnonymous: bool, canManageChat: bool, canDeleteMessages: bool, canManageVideoChats: bool, canRestrictMembers: bool, canPromoteMembers: bool, canChangeInfo: bool, canInviteUsers: bool, ?canPostMessages: bool, ?canEditMessages: bool, ?canPinMessages: bool, ?canPostStories: bool, ?canEditStories: bool, ?canDeleteStories: bool, ?canManageTopics: bool, ?canManageVoiceChats: bool) = + static member Create(isAnonymous: bool, canManageChat: bool, canDeleteMessages: bool, canManageVideoChats: bool, canRestrictMembers: bool, canPromoteMembers: bool, canChangeInfo: bool, canInviteUsers: bool, canPostStories: bool, canEditStories: bool, canDeleteStories: bool, ?canPostMessages: bool, ?canEditMessages: bool, ?canPinMessages: bool, ?canManageTopics: bool, ?canManageVoiceChats: bool) = { IsAnonymous = isAnonymous CanManageChat = canManageChat @@ -2366,12 +2410,12 @@ and [] ChatAdministratorRights = CanPromoteMembers = canPromoteMembers CanChangeInfo = canChangeInfo CanInviteUsers = canInviteUsers - CanPostMessages = canPostMessages - CanEditMessages = canEditMessages - CanPinMessages = canPinMessages CanPostStories = canPostStories CanEditStories = canEditStories CanDeleteStories = canDeleteStories + CanPostMessages = canPostMessages + CanEditMessages = canEditMessages + CanPinMessages = canPinMessages CanManageTopics = canManageTopics CanManageVoiceChats = canManageVoiceChats } @@ -2460,7 +2504,7 @@ and [] ChatMemberAdministrator = /// True, if the user's presence in the chat is hidden [] IsAnonymous: bool - /// True, if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege + /// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. [] CanManageChat: bool /// True, if the administrator can delete messages of other users @@ -2481,6 +2525,15 @@ and [] ChatMemberAdministrator = /// True, if the user is allowed to invite new users to the chat [] CanInviteUsers: bool + /// True, if the administrator can post stories to the chat + [] + CanPostStories: bool + /// True, if the administrator can edit stories posted by other users + [] + CanEditStories: bool + /// True, if the administrator can delete stories posted by other users + [] + CanDeleteStories: bool /// True, if the administrator can post messages in the channel, or access channel statistics; channels only [] CanPostMessages: bool option @@ -2490,15 +2543,6 @@ and [] ChatMemberAdministrator = /// True, if the user is allowed to pin messages; groups and supergroups only [] CanPinMessages: bool option - /// True, if the administrator can post stories in the channel; channels only - [] - CanPostStories: bool option - /// True, if the administrator can edit stories posted by other users; channels only - [] - CanEditStories: bool option - /// True, if the administrator can delete stories posted by other users; channels only - [] - CanDeleteStories: bool option /// True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only [] CanManageTopics: bool option @@ -2509,26 +2553,26 @@ and [] ChatMemberAdministrator = [] CanManageVoiceChats: bool option } - static member Create(status: string, canInviteUsers: bool, canPromoteMembers: bool, canRestrictMembers: bool, canManageVideoChats: bool, canChangeInfo: bool, canManageChat: bool, isAnonymous: bool, canBeEdited: bool, user: User, canDeleteMessages: bool, ?customTitle: string, ?canPostMessages: bool, ?canEditMessages: bool, ?canPinMessages: bool, ?canPostStories: bool, ?canEditStories: bool, ?canDeleteStories: bool, ?canManageTopics: bool, ?canManageVoiceChats: bool) = + static member Create(status: string, canDeleteStories: bool, canEditStories: bool, canPostStories: bool, canInviteUsers: bool, canPromoteMembers: bool, canRestrictMembers: bool, canChangeInfo: bool, canDeleteMessages: bool, canManageChat: bool, isAnonymous: bool, canBeEdited: bool, user: User, canManageVideoChats: bool, ?customTitle: string, ?canPostMessages: bool, ?canEditMessages: bool, ?canPinMessages: bool, ?canManageTopics: bool, ?canManageVoiceChats: bool) = { Status = status + CanDeleteStories = canDeleteStories + CanEditStories = canEditStories + CanPostStories = canPostStories CanInviteUsers = canInviteUsers CanPromoteMembers = canPromoteMembers CanRestrictMembers = canRestrictMembers - CanManageVideoChats = canManageVideoChats CanChangeInfo = canChangeInfo + CanDeleteMessages = canDeleteMessages CanManageChat = canManageChat IsAnonymous = isAnonymous CanBeEdited = canBeEdited User = user - CanDeleteMessages = canDeleteMessages + CanManageVideoChats = canManageVideoChats CustomTitle = customTitle CanPostMessages = canPostMessages CanEditMessages = canEditMessages CanPinMessages = canPinMessages - CanPostStories = canPostStories - CanEditStories = canEditStories - CanDeleteStories = canDeleteStories CanManageTopics = canManageTopics CanManageVoiceChats = canManageVoiceChats } @@ -3219,7 +3263,7 @@ and [] ChatBoostUpdated = /// Chat which was boosted [] Chat: Chat - /// Infomation about the chat boost + /// Information about the chat boost [] Boost: ChatBoost }