diff --git a/README.md b/README.md index 5d6dc9f..e32a5e4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![.NET Core](https://github.com/Dolfik1/Funogram/workflows/.NET/badge.svg) [![NuGet](https://img.shields.io/nuget/v/Funogram.svg)](https://www.nuget.org/packages/Funogram/) [![NuGet](https://img.shields.io/nuget/v/Funogram.Telegram.svg)](https://www.nuget.org/packages/Funogram.Telegram/) -[![NuGet](https://img.shields.io/badge/Bot%20API-7.2-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/) +[![NuGet](https://img.shields.io/badge/Bot%20API-7.3-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/) Funogram Logo diff --git a/src/Funogram.Generator/out/methods.json b/src/Funogram.Generator/out/methods.json index 22d1df4..9dd9ba4 100644 --- a/src/Funogram.Generator/out/methods.json +++ b/src/Funogram.Generator/out/methods.json @@ -242,7 +242,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -453,7 +453,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -623,7 +623,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -752,7 +752,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -865,7 +865,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1010,7 +1010,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1147,7 +1147,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1159,7 +1159,7 @@ { "OriginalName": "sendVoice", "ConvertedName": "SendVoice", - "Description": "Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.", + "Description": "Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.", "Fields": [ { "OriginalName": "business_connection_id", @@ -1252,7 +1252,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1349,7 +1349,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1479,7 +1479,7 @@ { "OriginalName": "live_period", "ConvertedName": "LivePeriod", - "Description": "Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.", + "Description": "Period in seconds during which the location will be updated (see Live Locations, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -1527,7 +1527,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1656,7 +1656,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1753,7 +1753,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1799,12 +1799,28 @@ "ConvertedFieldType": "string", "Optional": false }, + { + "OriginalName": "question_parse_mode", + "ConvertedName": "QuestionParseMode", + "Description": "Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "question_entities", + "ConvertedName": "QuestionEntities", + "Description": "A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of question_parse_mode", + "OriginalFieldType": "Array of MessageEntity", + "ConvertedFieldType": "MessageEntity[]", + "Optional": true + }, { "OriginalName": "options", "ConvertedName": "Options", - "Description": "A JSON-serialized list of answer options, 2-10 strings 1-100 characters each", - "OriginalFieldType": "Array of String", - "ConvertedFieldType": "string[]", + "Description": "A JSON-serialized list of 2-10 answer options", + "OriginalFieldType": "Array of InputPollOption", + "ConvertedFieldType": "InputPollOption[]", "Optional": false }, { @@ -1858,7 +1874,7 @@ { "OriginalName": "explanation_entities", "ConvertedName": "ExplanationEntities", - "Description": "A JSON-serialized list of special entities that appear in the poll explanation, which can be specified instead of parse_mode", + "Description": "A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of explanation_parse_mode", "OriginalFieldType": "Array of MessageEntity", "ConvertedFieldType": "MessageEntity[]", "Optional": true @@ -1914,7 +1930,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -1987,7 +2003,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -2347,7 +2363,7 @@ { "OriginalName": "can_edit_stories", "ConvertedName": "CanEditStories", - "Description": "Pass True if the administrator can edit stories posted by other users", + "Description": "Pass True if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat\u0027s story archive", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -2897,7 +2913,7 @@ { "OriginalName": "getChat", "ConvertedName": "GetChat", - "Description": "Use this method to get up to date information about the chat. Returns a Chat object on success.", + "Description": "Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success.", "Fields": [ { "OriginalName": "chat_id", @@ -2908,8 +2924,8 @@ "Optional": false } ], - "OriginalReturnType": "Chat", - "ConvertedReturnType": "Chat" + "OriginalReturnType": "ChatFullInfo", + "ConvertedReturnType": "ChatFullInfo" }, { "OriginalName": "getChatAdministrators", @@ -3928,6 +3944,14 @@ "ConvertedFieldType": "float", "Optional": false }, + { + "OriginalName": "live_period", + "ConvertedName": "LivePeriod", + "Description": "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, { "OriginalName": "horizontal_accuracy", "ConvertedName": "HorizontalAccuracy", @@ -4201,7 +4225,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. Not supported for messages sent on behalf of a business account.", + "Description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user", "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "ConvertedFieldType": "Markup", "Optional": true @@ -5272,7 +5296,7 @@ { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", - "Description": "A JSON-serialized object for an inline keyboard. If empty, one \u0027Play game_title\u0027 button will be shown. If not empty, the first button must launch the game. Not supported for messages sent on behalf of a business account.", + "Description": "A JSON-serialized object for an inline keyboard. If empty, one \u0027Play game_title\u0027 button will be shown. If not empty, the first button must launch the game.", "OriginalFieldType": "InlineKeyboardMarkup", "ConvertedFieldType": "InlineKeyboardMarkup", "Optional": true diff --git a/src/Funogram.Generator/out/types.json b/src/Funogram.Generator/out/types.json index 09f5672..ce1550e 100644 --- a/src/Funogram.Generator/out/types.json +++ b/src/Funogram.Generator/out/types.json @@ -57,7 +57,7 @@ { "OriginalName": "business_message", "ConvertedName": "BusinessMessage", - "Description": "New non-service message from a connected business account", + "Description": "New message from a connected business account", "OriginalFieldType": "Message", "ConvertedFieldType": "Message", "Optional": true @@ -402,7 +402,7 @@ { "OriginalName": "type", "ConvertedName": "Type", - "Description": "Type of chat, can be either \u201Cprivate\u201D, \u201Cgroup\u201D, \u201Csupergroup\u201D or \u201Cchannel\u201D", + "Description": "Type of the chat, can be either \u201Cprivate\u201D, \u201Cgroup\u201D, \u201Csupergroup\u201D or \u201Cchannel\u201D", "OriginalFieldType": "String", "ConvertedFieldType": "ChatType", "Optional": false @@ -446,11 +446,94 @@ "OriginalFieldType": "True", "ConvertedFieldType": "bool", "Optional": true + } + ] + ] + } + }, + { + "Name": "ChatFullInfo", + "Description": "This object contains full information about a chat.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "id", + "ConvertedName": "Id", + "Description": "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.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the chat, can be either \u201Cprivate\u201D, \u201Cgroup\u201D, \u201Csupergroup\u201D or \u201Cchannel\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "title", + "ConvertedName": "Title", + "Description": "Title, for supergroups, channels and group chats", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "username", + "ConvertedName": "Username", + "Description": "Username, for private chats, supergroups and channels if available", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "first_name", + "ConvertedName": "FirstName", + "Description": "First name of the other party in a private chat", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "last_name", + "ConvertedName": "LastName", + "Description": "Last name of the other party in a private chat", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "is_forum", + "ConvertedName": "IsForum", + "Description": "True, if the supergroup chat is a forum (has topics enabled)", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "accent_color_id", + "ConvertedName": "AccentColorId", + "Description": "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "max_reaction_count", + "ConvertedName": "MaxReactionCount", + "Description": "The maximum number of reactions that can be set on a message in the chat", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false }, { "OriginalName": "photo", "ConvertedName": "Photo", - "Description": "Chat photo. Returned only in getChat.", + "Description": "Chat photo", "OriginalFieldType": "ChatPhoto", "ConvertedFieldType": "ChatPhoto", "Optional": true @@ -458,7 +541,7 @@ { "OriginalName": "active_usernames", "ConvertedName": "ActiveUsernames", - "Description": "If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.", + "Description": "If non-empty, the list of all active chat usernames; for private chats, supergroups and channels", "OriginalFieldType": "Array of String", "ConvertedFieldType": "string[]", "Optional": true @@ -466,7 +549,7 @@ { "OriginalName": "birthdate", "ConvertedName": "Birthdate", - "Description": "For private chats, the date of birth of the user. Returned only in getChat.", + "Description": "For private chats, the date of birth of the user", "OriginalFieldType": "Birthdate", "ConvertedFieldType": "Birthdate", "Optional": true @@ -474,7 +557,7 @@ { "OriginalName": "business_intro", "ConvertedName": "BusinessIntro", - "Description": "For private chats with business accounts, the intro of the business. Returned only in getChat.", + "Description": "For private chats with business accounts, the intro of the business", "OriginalFieldType": "BusinessIntro", "ConvertedFieldType": "BusinessIntro", "Optional": true @@ -482,7 +565,7 @@ { "OriginalName": "business_location", "ConvertedName": "BusinessLocation", - "Description": "For private chats with business accounts, the location of the business. Returned only in getChat.", + "Description": "For private chats with business accounts, the location of the business", "OriginalFieldType": "BusinessLocation", "ConvertedFieldType": "BusinessLocation", "Optional": true @@ -490,7 +573,7 @@ { "OriginalName": "business_opening_hours", "ConvertedName": "BusinessOpeningHours", - "Description": "For private chats with business accounts, the opening hours of the business. Returned only in getChat.", + "Description": "For private chats with business accounts, the opening hours of the business", "OriginalFieldType": "BusinessOpeningHours", "ConvertedFieldType": "BusinessOpeningHours", "Optional": true @@ -498,7 +581,7 @@ { "OriginalName": "personal_chat", "ConvertedName": "PersonalChat", - "Description": "For private chats, the personal channel of the user. Returned only in getChat.", + "Description": "For private chats, the personal channel of the user", "OriginalFieldType": "Chat", "ConvertedFieldType": "Chat", "Optional": true @@ -506,23 +589,15 @@ { "OriginalName": "available_reactions", "ConvertedName": "AvailableReactions", - "Description": "List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat.", + "Description": "List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed.", "OriginalFieldType": "Array of ReactionType", "ConvertedFieldType": "ReactionType[]", "Optional": true }, - { - "OriginalName": "accent_color_id", - "ConvertedName": "AccentColorId", - "Description": "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. Returned only in getChat. Always returned in getChat.", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, { "OriginalName": "background_custom_emoji_id", "ConvertedName": "BackgroundCustomEmojiId", - "Description": "Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat.", + "Description": "Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -530,7 +605,7 @@ { "OriginalName": "profile_accent_color_id", "ConvertedName": "ProfileAccentColorId", - "Description": "Identifier of the accent color for the chat\u0027s profile background. See profile accent colors for more details. Returned only in getChat.", + "Description": "Identifier of the accent color for the chat\u0027s profile background. See profile accent colors for more details.", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -538,7 +613,7 @@ { "OriginalName": "profile_background_custom_emoji_id", "ConvertedName": "ProfileBackgroundCustomEmojiId", - "Description": "Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat.", + "Description": "Custom emoji identifier of the emoji chosen by the chat for its profile background", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -546,7 +621,7 @@ { "OriginalName": "emoji_status_custom_emoji_id", "ConvertedName": "EmojiStatusCustomEmojiId", - "Description": "Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in getChat.", + "Description": "Custom emoji identifier of the emoji status of the chat or the other party in a private chat", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -554,7 +629,7 @@ { "OriginalName": "emoji_status_expiration_date", "ConvertedName": "EmojiStatusExpirationDate", - "Description": "Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in getChat.", + "Description": "Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -562,7 +637,7 @@ { "OriginalName": "bio", "ConvertedName": "Bio", - "Description": "Bio of the other party in a private chat. Returned only in getChat.", + "Description": "Bio of the other party in a private chat", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -570,7 +645,7 @@ { "OriginalName": "has_private_forwards", "ConvertedName": "HasPrivateForwards", - "Description": "True, if privacy settings of the other party in the private chat allows to use tg://user?id=\u003Cuser_id\u003E links only in chats with the user. Returned only in getChat.", + "Description": "True, if privacy settings of the other party in the private chat allows to use tg://user?id=\u003Cuser_id\u003E links only in chats with the user", "OriginalFieldType": "True", "ConvertedFieldType": "bool", "Optional": true @@ -578,7 +653,7 @@ { "OriginalName": "has_restricted_voice_and_video_messages", "ConvertedName": "HasRestrictedVoiceAndVideoMessages", - "Description": "True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.", + "Description": "True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat", "OriginalFieldType": "True", "ConvertedFieldType": "bool", "Optional": true @@ -586,7 +661,7 @@ { "OriginalName": "join_to_send_messages", "ConvertedName": "JoinToSendMessages", - "Description": "True, if users need to join the supergroup before they can send messages. Returned only in getChat.", + "Description": "True, if users need to join the supergroup before they can send messages", "OriginalFieldType": "True", "ConvertedFieldType": "bool", "Optional": true @@ -594,7 +669,7 @@ { "OriginalName": "join_by_request", "ConvertedName": "JoinByRequest", - "Description": "True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.", + "Description": "True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators", "OriginalFieldType": "True", "ConvertedFieldType": "bool", "Optional": true @@ -602,7 +677,7 @@ { "OriginalName": "description", "ConvertedName": "Description", - "Description": "Description, for groups, supergroups and channel chats. Returned only in getChat.", + "Description": "Description, for groups, supergroups and channel chats", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -610,7 +685,7 @@ { "OriginalName": "invite_link", "ConvertedName": "InviteLink", - "Description": "Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.", + "Description": "Primary invite link, for groups, supergroups and channel chats", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -618,7 +693,7 @@ { "OriginalName": "pinned_message", "ConvertedName": "PinnedMessage", - "Description": "The most recent pinned message (by sending date). Returned only in getChat.", + "Description": "The most recent pinned message (by sending date)", "OriginalFieldType": "Message", "ConvertedFieldType": "Message", "Optional": true @@ -626,7 +701,7 @@ { "OriginalName": "permissions", "ConvertedName": "Permissions", - "Description": "Default chat member permissions, for groups and supergroups. Returned only in getChat.", + "Description": "Default chat member permissions, for groups and supergroups", "OriginalFieldType": "ChatPermissions", "ConvertedFieldType": "ChatPermissions", "Optional": true @@ -634,7 +709,7 @@ { "OriginalName": "slow_mode_delay", "ConvertedName": "SlowModeDelay", - "Description": "For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in getChat.", + "Description": "For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -642,7 +717,7 @@ { "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.", + "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", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -650,7 +725,7 @@ { "OriginalName": "message_auto_delete_time", "ConvertedName": "MessageAutoDeleteTime", - "Description": "The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.", + "Description": "The time after which all messages sent to the chat will be automatically deleted; in seconds", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -658,7 +733,7 @@ { "OriginalName": "has_aggressive_anti_spam_enabled", "ConvertedName": "HasAggressiveAntiSpamEnabled", - "Description": "True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat.", + "Description": "True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.", "OriginalFieldType": "True", "ConvertedFieldType": "bool", "Optional": true @@ -666,7 +741,7 @@ { "OriginalName": "has_hidden_members", "ConvertedName": "HasHiddenMembers", - "Description": "True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat.", + "Description": "True, if non-administrators can only get the list of bots and administrators in the chat", "OriginalFieldType": "True", "ConvertedFieldType": "bool", "Optional": true @@ -674,7 +749,7 @@ { "OriginalName": "has_protected_content", "ConvertedName": "HasProtectedContent", - "Description": "True, if messages from the chat can\u0027t be forwarded to other chats. Returned only in getChat.", + "Description": "True, if messages from the chat can\u0027t be forwarded to other chats", "OriginalFieldType": "True", "ConvertedFieldType": "bool", "Optional": true @@ -682,7 +757,7 @@ { "OriginalName": "has_visible_history", "ConvertedName": "HasVisibleHistory", - "Description": "True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat.", + "Description": "True, if new chat members will have access to old messages; available only to chat administrators", "OriginalFieldType": "True", "ConvertedFieldType": "bool", "Optional": true @@ -690,7 +765,7 @@ { "OriginalName": "sticker_set_name", "ConvertedName": "StickerSetName", - "Description": "For supergroups, name of group sticker set. Returned only in getChat.", + "Description": "For supergroups, name of the group sticker set", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -698,7 +773,7 @@ { "OriginalName": "can_set_sticker_set", "ConvertedName": "CanSetStickerSet", - "Description": "True, if the bot can change the group sticker set. Returned only in getChat.", + "Description": "True, if the bot can change the group sticker set", "OriginalFieldType": "True", "ConvertedFieldType": "bool", "Optional": true @@ -706,7 +781,7 @@ { "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.", + "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.", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -714,7 +789,7 @@ { "OriginalName": "linked_chat_id", "ConvertedName": "LinkedChatId", - "Description": "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.", + "Description": "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.", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -722,7 +797,7 @@ { "OriginalName": "location", "ConvertedName": "Location", - "Description": "For supergroups, the location to which the supergroup is connected. Returned only in getChat.", + "Description": "For supergroups, the location to which the supergroup is connected", "OriginalFieldType": "ChatLocation", "ConvertedFieldType": "ChatLocation", "Optional": true @@ -1250,6 +1325,14 @@ "ConvertedFieldType": "ChatBoostAdded", "Optional": true }, + { + "OriginalName": "chat_background_set", + "ConvertedName": "ChatBackgroundSet", + "Description": "Service message: chat background set", + "OriginalFieldType": "ChatBackground", + "ConvertedFieldType": "ChatBackground", + "Optional": true + }, { "OriginalName": "forum_topic_created", "ConvertedName": "ForumTopicCreated", @@ -2607,6 +2690,14 @@ "ConvertedFieldType": "string", "Optional": false }, + { + "OriginalName": "text_entities", + "ConvertedName": "TextEntities", + "Description": "Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts", + "OriginalFieldType": "Array of MessageEntity", + "ConvertedFieldType": "MessageEntity[]", + "Optional": true + }, { "OriginalName": "voter_count", "ConvertedName": "VoterCount", @@ -2619,6 +2710,41 @@ ] } }, + { + "Name": "InputPollOption", + "Description": "This object contains information about one answer option in a poll to send.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "text", + "ConvertedName": "Text", + "Description": "Option text, 1-100 characters", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "text_parse_mode", + "ConvertedName": "TextParseMode", + "Description": "Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "text_entities", + "ConvertedName": "TextEntities", + "Description": "A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode", + "OriginalFieldType": "Array of MessageEntity", + "ConvertedFieldType": "MessageEntity[]", + "Optional": true + } + ] + ] + } + }, { "Name": "PollAnswer", "Description": "This object represents an answer of a user in a non-anonymous poll.", @@ -2685,6 +2811,14 @@ "ConvertedFieldType": "string", "Optional": false }, + { + "OriginalName": "question_entities", + "ConvertedName": "QuestionEntities", + "Description": "Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions", + "OriginalFieldType": "Array of MessageEntity", + "ConvertedFieldType": "MessageEntity[]", + "Optional": true + }, { "OriginalName": "options", "ConvertedName": "Options", @@ -3003,6 +3137,344 @@ ] } }, + { + "Name": "BackgroundFill", + "Description": "This object describes the way a background is filled based on the selected colors. Currently, it can be one of", + "Kind": { + "Case": "Cases", + "Fields": [ + [ + { + "Name": "Solid", + "CaseType": "BackgroundFillSolid" + }, + { + "Name": "Gradient", + "CaseType": "BackgroundFillGradient" + }, + { + "Name": "FreeformGradient", + "CaseType": "BackgroundFillFreeformGradient" + } + ] + ] + } + }, + { + "Name": "BackgroundFillSolid", + "Description": "The background is filled using the selected color.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the background fill, always \u201Csolid\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "color", + "ConvertedName": "Color", + "Description": "The color of the background fill in the RGB24 format", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + } + ] + ] + } + }, + { + "Name": "BackgroundFillGradient", + "Description": "The background is a gradient fill.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the background fill, always \u201Cgradient\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "top_color", + "ConvertedName": "TopColor", + "Description": "Top color of the gradient in the RGB24 format", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "bottom_color", + "ConvertedName": "BottomColor", + "Description": "Bottom color of the gradient in the RGB24 format", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "rotation_angle", + "ConvertedName": "RotationAngle", + "Description": "Clockwise rotation angle of the background fill in degrees; 0-359", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + } + ] + ] + } + }, + { + "Name": "BackgroundFillFreeformGradient", + "Description": "The background is a freeform gradient that rotates after every message in the chat.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the background fill, always \u201Cfreeform_gradient\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "colors", + "ConvertedName": "Colors", + "Description": "A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format", + "OriginalFieldType": "Array of Integer", + "ConvertedFieldType": "int64[]", + "Optional": false + } + ] + ] + } + }, + { + "Name": "BackgroundType", + "Description": "This object describes the type of a background. Currently, it can be one of", + "Kind": { + "Case": "Cases", + "Fields": [ + [ + { + "Name": "Fill", + "CaseType": "BackgroundTypeFill" + }, + { + "Name": "Wallpaper", + "CaseType": "BackgroundTypeWallpaper" + }, + { + "Name": "Pattern", + "CaseType": "BackgroundTypePattern" + }, + { + "Name": "ChatTheme", + "CaseType": "BackgroundTypeChatTheme" + } + ] + ] + } + }, + { + "Name": "BackgroundTypeFill", + "Description": "The background is automatically filled based on the selected colors.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the background, always \u201Cfill\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "fill", + "ConvertedName": "Fill", + "Description": "The background fill", + "OriginalFieldType": "BackgroundFill", + "ConvertedFieldType": "BackgroundFill", + "Optional": false + }, + { + "OriginalName": "dark_theme_dimming", + "ConvertedName": "DarkThemeDimming", + "Description": "Dimming of the background in dark themes, as a percentage; 0-100", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + } + ] + ] + } + }, + { + "Name": "BackgroundTypeWallpaper", + "Description": "The background is a wallpaper in the JPEG format.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the background, always \u201Cwallpaper\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "document", + "ConvertedName": "Document", + "Description": "Document with the wallpaper", + "OriginalFieldType": "Document", + "ConvertedFieldType": "Document", + "Optional": false + }, + { + "OriginalName": "dark_theme_dimming", + "ConvertedName": "DarkThemeDimming", + "Description": "Dimming of the background in dark themes, as a percentage; 0-100", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "is_blurred", + "ConvertedName": "IsBlurred", + "Description": "True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "is_moving", + "ConvertedName": "IsMoving", + "Description": "True, if the background moves slightly when the device is tilted", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + } + ] + ] + } + }, + { + "Name": "BackgroundTypePattern", + "Description": "The background is a PNG or TGV (gzipped subset of SVG with MIME type \u201Capplication/x-tgwallpattern\u201D) pattern to be combined with the background fill chosen by the user.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the background, always \u201Cpattern\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "document", + "ConvertedName": "Document", + "Description": "Document with the pattern", + "OriginalFieldType": "Document", + "ConvertedFieldType": "Document", + "Optional": false + }, + { + "OriginalName": "fill", + "ConvertedName": "Fill", + "Description": "The background fill that is combined with the pattern", + "OriginalFieldType": "BackgroundFill", + "ConvertedFieldType": "BackgroundFill", + "Optional": false + }, + { + "OriginalName": "intensity", + "ConvertedName": "Intensity", + "Description": "Intensity of the pattern when it is shown above the filled background; 0-100", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "is_inverted", + "ConvertedName": "IsInverted", + "Description": "True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "is_moving", + "ConvertedName": "IsMoving", + "Description": "True, if the background moves slightly when the device is tilted", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + } + ] + ] + } + }, + { + "Name": "BackgroundTypeChatTheme", + "Description": "The background is taken directly from a built-in chat theme.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the background, always \u201Cchat_theme\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "theme_name", + "ConvertedName": "ThemeName", + "Description": "Name of the chat theme, which is usually an emoji", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ] + ] + } + }, + { + "Name": "ChatBackground", + "Description": "This object represents a chat background.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the background", + "OriginalFieldType": "BackgroundType", + "ConvertedFieldType": "BackgroundType", + "Optional": false + } + ] + ] + } + }, { "Name": "ForumTopicCreated", "Description": "This object represents a service message about a new forum topic created in the chat.", @@ -3095,7 +3567,7 @@ }, { "Name": "SharedUser", - "Description": "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button.", + "Description": "This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.", "Kind": { "Case": "Fields", "Fields": [ @@ -3679,7 +4151,7 @@ }, { "Name": "ReplyKeyboardMarkup", - "Description": "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).", + "Description": "This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account.", "Kind": { "Case": "Fields", "Fields": [ @@ -3845,7 +4317,7 @@ { "OriginalName": "request_name", "ConvertedName": "RequestName", - "Description": "Pass True to request the users\u0027 first and last name", + "Description": "Pass True to request the users\u0027 first and last names", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -3853,7 +4325,7 @@ { "OriginalName": "request_username", "ConvertedName": "RequestUsername", - "Description": "Pass True to request the users\u0027 username", + "Description": "Pass True to request the users\u0027 usernames", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -3861,7 +4333,7 @@ { "OriginalName": "request_photo", "ConvertedName": "RequestPhoto", - "Description": "Pass True to request the users\u0027 photo", + "Description": "Pass True to request the users\u0027 photos", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -3872,7 +4344,7 @@ }, { "Name": "KeyboardButtonRequestChat", - "Description": "This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the \u0441hat if appropriate More about requesting chats \u00BB", + "Description": "This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. More about requesting chats \u00BB.", "Kind": { "Case": "Fields", "Fields": [ @@ -3990,7 +4462,7 @@ }, { "Name": "ReplyKeyboardRemove", - "Description": "Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).", + "Description": "Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account.", "Kind": { "Case": "Fields", "Fields": [ @@ -4060,7 +4532,7 @@ { "OriginalName": "callback_data", "ConvertedName": "CallbackData", - "Description": "Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes", + "Description": "Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account.", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -4068,7 +4540,7 @@ { "OriginalName": "web_app", "ConvertedName": "WebApp", - "Description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.", + "Description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account.", "OriginalFieldType": "WebAppInfo", "ConvertedFieldType": "WebAppInfo", "Optional": true @@ -4084,7 +4556,7 @@ { "OriginalName": "switch_inline_query", "ConvertedName": "SwitchInlineQuery", - "Description": "If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot\u0027s username and the specified inline query in the input field. May be empty, in which case just the bot\u0027s username will be inserted.", + "Description": "If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot\u0027s username and the specified inline query in the input field. May be empty, in which case just the bot\u0027s username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -4092,7 +4564,7 @@ { "OriginalName": "switch_inline_query_current_chat", "ConvertedName": "SwitchInlineQueryCurrentChat", - "Description": "If set, pressing the button will insert the bot\u0027s username and the specified inline query in the current chat\u0027s input field. May be empty, in which case only the bot\u0027s username will be inserted.\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options.", + "Description": "If set, pressing the button will insert the bot\u0027s username and the specified inline query in the current chat\u0027s input field. May be empty, in which case only the bot\u0027s username will be inserted.\n\nThis offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account.", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -4100,7 +4572,7 @@ { "OriginalName": "switch_inline_query_chosen_chat", "ConvertedName": "SwitchInlineQueryChosenChat", - "Description": "If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot\u0027s username and the specified inline query in the input field", + "Description": "If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot\u0027s username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.", "OriginalFieldType": "SwitchInlineQueryChosenChat", "ConvertedFieldType": "SwitchInlineQueryChosenChat", "Optional": true @@ -4288,7 +4760,7 @@ }, { "Name": "ForceReply", - "Description": "Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot\u0027s message and tapped \u0027Reply\u0027). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.", + "Description": "Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot\u0027s message and tapped \u0027Reply\u0027). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a Telegram Business account.", "Kind": { "Case": "Fields", "Fields": [ @@ -4529,7 +5001,7 @@ { "OriginalName": "can_edit_stories", "ConvertedName": "CanEditStories", - "Description": "True, if the administrator can edit stories posted by other users", + "Description": "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat\u0027s story archive", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": false @@ -4641,6 +5113,14 @@ "ConvertedFieldType": "ChatInviteLink", "Optional": true }, + { + "OriginalName": "via_join_request", + "ConvertedName": "ViaJoinRequest", + "Description": "True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "via_chat_folder_invite_link", "ConvertedName": "ViaChatFolderInviteLink", @@ -4837,7 +5317,7 @@ { "OriginalName": "can_edit_stories", "ConvertedName": "CanEditStories", - "Description": "True, if the administrator can edit stories posted by other users", + "Description": "True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat\u0027s story archive", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": false @@ -5330,7 +5810,7 @@ }, { "Name": "Birthdate", - "Description": "", + "Description": "Describes the birthdate of a user.", "Kind": { "Case": "Fields", "Fields": [ @@ -5365,7 +5845,7 @@ }, { "Name": "BusinessIntro", - "Description": "", + "Description": "Contains information about the start page settings of a Telegram Business account.", "Kind": { "Case": "Fields", "Fields": [ @@ -5400,7 +5880,7 @@ }, { "Name": "BusinessLocation", - "Description": "", + "Description": "Contains information about the location of a Telegram Business account.", "Kind": { "Case": "Fields", "Fields": [ @@ -5427,7 +5907,7 @@ }, { "Name": "BusinessOpeningHoursInterval", - "Description": "", + "Description": "Describes an interval of time during which a business is open.", "Kind": { "Case": "Fields", "Fields": [ @@ -5454,7 +5934,7 @@ }, { "Name": "BusinessOpeningHours", - "Description": "", + "Description": "Describes the opening hours of a business.", "Kind": { "Case": "Fields", "Fields": [ @@ -6480,7 +6960,7 @@ { "OriginalName": "message_ids", "ConvertedName": "MessageIds", - "Description": "A JSON-serialized list of identifiers of deleted messages in the chat of the business account", + "Description": "The list of identifiers of deleted messages in the chat of the business account", "OriginalFieldType": "Array of Integer", "ConvertedFieldType": "int64[]", "Optional": false @@ -8376,7 +8856,7 @@ { "OriginalName": "live_period", "ConvertedName": "LivePeriod", - "Description": "Period in seconds for which the location can be updated, should be between 60 and 86400.", + "Description": "Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -9470,7 +9950,7 @@ { "OriginalName": "live_period", "ConvertedName": "LivePeriod", - "Description": "Period in seconds for which the location can be updated, should be between 60 and 86400.", + "Description": "Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true diff --git a/src/Funogram.Telegram/Directory.Build.props b/src/Funogram.Telegram/Directory.Build.props index 13e3b8a..4e03b45 100644 --- a/src/Funogram.Telegram/Directory.Build.props +++ b/src/Funogram.Telegram/Directory.Build.props @@ -1,6 +1,6 @@ - 7.2.0.1 + 7.3.0.0 Nikolay Matyushin Funogram.Telegram Funogram.Telegram diff --git a/src/Funogram.Telegram/RequestsTypes.fs b/src/Funogram.Telegram/RequestsTypes.fs index 42fd0f4..ad66932 100644 --- a/src/Funogram.Telegram/RequestsTypes.fs +++ b/src/Funogram.Telegram/RequestsTypes.fs @@ -656,7 +656,9 @@ type SendPoll = ChatId: ChatId MessageThreadId: int64 option Question: string - Options: string[] + QuestionParseMode: string option + QuestionEntities: MessageEntity[] option + Options: InputPollOption[] IsAnonymous: bool option Type: string option AllowsMultipleAnswers: bool option @@ -672,12 +674,14 @@ type SendPoll = ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, question: string, options: string[], ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, question: string, options: InputPollOption[], ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanationParseMode: string, ?correctOptionId: int64, ?replyParameters: ReplyParameters, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?questionEntities: MessageEntity[], ?questionParseMode: string, ?messageThreadId: int64, ?explanation: string, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId MessageThreadId = messageThreadId Question = question + QuestionParseMode = questionParseMode + QuestionEntities = questionEntities Options = options IsAnonymous = isAnonymous Type = ``type`` @@ -694,10 +698,10 @@ type SendPoll = ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, question: string, options: string[], ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = - SendPoll.Make(ChatId.Int chatId, question, options, ?businessConnectionId = businessConnectionId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanation = explanation, ?replyParameters = replyParameters, ?correctOptionId = correctOptionId, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?messageThreadId = messageThreadId, ?explanationParseMode = explanationParseMode, ?replyMarkup = replyMarkup) - static member Make(chatId: string, question: string, options: string[], ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = - SendPoll.Make(ChatId.String chatId, question, options, ?businessConnectionId = businessConnectionId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanation = explanation, ?replyParameters = replyParameters, ?correctOptionId = correctOptionId, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?messageThreadId = messageThreadId, ?explanationParseMode = explanationParseMode, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, question: string, options: InputPollOption[], ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanationParseMode: string, ?correctOptionId: int64, ?replyParameters: ReplyParameters, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?questionEntities: MessageEntity[], ?questionParseMode: string, ?messageThreadId: int64, ?explanation: string, ?replyMarkup: Markup) = + SendPoll.Make(ChatId.Int chatId, question, options, ?businessConnectionId = businessConnectionId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanationParseMode = explanationParseMode, ?correctOptionId = correctOptionId, ?replyParameters = replyParameters, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?questionEntities = questionEntities, ?questionParseMode = questionParseMode, ?messageThreadId = messageThreadId, ?explanation = explanation, ?replyMarkup = replyMarkup) + static member Make(chatId: string, question: string, options: InputPollOption[], ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanationParseMode: string, ?correctOptionId: int64, ?replyParameters: ReplyParameters, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?questionEntities: MessageEntity[], ?questionParseMode: string, ?messageThreadId: int64, ?explanation: string, ?replyMarkup: Markup) = + SendPoll.Make(ChatId.String chatId, question, options, ?businessConnectionId = businessConnectionId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanationParseMode = explanationParseMode, ?correctOptionId = correctOptionId, ?replyParameters = replyParameters, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?questionEntities = questionEntities, ?questionParseMode = questionParseMode, ?messageThreadId = messageThreadId, ?explanation = explanation, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendPoll" @@ -1238,7 +1242,7 @@ type GetChat = GetChat.Make(ChatId.Int chatId) static member Make(chatId: string) = GetChat.Make(ChatId.String chatId) - interface IRequestBase with + interface IRequestBase with member _.MethodName = "getChat" type GetChatAdministrators = @@ -1813,18 +1817,20 @@ type EditMessageLiveLocation = InlineMessageId: string option Latitude: float Longitude: float + LivePeriod: int64 option HorizontalAccuracy: float option Heading: int64 option ProximityAlertRadius: int64 option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(latitude: float, longitude: float, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?horizontalAccuracy: float, ?heading: int64, ?proximityAlertRadius: int64, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(latitude: float, longitude: float, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?livePeriod: int64, ?horizontalAccuracy: float, ?heading: int64, ?proximityAlertRadius: int64, ?replyMarkup: InlineKeyboardMarkup) = { ChatId = chatId MessageId = messageId InlineMessageId = inlineMessageId Latitude = latitude Longitude = longitude + LivePeriod = livePeriod HorizontalAccuracy = horizontalAccuracy Heading = heading ProximityAlertRadius = proximityAlertRadius diff --git a/src/Funogram.Telegram/Types.fs b/src/Funogram.Telegram/Types.fs index 7936922..4bfd82d 100644 --- a/src/Funogram.Telegram/Types.fs +++ b/src/Funogram.Telegram/Types.fs @@ -95,7 +95,7 @@ and [] Update = /// The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot [] BusinessConnection: BusinessConnection option - /// New non-service message from a connected business account + /// New message from a connected business account [] BusinessMessage: Message option /// New version of a message from a connected business account @@ -282,7 +282,7 @@ and [] Chat = /// 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. [] Id: int64 - /// Type of chat, can be either “private”, “group”, “supergroup” or “channel” + /// Type of the chat, can be either “private”, “group”, “supergroup” or “channel” [] Type: ChatType /// Title, for supergroups, channels and group chats @@ -300,117 +300,157 @@ and [] Chat = /// True, if the supergroup chat is a forum (has topics enabled) [] IsForum: bool option - /// Chat photo. Returned only in getChat. + } + static member Create(id: int64, ``type``: ChatType, ?title: string, ?username: string, ?firstName: string, ?lastName: string, ?isForum: bool) = + { + Id = id + Type = ``type`` + Title = title + Username = username + FirstName = firstName + LastName = lastName + IsForum = isForum + } + +/// This object contains full information about a chat. +and [] ChatFullInfo = + { + /// 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. + [] + Id: int64 + /// Type of the chat, can be either “private”, “group”, “supergroup” or “channel” + [] + Type: string + /// Title, for supergroups, channels and group chats + [] + Title: string option + /// Username, for private chats, supergroups and channels if available + [] + Username: string option + /// First name of the other party in a private chat + [] + FirstName: string option + /// Last name of the other party in a private chat + [] + LastName: string option + /// True, if the supergroup chat is a forum (has topics enabled) + [] + IsForum: bool option + /// Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. + [] + AccentColorId: int64 + /// The maximum number of reactions that can be set on a message in the chat + [] + MaxReactionCount: int64 + /// Chat photo [] Photo: ChatPhoto option - /// If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat. + /// If non-empty, the list of all active chat usernames; for private chats, supergroups and channels [] ActiveUsernames: string[] option - /// For private chats, the date of birth of the user. Returned only in getChat. + /// For private chats, the date of birth of the user [] Birthdate: Birthdate option - /// For private chats with business accounts, the intro of the business. Returned only in getChat. + /// For private chats with business accounts, the intro of the business [] BusinessIntro: BusinessIntro option - /// For private chats with business accounts, the location of the business. Returned only in getChat. + /// For private chats with business accounts, the location of the business [] BusinessLocation: BusinessLocation option - /// For private chats with business accounts, the opening hours of the business. Returned only in getChat. + /// For private chats with business accounts, the opening hours of the business [] BusinessOpeningHours: BusinessOpeningHours option - /// For private chats, the personal channel of the user. Returned only in getChat. + /// For private chats, the personal channel of the user [] PersonalChat: Chat option - /// List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat. + /// List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. [] AvailableReactions: ReactionType[] option - /// Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. Returned only in getChat. Always returned in getChat. - [] - AccentColorId: int64 option - /// Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat. + /// Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background [] BackgroundCustomEmojiId: string option - /// Identifier of the accent color for the chat's profile background. See profile accent colors for more details. Returned only in getChat. + /// Identifier of the accent color for the chat's profile background. See profile accent colors for more details. [] ProfileAccentColorId: int64 option - /// Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat. + /// Custom emoji identifier of the emoji chosen by the chat for its profile background [] ProfileBackgroundCustomEmojiId: string option - /// Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in getChat. + /// Custom emoji identifier of the emoji status of the chat or the other party in a private chat [] EmojiStatusCustomEmojiId: string option - /// Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in getChat. + /// Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any [] EmojiStatusExpirationDate: int64 option - /// Bio of the other party in a private chat. Returned only in getChat. + /// Bio of the other party in a private chat [] Bio: string option - /// True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. Returned only in getChat. + /// True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user [] HasPrivateForwards: bool option - /// True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat. + /// True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat [] HasRestrictedVoiceAndVideoMessages: bool option - /// True, if users need to join the supergroup before they can send messages. Returned only in getChat. + /// True, if users need to join the supergroup before they can send messages [] JoinToSendMessages: bool option - /// True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat. + /// True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators [] JoinByRequest: bool option - /// Description, for groups, supergroups and channel chats. Returned only in getChat. + /// Description, for groups, supergroups and channel chats [] Description: string option - /// Primary invite link, for groups, supergroups and channel chats. Returned only in getChat. + /// Primary invite link, for groups, supergroups and channel chats [] InviteLink: string option - /// The most recent pinned message (by sending date). Returned only in getChat. + /// The most recent pinned message (by sending date) [] PinnedMessage: Message option - /// Default chat member permissions, for groups and supergroups. Returned only in getChat. + /// Default chat member permissions, for groups and supergroups [] Permissions: ChatPermissions option - /// For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in getChat. + /// For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds [] 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. + /// For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions [] UnrestrictBoostCount: int64 option - /// The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat. + /// The time after which all messages sent to the chat will be automatically deleted; in seconds [] MessageAutoDeleteTime: int64 option - /// True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat. + /// True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. [] HasAggressiveAntiSpamEnabled: bool option - /// True, if non-administrators can only get the list of bots and administrators in the chat. Returned only in getChat. + /// True, if non-administrators can only get the list of bots and administrators in the chat [] HasHiddenMembers: bool option - /// True, if messages from the chat can't be forwarded to other chats. Returned only in getChat. + /// True, if messages from the chat can't be forwarded to other chats [] HasProtectedContent: bool option - /// True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat. + /// True, if new chat members will have access to old messages; available only to chat administrators [] HasVisibleHistory: bool option - /// For supergroups, name of group sticker set. Returned only in getChat. + /// For supergroups, name of the group sticker set [] StickerSetName: string option - /// True, if the bot can change the group sticker set. Returned only in getChat. + /// True, if the bot can change the group sticker set [] 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. + /// 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. [] 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. + /// 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. [] LinkedChatId: int64 option - /// For supergroups, the location to which the supergroup is connected. Returned only in getChat. + /// For supergroups, the location to which the supergroup is connected [] Location: ChatLocation option } - static member Create(id: int64, ``type``: ChatType, ?hasRestrictedVoiceAndVideoMessages: bool, ?joinToSendMessages: bool, ?joinByRequest: bool, ?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, ?hasPrivateForwards: bool, ?bio: string, ?emojiStatusExpirationDate: int64, ?emojiStatusCustomEmojiId: string, ?title: string, ?username: string, ?firstName: string, ?lastName: string, ?isForum: bool, ?photo: ChatPhoto, ?activeUsernames: string[], ?birthdate: Birthdate, ?businessIntro: BusinessIntro, ?businessLocation: BusinessLocation, ?businessOpeningHours: BusinessOpeningHours, ?personalChat: Chat, ?availableReactions: ReactionType[], ?accentColorId: int64, ?backgroundCustomEmojiId: string, ?profileAccentColorId: int64, ?profileBackgroundCustomEmojiId: string, ?linkedChatId: int64, ?location: ChatLocation) = + static member Create(id: int64, ``type``: string, accentColorId: int64, maxReactionCount: int64, ?joinToSendMessages: bool, ?joinByRequest: bool, ?description: string, ?inviteLink: string, ?pinnedMessage: Message, ?permissions: ChatPermissions, ?slowModeDelay: int64, ?unrestrictBoostCount: int64, ?hasAggressiveAntiSpamEnabled: bool, ?hasRestrictedVoiceAndVideoMessages: bool, ?hasHiddenMembers: bool, ?hasProtectedContent: bool, ?hasVisibleHistory: bool, ?stickerSetName: string, ?canSetStickerSet: bool, ?customEmojiStickerSetName: string, ?messageAutoDeleteTime: int64, ?hasPrivateForwards: bool, ?emojiStatusExpirationDate: int64, ?linkedChatId: int64, ?title: string, ?username: string, ?firstName: string, ?lastName: string, ?isForum: bool, ?photo: ChatPhoto, ?activeUsernames: string[], ?birthdate: Birthdate, ?businessIntro: BusinessIntro, ?businessLocation: BusinessLocation, ?businessOpeningHours: BusinessOpeningHours, ?personalChat: Chat, ?availableReactions: ReactionType[], ?backgroundCustomEmojiId: string, ?profileAccentColorId: int64, ?profileBackgroundCustomEmojiId: string, ?emojiStatusCustomEmojiId: string, ?bio: string, ?location: ChatLocation) = { Id = id Type = ``type`` - HasRestrictedVoiceAndVideoMessages = hasRestrictedVoiceAndVideoMessages + AccentColorId = accentColorId + MaxReactionCount = maxReactionCount JoinToSendMessages = joinToSendMessages JoinByRequest = joinByRequest Description = description @@ -419,18 +459,18 @@ and [] Chat = Permissions = permissions SlowModeDelay = slowModeDelay UnrestrictBoostCount = unrestrictBoostCount - MessageAutoDeleteTime = messageAutoDeleteTime HasAggressiveAntiSpamEnabled = hasAggressiveAntiSpamEnabled + HasRestrictedVoiceAndVideoMessages = hasRestrictedVoiceAndVideoMessages HasHiddenMembers = hasHiddenMembers HasProtectedContent = hasProtectedContent HasVisibleHistory = hasVisibleHistory StickerSetName = stickerSetName CanSetStickerSet = canSetStickerSet CustomEmojiStickerSetName = customEmojiStickerSetName + MessageAutoDeleteTime = messageAutoDeleteTime HasPrivateForwards = hasPrivateForwards - Bio = bio EmojiStatusExpirationDate = emojiStatusExpirationDate - EmojiStatusCustomEmojiId = emojiStatusCustomEmojiId + LinkedChatId = linkedChatId Title = title Username = username FirstName = firstName @@ -444,11 +484,11 @@ and [] Chat = BusinessOpeningHours = businessOpeningHours PersonalChat = personalChat AvailableReactions = availableReactions - AccentColorId = accentColorId BackgroundCustomEmojiId = backgroundCustomEmojiId ProfileAccentColorId = profileAccentColorId ProfileBackgroundCustomEmojiId = profileBackgroundCustomEmojiId - LinkedChatId = linkedChatId + EmojiStatusCustomEmojiId = emojiStatusCustomEmojiId + Bio = bio Location = location } @@ -647,6 +687,9 @@ and [] Message = /// Service message: user boosted the chat [] BoostAdded: ChatBoostAdded option + /// Service message: chat background set + [] + ChatBackgroundSet: ChatBackground option /// Service message: forum topic created [] ForumTopicCreated: ForumTopicCreated option @@ -696,11 +739,12 @@ and [] Message = [] ReplyMarkup: InlineKeyboardMarkup option } - static member Create(messageId: int64, date: DateTime, chat: Chat, ?usersShared: UsersShared, ?successfulPayment: SuccessfulPayment, ?invoice: Invoice, ?pinnedMessage: MaybeInaccessibleMessage, ?migrateFromChatId: int64, ?migrateToChatId: int64, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?supergroupChatCreated: bool, ?chatShared: ChatShared, ?groupChatCreated: bool, ?deleteChatPhoto: bool, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?leftChatMember: User, ?newChatMembers: User[], ?channelChatCreated: bool, ?connectedWebsite: string, ?passportData: PassportData, ?location: Location, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?giveawayCompleted: GiveawayCompleted, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?writeAccessAllowed: WriteAccessAllowed, ?giveawayCreated: GiveawayCreated, ?generalForumTopicHidden: GeneralForumTopicHidden, ?forumTopicReopened: ForumTopicReopened, ?forumTopicClosed: ForumTopicClosed, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?boostAdded: ChatBoostAdded, ?proximityAlertTriggered: ProximityAlertTriggered, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?venue: Venue, ?game: Game, ?webAppData: WebAppData, ?hasProtectedContent: bool, ?editDate: int64, ?viaBot: User, ?replyToStory: Story, ?quote: TextQuote, ?externalReply: ExternalReplyInfo, ?replyToMessage: Message, ?isFromOffline: bool, ?isAutomaticForward: bool, ?forwardOrigin: MessageOrigin, ?businessConnectionId: string, ?senderBusinessBot: User, ?senderBoostCount: int64, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?isTopicMessage: bool, ?poll: Poll, ?mediaGroupId: string, ?text: string, ?dice: Dice, ?contact: Contact, ?hasMediaSpoiler: bool, ?captionEntities: MessageEntity[], ?caption: string, ?voice: Voice, ?videoNote: VideoNote, ?authorSignature: string, ?video: Video, ?sticker: Sticker, ?photo: PhotoSize[], ?document: Document, ?audio: Audio, ?animation: Animation, ?linkPreviewOptions: LinkPreviewOptions, ?entities: MessageEntity[], ?story: Story, ?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, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?channelChatCreated: bool, ?supergroupChatCreated: bool, ?groupChatCreated: bool, ?deleteChatPhoto: bool, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?leftChatMember: User, ?newChatMembers: User[], ?connectedWebsite: string, ?writeAccessAllowed: WriteAccessAllowed, ?passportData: PassportData, ?proximityAlertTriggered: ProximityAlertTriggered, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?giveawayCompleted: GiveawayCompleted, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?location: Location, ?giveawayCreated: GiveawayCreated, ?generalForumTopicHidden: GeneralForumTopicHidden, ?forumTopicReopened: ForumTopicReopened, ?forumTopicClosed: ForumTopicClosed, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?chatBackgroundSet: ChatBackground, ?boostAdded: ChatBoostAdded, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?venue: Venue, ?poll: Poll, ?game: Game, ?hasProtectedContent: bool, ?editDate: int64, ?viaBot: User, ?replyToStory: Story, ?quote: TextQuote, ?externalReply: ExternalReplyInfo, ?replyToMessage: Message, ?isFromOffline: bool, ?isAutomaticForward: bool, ?forwardOrigin: MessageOrigin, ?businessConnectionId: string, ?senderBusinessBot: User, ?senderBoostCount: int64, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?isTopicMessage: bool, ?webAppData: WebAppData, ?mediaGroupId: string, ?text: string, ?dice: Dice, ?contact: Contact, ?hasMediaSpoiler: bool, ?captionEntities: MessageEntity[], ?caption: string, ?voice: Voice, ?videoNote: VideoNote, ?authorSignature: string, ?video: Video, ?sticker: Sticker, ?photo: PhotoSize[], ?document: Document, ?audio: Audio, ?animation: Animation, ?linkPreviewOptions: LinkPreviewOptions, ?entities: MessageEntity[], ?story: Story, ?replyMarkup: InlineKeyboardMarkup) = { MessageId = messageId Date = date Chat = chat + ChatShared = chatShared UsersShared = usersShared SuccessfulPayment = successfulPayment Invoice = invoice @@ -708,18 +752,18 @@ and [] Message = MigrateFromChatId = migrateFromChatId MigrateToChatId = migrateToChatId MessageAutoDeleteTimerChanged = messageAutoDeleteTimerChanged + ChannelChatCreated = channelChatCreated SupergroupChatCreated = supergroupChatCreated - ChatShared = chatShared GroupChatCreated = groupChatCreated DeleteChatPhoto = deleteChatPhoto NewChatPhoto = newChatPhoto NewChatTitle = newChatTitle LeftChatMember = leftChatMember NewChatMembers = newChatMembers - ChannelChatCreated = channelChatCreated ConnectedWebsite = connectedWebsite + WriteAccessAllowed = writeAccessAllowed PassportData = passportData - Location = location + ProximityAlertTriggered = proximityAlertTriggered VideoChatParticipantsInvited = videoChatParticipantsInvited VideoChatEnded = videoChatEnded VideoChatStarted = videoChatStarted @@ -727,19 +771,19 @@ and [] Message = GiveawayCompleted = giveawayCompleted GiveawayWinners = giveawayWinners Giveaway = giveaway - WriteAccessAllowed = writeAccessAllowed + Location = location GiveawayCreated = giveawayCreated GeneralForumTopicHidden = generalForumTopicHidden ForumTopicReopened = forumTopicReopened ForumTopicClosed = forumTopicClosed ForumTopicEdited = forumTopicEdited ForumTopicCreated = forumTopicCreated + ChatBackgroundSet = chatBackgroundSet BoostAdded = boostAdded - ProximityAlertTriggered = proximityAlertTriggered GeneralForumTopicUnhidden = generalForumTopicUnhidden Venue = venue + Poll = poll Game = game - WebAppData = webAppData HasProtectedContent = hasProtectedContent EditDate = editDate ViaBot = viaBot @@ -757,7 +801,7 @@ and [] Message = From = from MessageThreadId = messageThreadId IsTopicMessage = isTopicMessage - Poll = poll + WebAppData = webAppData MediaGroupId = mediaGroupId Text = text Dice = dice @@ -1430,14 +1474,38 @@ and [] PollOption = /// Option text, 1-100 characters [] Text: string + /// Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts + [] + TextEntities: MessageEntity[] option /// Number of users that voted for this option [] VoterCount: int64 } - static member Create(text: string, voterCount: int64) = + static member Create(text: string, voterCount: int64, ?textEntities: MessageEntity[]) = { Text = text VoterCount = voterCount + TextEntities = textEntities + } + +/// This object contains information about one answer option in a poll to send. +and [] InputPollOption = + { + /// Option text, 1-100 characters + [] + Text: string + /// Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed + [] + TextParseMode: string option + /// A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode + [] + TextEntities: MessageEntity[] option + } + static member Create(text: string, ?textParseMode: string, ?textEntities: MessageEntity[]) = + { + Text = text + TextParseMode = textParseMode + TextEntities = textEntities } /// This object represents an answer of a user in a non-anonymous poll. @@ -1473,6 +1541,9 @@ and [] Poll = /// Poll question, 1-300 characters [] Question: string + /// Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions + [] + QuestionEntities: MessageEntity[] option /// List of poll options [] Options: PollOption[] @@ -1507,7 +1578,7 @@ and [] Poll = [] CloseDate: int64 option } - static member Create(id: string, question: string, options: PollOption[], totalVoterCount: int64, isClosed: bool, isAnonymous: bool, ``type``: string, allowsMultipleAnswers: bool, ?correctOptionId: int64, ?explanation: string, ?explanationEntities: MessageEntity[], ?openPeriod: int64, ?closeDate: int64) = + static member Create(id: string, question: string, options: PollOption[], totalVoterCount: int64, isClosed: bool, isAnonymous: bool, ``type``: string, allowsMultipleAnswers: bool, ?questionEntities: MessageEntity[], ?correctOptionId: int64, ?explanation: string, ?explanationEntities: MessageEntity[], ?openPeriod: int64, ?closeDate: int64) = { Id = id Question = question @@ -1517,6 +1588,7 @@ and [] Poll = IsAnonymous = isAnonymous Type = ``type`` AllowsMultipleAnswers = allowsMultipleAnswers + QuestionEntities = questionEntities CorrectOptionId = correctOptionId Explanation = explanation ExplanationEntities = explanationEntities @@ -1652,6 +1724,183 @@ and [] ChatBoostAdded = BoostCount = boostCount } +/// This object describes the way a background is filled based on the selected colors. Currently, it can be one of +and BackgroundFill = + | Solid of BackgroundFillSolid + | Gradient of BackgroundFillGradient + | FreeformGradient of BackgroundFillFreeformGradient + +/// The background is filled using the selected color. +and [] BackgroundFillSolid = + { + /// Type of the background fill, always “solid” + [] + Type: string + /// The color of the background fill in the RGB24 format + [] + Color: int64 + } + static member Create(``type``: string, color: int64) = + { + Type = ``type`` + Color = color + } + +/// The background is a gradient fill. +and [] BackgroundFillGradient = + { + /// Type of the background fill, always “gradient” + [] + Type: string + /// Top color of the gradient in the RGB24 format + [] + TopColor: int64 + /// Bottom color of the gradient in the RGB24 format + [] + BottomColor: int64 + /// Clockwise rotation angle of the background fill in degrees; 0-359 + [] + RotationAngle: int64 + } + static member Create(``type``: string, topColor: int64, bottomColor: int64, rotationAngle: int64) = + { + Type = ``type`` + TopColor = topColor + BottomColor = bottomColor + RotationAngle = rotationAngle + } + +/// The background is a freeform gradient that rotates after every message in the chat. +and [] BackgroundFillFreeformGradient = + { + /// Type of the background fill, always “freeform_gradient” + [] + Type: string + /// A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format + [] + Colors: int64[] + } + static member Create(``type``: string, colors: int64[]) = + { + Type = ``type`` + Colors = colors + } + +/// This object describes the type of a background. Currently, it can be one of +and BackgroundType = + | Fill of BackgroundTypeFill + | Wallpaper of BackgroundTypeWallpaper + | Pattern of BackgroundTypePattern + | ChatTheme of BackgroundTypeChatTheme + +/// The background is automatically filled based on the selected colors. +and [] BackgroundTypeFill = + { + /// Type of the background, always “fill” + [] + Type: string + /// The background fill + [] + Fill: BackgroundFill + /// Dimming of the background in dark themes, as a percentage; 0-100 + [] + DarkThemeDimming: int64 + } + static member Create(``type``: string, fill: BackgroundFill, darkThemeDimming: int64) = + { + Type = ``type`` + Fill = fill + DarkThemeDimming = darkThemeDimming + } + +/// The background is a wallpaper in the JPEG format. +and [] BackgroundTypeWallpaper = + { + /// Type of the background, always “wallpaper” + [] + Type: string + /// Document with the wallpaper + [] + Document: Document + /// Dimming of the background in dark themes, as a percentage; 0-100 + [] + DarkThemeDimming: int64 + /// True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12 + [] + IsBlurred: bool option + /// True, if the background moves slightly when the device is tilted + [] + IsMoving: bool option + } + static member Create(``type``: string, document: Document, darkThemeDimming: int64, ?isBlurred: bool, ?isMoving: bool) = + { + Type = ``type`` + Document = document + DarkThemeDimming = darkThemeDimming + IsBlurred = isBlurred + IsMoving = isMoving + } + +/// The background is a PNG or TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user. +and [] BackgroundTypePattern = + { + /// Type of the background, always “pattern” + [] + Type: string + /// Document with the pattern + [] + Document: Document + /// The background fill that is combined with the pattern + [] + Fill: BackgroundFill + /// Intensity of the pattern when it is shown above the filled background; 0-100 + [] + Intensity: int64 + /// True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only + [] + IsInverted: bool option + /// True, if the background moves slightly when the device is tilted + [] + IsMoving: bool option + } + static member Create(``type``: string, document: Document, fill: BackgroundFill, intensity: int64, ?isInverted: bool, ?isMoving: bool) = + { + Type = ``type`` + Document = document + Fill = fill + Intensity = intensity + IsInverted = isInverted + IsMoving = isMoving + } + +/// The background is taken directly from a built-in chat theme. +and [] BackgroundTypeChatTheme = + { + /// Type of the background, always “chat_theme” + [] + Type: string + /// Name of the chat theme, which is usually an emoji + [] + ThemeName: string + } + static member Create(``type``: string, themeName: string) = + { + Type = ``type`` + ThemeName = themeName + } + +/// This object represents a chat background. +and [] ChatBackground = + { + /// Type of the background + [] + Type: BackgroundType + } + static member Create(``type``: BackgroundType) = + { + Type = ``type`` + } + /// This object represents a service message about a new forum topic created in the chat. and [] ForumTopicCreated = { @@ -1704,7 +1953,7 @@ and GeneralForumTopicHidden = and GeneralForumTopicUnhidden = new() = {} -/// This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button. +/// This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button. and [] SharedUser = { /// Identifier of the shared user. 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 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means. @@ -2032,7 +2281,7 @@ and [] WebAppInfo = Url = url } -/// This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). +/// This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account. and [] ReplyKeyboardMarkup = { /// Array of button rows, each represented by an Array of KeyboardButton objects @@ -2118,13 +2367,13 @@ and [] KeyboardButtonRequestUsers = /// The maximum number of users to be selected; 1-10. Defaults to 1. [] MaxQuantity: int64 option - /// Pass True to request the users' first and last name + /// Pass True to request the users' first and last names [] RequestName: bool option - /// Pass True to request the users' username + /// Pass True to request the users' usernames [] RequestUsername: bool option - /// Pass True to request the users' photo + /// Pass True to request the users' photos [] RequestPhoto: bool option } @@ -2139,7 +2388,7 @@ and [] KeyboardButtonRequestUsers = RequestPhoto = requestPhoto } -/// This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the сhat if appropriate More about requesting chats » +/// This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. More about requesting chats ». and [] KeyboardButtonRequestChat = { /// Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message @@ -2203,7 +2452,7 @@ and [] KeyboardButtonPollType = Type = ``type`` } -/// Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). +/// Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account. and [] ReplyKeyboardRemove = { /// Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup) @@ -2242,24 +2491,24 @@ and [] InlineKeyboardButton = /// HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id= can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings. [] Url: string option - /// Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes + /// Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account. [] CallbackData: string option - /// Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. + /// Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account. [] WebApp: WebAppInfo option /// An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget. [] LoginUrl: LoginUrl option - /// If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. + /// If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account. [] SwitchInlineQuery: string option /// If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted. /// - /// This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. + /// This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account. [] SwitchInlineQueryCurrentChat: string option - /// If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field + /// If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account. [] SwitchInlineQueryChosenChat: SwitchInlineQueryChosenChat option /// Description of the game that will be launched when the user presses the button. @@ -2378,7 +2627,7 @@ and [] CallbackQuery = GameShortName = gameShortName } -/// Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. +/// Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a Telegram Business account. and [] ForceReply = { /// Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply' @@ -2496,7 +2745,7 @@ and [] ChatAdministratorRights = /// True, if the administrator can post stories to the chat [] CanPostStories: bool - /// True, if the administrator can edit stories posted by other users + /// True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive [] CanEditStories: bool /// True, if the administrator can delete stories posted by other users @@ -2559,11 +2808,14 @@ and [] ChatMemberUpdated = /// Chat invite link, which was used by the user to join the chat; for joining by invite link events only. [] InviteLink: ChatInviteLink option + /// True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator + [] + ViaJoinRequest: bool option /// True, if the user joined the chat via a chat folder invite link [] ViaChatFolderInviteLink: bool option } - static member Create(chat: Chat, from: User, date: DateTime, oldChatMember: ChatMember, newChatMember: ChatMember, ?inviteLink: ChatInviteLink, ?viaChatFolderInviteLink: bool) = + static member Create(chat: Chat, from: User, date: DateTime, oldChatMember: ChatMember, newChatMember: ChatMember, ?inviteLink: ChatInviteLink, ?viaJoinRequest: bool, ?viaChatFolderInviteLink: bool) = { Chat = chat From = from @@ -2571,6 +2823,7 @@ and [] ChatMemberUpdated = OldChatMember = oldChatMember NewChatMember = newChatMember InviteLink = inviteLink + ViaJoinRequest = viaJoinRequest ViaChatFolderInviteLink = viaChatFolderInviteLink } @@ -2646,7 +2899,7 @@ and [] ChatMemberAdministrator = /// True, if the administrator can post stories to the chat [] CanPostStories: bool - /// True, if the administrator can edit stories posted by other users + /// True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive [] CanEditStories: bool /// True, if the administrator can delete stories posted by other users @@ -2923,7 +3176,7 @@ and [] ChatPermissions = CanManageTopics = canManageTopics } -/// +/// Describes the birthdate of a user. and [] Birthdate = { /// Day of the user's birth; 1-31 @@ -2943,7 +3196,7 @@ and [] Birthdate = Year = year } -/// +/// Contains information about the start page settings of a Telegram Business account. and [] BusinessIntro = { /// Title text of the business intro @@ -2963,7 +3216,7 @@ and [] BusinessIntro = Sticker = sticker } -/// +/// Contains information about the location of a Telegram Business account. and [] BusinessLocation = { /// Address of the business @@ -2979,7 +3232,7 @@ and [] BusinessLocation = Location = location } -/// +/// Describes an interval of time during which a business is open. and [] BusinessOpeningHoursInterval = { /// The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60 @@ -2995,7 +3248,7 @@ and [] BusinessOpeningHoursInterval = ClosingMinute = closingMinute } -/// +/// Describes the opening hours of a business. and [] BusinessOpeningHours = { /// Unique name of the time zone for which the opening hours are defined @@ -3556,7 +3809,7 @@ and [] BusinessMessagesDeleted = /// Information about a chat in the business account. The bot may not have access to the chat or the corresponding user. [] Chat: Chat - /// A JSON-serialized list of identifiers of deleted messages in the chat of the business account + /// The list of identifiers of deleted messages in the chat of the business account [] MessageIds: int64[] } @@ -4522,7 +4775,7 @@ and [] InlineQueryResultLocation = /// The radius of uncertainty for the location, measured in meters; 0-1500 [] HorizontalAccuracy: float option - /// Period in seconds for which the location can be updated, should be between 60 and 86400. + /// Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. [] LivePeriod: int64 option /// For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. @@ -5097,7 +5350,7 @@ and [] InputLocationMessageContent = /// The radius of uncertainty for the location, measured in meters; 0-1500 [] HorizontalAccuracy: float option - /// Period in seconds for which the location can be updated, should be between 60 and 86400. + /// Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. [] LivePeriod: int64 option /// For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.