diff --git a/README.md b/README.md index e32a5e4..614bf0b 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.3-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/) +[![NuGet](https://img.shields.io/badge/Bot%20API-7.7-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/) Funogram Logo diff --git a/src/Funogram.Generator/Constants.fs b/src/Funogram.Generator/Constants.fs index 7da4c10..1fcd7d3 100644 --- a/src/Funogram.Generator/Constants.fs +++ b/src/Funogram.Generator/Constants.fs @@ -4,6 +4,10 @@ module Funogram.Generator.Constants [] let ApiUri = "https://core.telegram.org/bots/api" + +[] +let RootDir = "../../" + [] let CodeOutputDir = "../Funogram.Telegram/" @@ -19,5 +23,9 @@ let MethodsFileName = "RequestsTypes.fs" [] let TypesFileName = "Types.fs" +[] +let BuildPropsFileName = "Directory.Build.props" +[] +let ReadmeFileName = "README.md" diff --git a/src/Funogram.Generator/Funogram.Generator.fsproj b/src/Funogram.Generator/Funogram.Generator.fsproj index d1db48c..2a57474 100644 --- a/src/Funogram.Generator/Funogram.Generator.fsproj +++ b/src/Funogram.Generator/Funogram.Generator.fsproj @@ -16,6 +16,7 @@ + diff --git a/src/Funogram.Generator/Program.fs b/src/Funogram.Generator/Program.fs index af6fa92..94b9bee 100644 --- a/src/Funogram.Generator/Program.fs +++ b/src/Funogram.Generator/Program.fs @@ -51,6 +51,11 @@ let processAsync (args: CliArguments list) = |> MethodsGenerator.mkGenerator (Path.Combine(Constants.CodeOutputDir, Constants.MethodsFileName)) |> MethodsGenerator.generate + + VersionParser.mkParser html + |> VersionParser.withBuildPropsPath (Path.Combine(Constants.CodeOutputDir, Constants.BuildPropsFileName)) + |> VersionParser.withReadmePath (Path.Combine(Constants.RootDir, Constants.ReadmeFileName)) + |> VersionParser.parseAndWrite } [] diff --git a/src/Funogram.Generator/VersionParser.fs b/src/Funogram.Generator/VersionParser.fs new file mode 100644 index 0000000..97c1467 --- /dev/null +++ b/src/Funogram.Generator/VersionParser.fs @@ -0,0 +1,80 @@ +[] +module Funogram.Generator.VersionParser + +open System +open System.IO +open System.Xml +open System.Xml.Linq +open FSharp.Data + +type ParseConfig = + { + Document: HtmlDocument + BuildPropsPath: string option + ReadmePath: string option + } + +let mkParser (html: HtmlDocument) = + { + Document = html + BuildPropsPath = None + ReadmePath = None + } + +let withBuildPropsPath path config = + { config with BuildPropsPath = Some path } + +let withReadmePath path config = + { config with ReadmePath = Some path } + +let private parseVersion (text: string) = + try + Some (text.Split('.') |> Array.map Int32.Parse) + with + | _ -> None + +let private updateReadme (apiVersion: int[]) (path: string) = + let version = apiVersion |> Seq.map string |> String.concat "." + let lines = File.ReadAllLines(path) + match lines |> Seq.tryFindIndex (_.StartsWith("[![NuGet](https://img.shields.io/badge/Bot")) with + | Some badgeIndex -> + lines[badgeIndex] <- $"[![NuGet](https://img.shields.io/badge/Bot%%20API-{version}-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/)" + File.WriteAllLines(path, lines) + | None -> + printfn "Unable to find line with version badge." + +let parseAndWrite (config: ParseConfig) = + let content = config.Document.CssSelect("#dev_page_content > p > strong") |> Seq.head + let version = content.InnerText() |> String.filter (fun x -> x = '.' || Char.IsDigit(x)) + + match parseVersion version with + | Some newApiVersion -> + match config.BuildPropsPath with + | Some buildPropsPath -> + use fs = File.Open(buildPropsPath, FileMode.Open) + let doc = XDocument.Load(fs) + fs.Close() + let versionNode = doc.Root.Element("PropertyGroup").Element("Version") + match parseVersion versionNode.Value with + | Some currentVersion -> + let newVersion = + if currentVersion[0] <> newApiVersion[0] || currentVersion[1] <> newApiVersion[1] then + let zeros = Array.zeroCreate (4 - newApiVersion.Length) + Array.append newApiVersion zeros |> Seq.map string |> String.concat "." + else + currentVersion[currentVersion.Length - 1] <- currentVersion[currentVersion.Length - 1] + 1 + currentVersion |> Seq.map string |> String.concat "." + versionNode.Value <- newVersion + printfn $"Updating {buildPropsPath} with new version {newVersion}" + doc.Save(buildPropsPath) + config.ReadmePath |> Option.iter (updateReadme newApiVersion) + | None -> () + | None -> + printfn "WARN: Version parsed, but not used, because Build.Props path is not set!" + () + | None -> + printfn $"WARN: Unable to parse API version: {version} (from element with content: {content})" + + + + diff --git a/src/Funogram.Generator/out/methods.json b/src/Funogram.Generator/out/methods.json index 9dd9ba4..2539b37 100644 --- a/src/Funogram.Generator/out/methods.json +++ b/src/Funogram.Generator/out/methods.json @@ -231,6 +231,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -368,7 +376,7 @@ { "OriginalName": "copyMessage", "ConvertedName": "CopyMessage", - "Description": "Use this method to copy messages of any kind. Service messages, giveaway messages, giveaway winners messages, and invoice messages can\u0027t be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn\u0027t have a link to the original message. Returns the MessageId of the sent message on success.", + "Description": "Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can\u0027t be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn\u0027t have a link to the original message. Returns the MessageId of the sent message on success.", "Fields": [ { "OriginalName": "chat_id", @@ -426,6 +434,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media. Ignored if a new caption isn\u0027t specified.", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "disable_notification", "ConvertedName": "DisableNotification", @@ -465,7 +481,7 @@ { "OriginalName": "copyMessages", "ConvertedName": "CopyMessages", - "Description": "Use this method to copy messages of any kind. If some of the specified messages can\u0027t be found or copied, they are skipped. Service messages, giveaway messages, giveaway winners messages, and invoice messages can\u0027t be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don\u0027t have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned.", + "Description": "Use this method to copy messages of any kind. If some of the specified messages can\u0027t be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can\u0027t be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don\u0027t have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned.", "Fields": [ { "OriginalName": "chat_id", @@ -588,6 +604,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "has_spoiler", "ConvertedName": "HasSpoiler", @@ -612,6 +636,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -741,6 +773,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -854,6 +894,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -967,6 +1015,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "has_spoiler", "ConvertedName": "HasSpoiler", @@ -999,6 +1055,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -1112,6 +1176,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "has_spoiler", "ConvertedName": "HasSpoiler", @@ -1136,6 +1208,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -1241,6 +1321,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -1338,6 +1426,111 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", + "Optional": true + }, + { + "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", + "OriginalFieldType": "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", + "ConvertedFieldType": "Markup", + "Optional": true + } + ], + "OriginalReturnType": "Message", + "ConvertedReturnType": "Message" + }, + { + "OriginalName": "sendPaidMedia", + "ConvertedName": "SendPaidMedia", + "Description": "Use this method to send paid media to channel chats. On success, the sent Message is returned.", + "Fields": [ + { + "OriginalName": "chat_id", + "ConvertedName": "ChatId", + "Description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)", + "OriginalFieldType": "Integer or String", + "ConvertedFieldType": "ChatId", + "Optional": false + }, + { + "OriginalName": "star_count", + "ConvertedName": "StarCount", + "Description": "The number of Telegram Stars that must be paid to buy access to the media", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "media", + "ConvertedName": "Media", + "Description": "A JSON-serialized array describing the media to be sent; up to 10 items", + "OriginalFieldType": "Array of InputPaidMedia", + "ConvertedFieldType": "InputPaidMedia[]", + "Optional": false + }, + { + "OriginalName": "caption", + "ConvertedName": "Caption", + "Description": "Media caption, 0-1024 characters after entities parsing", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "parse_mode", + "ConvertedName": "ParseMode", + "Description": "Mode for parsing entities in the media caption. See formatting options for more details.", + "OriginalFieldType": "String", + "ConvertedFieldType": "ParseMode", + "Optional": true + }, + { + "OriginalName": "caption_entities", + "ConvertedName": "CaptionEntities", + "Description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode", + "OriginalFieldType": "Array of MessageEntity", + "ConvertedFieldType": "MessageEntity[]", + "Optional": true + }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "disable_notification", + "ConvertedName": "DisableNotification", + "Description": "Sends the message silently. Users will receive a notification with no sound.", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "protect_content", + "ConvertedName": "ProtectContent", + "Description": "Protects the contents of the sent message from forwarding and saving", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -1411,6 +1604,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -1516,6 +1717,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -1645,6 +1854,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -1742,6 +1959,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -1919,6 +2144,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -1992,6 +2225,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -3715,8 +3956,16 @@ { "OriginalName": "editMessageText", "ConvertedName": "EditMessageText", - "Description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "Description": "Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -3788,8 +4037,16 @@ { "OriginalName": "editMessageCaption", "ConvertedName": "EditMessageCaption", - "Description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "Description": "Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -3838,6 +4095,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media. Supported only for animation, photo and video messages.", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", @@ -3853,8 +4118,16 @@ { "OriginalName": "editMessageMedia", "ConvertedName": "EditMessageMedia", - "Description": "Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can\u0027t be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "Description": "Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can\u0027t be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -3904,6 +4177,14 @@ "ConvertedName": "EditMessageLiveLocation", "Description": "Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -3993,6 +4274,14 @@ "ConvertedName": "StopMessageLiveLocation", "Description": "Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -4032,8 +4321,16 @@ { "OriginalName": "editMessageReplyMarkup", "ConvertedName": "EditMessageReplyMarkup", - "Description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.", + "Description": "Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -4075,6 +4372,14 @@ "ConvertedName": "StopPoll", "Description": "Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.", "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message to be edited was sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "chat_id", "ConvertedName": "ChatId", @@ -4214,6 +4519,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -4787,15 +5100,15 @@ { "OriginalName": "provider_token", "ConvertedName": "ProviderToken", - "Description": "Payment provider token, obtained via @BotFather", + "Description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", "OriginalFieldType": "String", "ConvertedFieldType": "string", - "Optional": false + "Optional": true }, { "OriginalName": "currency", "ConvertedName": "Currency", - "Description": "Three-letter ISO 4217 currency code, see more on currencies", + "Description": "Three-letter ISO 4217 currency code, see more on currencies. Pass \u201CXTR\u201D for payments in Telegram Stars.", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false @@ -4803,7 +5116,7 @@ { "OriginalName": "prices", "ConvertedName": "Prices", - "Description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "Description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.", "OriginalFieldType": "Array of LabeledPrice", "ConvertedFieldType": "LabeledPrice[]", "Optional": false @@ -4811,7 +5124,7 @@ { "OriginalName": "max_tip_amount", "ConvertedName": "MaxTipAmount", - "Description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "Description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -4875,7 +5188,7 @@ { "OriginalName": "need_name", "ConvertedName": "NeedName", - "Description": "Pass True if you require the user\u0027s full name to complete the order", + "Description": "Pass True if you require the user\u0027s full name to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4883,7 +5196,7 @@ { "OriginalName": "need_phone_number", "ConvertedName": "NeedPhoneNumber", - "Description": "Pass True if you require the user\u0027s phone number to complete the order", + "Description": "Pass True if you require the user\u0027s phone number to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4891,7 +5204,7 @@ { "OriginalName": "need_email", "ConvertedName": "NeedEmail", - "Description": "Pass True if you require the user\u0027s email address to complete the order", + "Description": "Pass True if you require the user\u0027s email address to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4899,7 +5212,7 @@ { "OriginalName": "need_shipping_address", "ConvertedName": "NeedShippingAddress", - "Description": "Pass True if you require the user\u0027s shipping address to complete the order", + "Description": "Pass True if you require the user\u0027s shipping address to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4907,7 +5220,7 @@ { "OriginalName": "send_phone_number_to_provider", "ConvertedName": "SendPhoneNumberToProvider", - "Description": "Pass True if the user\u0027s phone number should be sent to provider", + "Description": "Pass True if the user\u0027s phone number should be sent to the provider. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4915,7 +5228,7 @@ { "OriginalName": "send_email_to_provider", "ConvertedName": "SendEmailToProvider", - "Description": "Pass True if the user\u0027s email address should be sent to provider", + "Description": "Pass True if the user\u0027s email address should be sent to the provider. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4923,7 +5236,7 @@ { "OriginalName": "is_flexible", "ConvertedName": "IsFlexible", - "Description": "Pass True if the final price depends on the shipping method", + "Description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4944,6 +5257,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", @@ -4996,15 +5317,15 @@ { "OriginalName": "provider_token", "ConvertedName": "ProviderToken", - "Description": "Payment provider token, obtained via BotFather", + "Description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", "OriginalFieldType": "String", "ConvertedFieldType": "string", - "Optional": false + "Optional": true }, { "OriginalName": "currency", "ConvertedName": "Currency", - "Description": "Three-letter ISO 4217 currency code, see more on currencies", + "Description": "Three-letter ISO 4217 currency code, see more on currencies. Pass \u201CXTR\u201D for payments in Telegram Stars.", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false @@ -5012,7 +5333,7 @@ { "OriginalName": "prices", "ConvertedName": "Prices", - "Description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "Description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.", "OriginalFieldType": "Array of LabeledPrice", "ConvertedFieldType": "LabeledPrice[]", "Optional": false @@ -5020,7 +5341,7 @@ { "OriginalName": "max_tip_amount", "ConvertedName": "MaxTipAmount", - "Description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "Description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -5076,7 +5397,7 @@ { "OriginalName": "need_name", "ConvertedName": "NeedName", - "Description": "Pass True if you require the user\u0027s full name to complete the order", + "Description": "Pass True if you require the user\u0027s full name to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -5084,7 +5405,7 @@ { "OriginalName": "need_phone_number", "ConvertedName": "NeedPhoneNumber", - "Description": "Pass True if you require the user\u0027s phone number to complete the order", + "Description": "Pass True if you require the user\u0027s phone number to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -5092,7 +5413,7 @@ { "OriginalName": "need_email", "ConvertedName": "NeedEmail", - "Description": "Pass True if you require the user\u0027s email address to complete the order", + "Description": "Pass True if you require the user\u0027s email address to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -5100,7 +5421,7 @@ { "OriginalName": "need_shipping_address", "ConvertedName": "NeedShippingAddress", - "Description": "Pass True if you require the user\u0027s shipping address to complete the order", + "Description": "Pass True if you require the user\u0027s shipping address to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -5108,7 +5429,7 @@ { "OriginalName": "send_phone_number_to_provider", "ConvertedName": "SendPhoneNumberToProvider", - "Description": "Pass True if the user\u0027s phone number should be sent to the provider", + "Description": "Pass True if the user\u0027s phone number should be sent to the provider. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -5116,7 +5437,7 @@ { "OriginalName": "send_email_to_provider", "ConvertedName": "SendEmailToProvider", - "Description": "Pass True if the user\u0027s email address should be sent to the provider", + "Description": "Pass True if the user\u0027s email address should be sent to the provider. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -5124,7 +5445,7 @@ { "OriginalName": "is_flexible", "ConvertedName": "IsFlexible", - "Description": "Pass True if the final price depends on the shipping method", + "Description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -5207,6 +5528,56 @@ "OriginalReturnType": "True", "ConvertedReturnType": "bool" }, + { + "OriginalName": "getStarTransactions", + "ConvertedName": "GetStarTransactions", + "Description": "Returns the bot\u0027s Telegram Star transactions in chronological order. On success, returns a StarTransactions object.", + "Fields": [ + { + "OriginalName": "offset", + "ConvertedName": "Offset", + "Description": "Number of transactions to skip in the response", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "limit", + "ConvertedName": "Limit", + "Description": "The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + } + ], + "OriginalReturnType": "StarTransactions", + "ConvertedReturnType": "StarTransactions" + }, + { + "OriginalName": "refundStarPayment", + "ConvertedName": "RefundStarPayment", + "Description": "Refunds a successful payment in Telegram Stars. Returns True on success.", + "Fields": [ + { + "OriginalName": "user_id", + "ConvertedName": "UserId", + "Description": "Identifier of the user whose payment will be refunded", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "telegram_payment_charge_id", + "ConvertedName": "TelegramPaymentChargeId", + "Description": "Telegram payment identifier", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ], + "OriginalReturnType": "True", + "ConvertedReturnType": "bool" + }, { "OriginalName": "setPassportDataErrors", "ConvertedName": "SetPassportDataErrors", @@ -5285,6 +5656,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message; for private chats only", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "reply_parameters", "ConvertedName": "ReplyParameters", diff --git a/src/Funogram.Generator/out/types.json b/src/Funogram.Generator/out/types.json index ce1550e..516b4be 100644 --- a/src/Funogram.Generator/out/types.json +++ b/src/Funogram.Generator/out/types.json @@ -706,6 +706,14 @@ "ConvertedFieldType": "ChatPermissions", "Optional": true }, + { + "OriginalName": "can_send_paid_media", + "ConvertedName": "CanSendPaidMedia", + "Description": "True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "slow_mode_delay", "ConvertedName": "SlowModeDelay", @@ -1013,6 +1021,14 @@ "ConvertedFieldType": "LinkPreviewOptions", "Optional": true }, + { + "OriginalName": "effect_id", + "ConvertedName": "EffectId", + "Description": "Unique identifier of the message effect added to the message", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "animation", "ConvertedName": "Animation", @@ -1037,6 +1053,14 @@ "ConvertedFieldType": "Document", "Optional": true }, + { + "OriginalName": "paid_media", + "ConvertedName": "PaidMedia", + "Description": "Message contains paid media; information about the paid media", + "OriginalFieldType": "PaidMediaInfo", + "ConvertedFieldType": "PaidMediaInfo", + "Optional": true + }, { "OriginalName": "photo", "ConvertedName": "Photo", @@ -1088,7 +1112,7 @@ { "OriginalName": "caption", "ConvertedName": "Caption", - "Description": "Caption for the animation, audio, document, photo, video or voice", + "Description": "Caption for the animation, audio, document, paid media, photo, video or voice", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -1101,6 +1125,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "True, if the caption must be shown above the message media", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "has_media_spoiler", "ConvertedName": "HasMediaSpoiler", @@ -1269,6 +1301,14 @@ "ConvertedFieldType": "SuccessfulPayment", "Optional": true }, + { + "OriginalName": "refunded_payment", + "ConvertedName": "RefundedPayment", + "Description": "Message is a service message about a refunded payment, information about the payment. More about payments \u00BB", + "OriginalFieldType": "RefundedPayment", + "ConvertedFieldType": "RefundedPayment", + "Optional": true + }, { "OriginalName": "users_shared", "ConvertedName": "UsersShared", @@ -1548,7 +1588,7 @@ { "OriginalName": "type", "ConvertedName": "Type", - "Description": "Type of the entity. Currently, can be \u201Cmention\u201D (@username), \u201Chashtag\u201D (#hashtag), \u201Ccashtag\u201D ($USD), \u201Cbot_command\u201D (/start@jobs_bot), \u201Curl\u201D (https://telegram.org), \u201Cemail\u201D (do-not-reply@telegram.org), \u201Cphone_number\u201D (\u002B1-212-555-0123), \u201Cbold\u201D (bold text), \u201Citalic\u201D (italic text), \u201Cunderline\u201D (underlined text), \u201Cstrikethrough\u201D (strikethrough text), \u201Cspoiler\u201D (spoiler message), \u201Cblockquote\u201D (block quotation), \u201Ccode\u201D (monowidth string), \u201Cpre\u201D (monowidth block), \u201Ctext_link\u201D (for clickable text URLs), \u201Ctext_mention\u201D (for users without usernames), \u201Ccustom_emoji\u201D (for inline custom emoji stickers)", + "Description": "Type of the entity. Currently, can be \u201Cmention\u201D (@username), \u201Chashtag\u201D (#hashtag), \u201Ccashtag\u201D ($USD), \u201Cbot_command\u201D (/start@jobs_bot), \u201Curl\u201D (https://telegram.org), \u201Cemail\u201D (do-not-reply@telegram.org), \u201Cphone_number\u201D (\u002B1-212-555-0123), \u201Cbold\u201D (bold text), \u201Citalic\u201D (italic text), \u201Cunderline\u201D (underlined text), \u201Cstrikethrough\u201D (strikethrough text), \u201Cspoiler\u201D (spoiler message), \u201Cblockquote\u201D (block quotation), \u201Cexpandable_blockquote\u201D (collapsed-by-default block quotation), \u201Ccode\u201D (monowidth string), \u201Cpre\u201D (monowidth block), \u201Ctext_link\u201D (for clickable text URLs), \u201Ctext_mention\u201D (for users without usernames), \u201Ccustom_emoji\u201D (for inline custom emoji stickers)", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false @@ -1711,6 +1751,14 @@ "ConvertedFieldType": "Document", "Optional": true }, + { + "OriginalName": "paid_media", + "ConvertedName": "PaidMedia", + "Description": "Message contains paid media; information about the paid media", + "OriginalFieldType": "PaidMediaInfo", + "ConvertedFieldType": "PaidMediaInfo", + "Optional": true + }, { "OriginalName": "photo", "ConvertedName": "Photo", @@ -2178,7 +2226,7 @@ { "OriginalName": "width", "ConvertedName": "Width", - "Description": "Video width as defined by sender", + "Description": "Video width as defined by the sender", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -2186,7 +2234,7 @@ { "OriginalName": "height", "ConvertedName": "Height", - "Description": "Video height as defined by sender", + "Description": "Video height as defined by the sender", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -2194,7 +2242,7 @@ { "OriginalName": "duration", "ConvertedName": "Duration", - "Description": "Duration of the video in seconds as defined by sender", + "Description": "Duration of the video in seconds as defined by the sender", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -2202,7 +2250,7 @@ { "OriginalName": "thumbnail", "ConvertedName": "Thumbnail", - "Description": "Animation thumbnail as defined by sender", + "Description": "Animation thumbnail as defined by the sender", "OriginalFieldType": "PhotoSize", "ConvertedFieldType": "PhotoSize", "Optional": true @@ -2210,7 +2258,7 @@ { "OriginalName": "file_name", "ConvertedName": "FileName", - "Description": "Original animation filename as defined by sender", + "Description": "Original animation filename as defined by the sender", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -2218,7 +2266,7 @@ { "OriginalName": "mime_type", "ConvertedName": "MimeType", - "Description": "MIME type of the file as defined by sender", + "Description": "MIME type of the file as defined by the sender", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -2261,7 +2309,7 @@ { "OriginalName": "duration", "ConvertedName": "Duration", - "Description": "Duration of the audio in seconds as defined by sender", + "Description": "Duration of the audio in seconds as defined by the sender", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -2269,7 +2317,7 @@ { "OriginalName": "performer", "ConvertedName": "Performer", - "Description": "Performer of the audio as defined by sender or by audio tags", + "Description": "Performer of the audio as defined by the sender or by audio tags", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -2277,7 +2325,7 @@ { "OriginalName": "title", "ConvertedName": "Title", - "Description": "Title of the audio as defined by sender or by audio tags", + "Description": "Title of the audio as defined by the sender or by audio tags", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -2285,7 +2333,7 @@ { "OriginalName": "file_name", "ConvertedName": "FileName", - "Description": "Original filename as defined by sender", + "Description": "Original filename as defined by the sender", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -2293,7 +2341,7 @@ { "OriginalName": "mime_type", "ConvertedName": "MimeType", - "Description": "MIME type of the file as defined by sender", + "Description": "MIME type of the file as defined by the sender", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -2344,7 +2392,7 @@ { "OriginalName": "thumbnail", "ConvertedName": "Thumbnail", - "Description": "Document thumbnail as defined by sender", + "Description": "Document thumbnail as defined by the sender", "OriginalFieldType": "PhotoSize", "ConvertedFieldType": "PhotoSize", "Optional": true @@ -2352,7 +2400,7 @@ { "OriginalName": "file_name", "ConvertedName": "FileName", - "Description": "Original filename as defined by sender", + "Description": "Original filename as defined by the sender", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -2360,7 +2408,7 @@ { "OriginalName": "mime_type", "ConvertedName": "MimeType", - "Description": "MIME type of the file as defined by sender", + "Description": "MIME type of the file as defined by the sender", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -2430,7 +2478,7 @@ { "OriginalName": "width", "ConvertedName": "Width", - "Description": "Video width as defined by sender", + "Description": "Video width as defined by the sender", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -2438,7 +2486,7 @@ { "OriginalName": "height", "ConvertedName": "Height", - "Description": "Video height as defined by sender", + "Description": "Video height as defined by the sender", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -2446,7 +2494,7 @@ { "OriginalName": "duration", "ConvertedName": "Duration", - "Description": "Duration of the video in seconds as defined by sender", + "Description": "Duration of the video in seconds as defined by the sender", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -2462,7 +2510,7 @@ { "OriginalName": "file_name", "ConvertedName": "FileName", - "Description": "Original filename as defined by sender", + "Description": "Original filename as defined by the sender", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -2470,7 +2518,7 @@ { "OriginalName": "mime_type", "ConvertedName": "MimeType", - "Description": "MIME type of the file as defined by sender", + "Description": "MIME type of the file as defined by the sender", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -2513,7 +2561,7 @@ { "OriginalName": "length", "ConvertedName": "Length", - "Description": "Video width and height (diameter of the video message) as defined by sender", + "Description": "Video width and height (diameter of the video message) as defined by the sender", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -2521,7 +2569,7 @@ { "OriginalName": "duration", "ConvertedName": "Duration", - "Description": "Duration of the video in seconds as defined by sender", + "Description": "Duration of the video in seconds as defined by the sender", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -2572,7 +2620,7 @@ { "OriginalName": "duration", "ConvertedName": "Duration", - "Description": "Duration of the audio in seconds as defined by sender", + "Description": "Duration of the audio in seconds as defined by the sender", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -2580,7 +2628,7 @@ { "OriginalName": "mime_type", "ConvertedName": "MimeType", - "Description": "MIME type of the file as defined by sender", + "Description": "MIME type of the file as defined by the sender", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -2597,6 +2645,153 @@ ] } }, + { + "Name": "PaidMediaInfo", + "Description": "Describes the paid media added to a message.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "star_count", + "ConvertedName": "StarCount", + "Description": "The number of Telegram Stars that must be paid to buy access to the media", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "paid_media", + "ConvertedName": "PaidMedia", + "Description": "Information about the paid media", + "OriginalFieldType": "Array of PaidMedia", + "ConvertedFieldType": "PaidMedia[]", + "Optional": false + } + ] + ] + } + }, + { + "Name": "PaidMedia", + "Description": "This object describes paid media. Currently, it can be one of", + "Kind": { + "Case": "Cases", + "Fields": [ + [ + { + "Name": "Preview", + "CaseType": "PaidMediaPreview" + }, + { + "Name": "Photo", + "CaseType": "PaidMediaPhoto" + }, + { + "Name": "Video", + "CaseType": "PaidMediaVideo" + } + ] + ] + } + }, + { + "Name": "PaidMediaPreview", + "Description": "The paid media isn\u0027t available before the payment.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the paid media, always \u201Cpreview\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "width", + "ConvertedName": "Width", + "Description": "Media width as defined by the sender", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "height", + "ConvertedName": "Height", + "Description": "Media height as defined by the sender", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "duration", + "ConvertedName": "Duration", + "Description": "Duration of the media in seconds as defined by the sender", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + } + ] + ] + } + }, + { + "Name": "PaidMediaPhoto", + "Description": "The paid media is a photo.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the paid media, always \u201Cphoto\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "photo", + "ConvertedName": "Photo", + "Description": "The photo", + "OriginalFieldType": "Array of PhotoSize", + "ConvertedFieldType": "PhotoSize[]", + "Optional": false + } + ] + ] + } + }, + { + "Name": "PaidMediaVideo", + "Description": "The paid media is a video.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the paid media, always \u201Cvideo\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "video", + "ConvertedName": "Video", + "Description": "The video", + "OriginalFieldType": "Video", + "ConvertedFieldType": "Video", + "Optional": false + } + ] + ] + } + }, { "Name": "Contact", "Description": "This object represents a phone contact.", @@ -2712,7 +2907,7 @@ }, { "Name": "InputPollOption", - "Description": "This object contains information about one answer option in a poll to send.", + "Description": "This object contains information about one answer option in a poll to be sent.", "Kind": { "Case": "Fields", "Fields": [ @@ -2921,7 +3116,7 @@ { "OriginalName": "latitude", "ConvertedName": "Latitude", - "Description": "Latitude as defined by sender", + "Description": "Latitude as defined by the sender", "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false @@ -2929,7 +3124,7 @@ { "OriginalName": "longitude", "ConvertedName": "Longitude", - "Description": "Longitude as defined by sender", + "Description": "Longitude as defined by the sender", "OriginalFieldType": "Float", "ConvertedFieldType": "float", "Optional": false @@ -4210,7 +4405,7 @@ }, { "Name": "KeyboardButton", - "Description": "This object represents one button of the reply keyboard. For simple text buttons, String can be used instead of this object to specify the button text. The optional fields web_app, request_users, request_chat, request_contact, request_location, and request_poll are mutually exclusive.\nNote:request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message.", + "Description": "This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text.\nNote:request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message.", "Kind": { "Case": "Fields", "Fields": [ @@ -4508,7 +4703,7 @@ }, { "Name": "InlineKeyboardButton", - "Description": "This object represents one button of an inline keyboard. You must use exactly one of the optional fields.", + "Description": "This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button.", "Kind": { "Case": "Fields", "Fields": [ @@ -4532,7 +4727,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. Not supported for messages sent on behalf of a Telegram Business account.", + "Description": "Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -4588,7 +4783,7 @@ { "OriginalName": "pay", "ConvertedName": "Pay", - "Description": "Specify True, to send a Pay button.\n\nNOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.", + "Description": "Specify True, to send a Pay button. Substrings \u201C\u201D and \u201CXTR\u201D in the buttons\u0027s text will be replaced with a Telegram Star icon.\n\nNOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -6595,7 +6790,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.", + "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. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App\u0027s URL, in which case the Web App will be opened as if the user pressed the link.", "OriginalFieldType": "WebAppInfo", "ConvertedFieldType": "WebAppInfo", "Optional": false @@ -7074,6 +7269,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "has_spoiler", "ConvertedName": "HasSpoiler", @@ -7141,6 +7344,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "width", "ConvertedName": "Width", @@ -7240,6 +7451,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "width", "ConvertedName": "Width", @@ -7434,82 +7653,195 @@ } }, { - "Name": "Sticker", - "Description": "This object represents a sticker.", + "Name": "InputPaidMedia", + "Description": "This object describes the paid media to be sent. Currently, it can be one of", + "Kind": { + "Case": "Cases", + "Fields": [ + [ + { + "Name": "Photo", + "CaseType": "InputPaidMediaPhoto" + }, + { + "Name": "Video", + "CaseType": "InputPaidMediaVideo" + } + ] + ] + } + }, + { + "Name": "InputPaidMediaPhoto", + "Description": "The paid media to send is a photo.", "Kind": { "Case": "Fields", "Fields": [ [ { - "OriginalName": "file_id", - "ConvertedName": "FileId", - "Description": "Identifier for this file, which can be used to download or reuse the file", + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the media, must be photo", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false }, { - "OriginalName": "file_unique_id", - "ConvertedName": "FileUniqueId", - "Description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can\u0027t be used to download or reuse the file.", + "OriginalName": "media", + "ConvertedName": "Media", + "Description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D to upload a new one using multipart/form-data under \u003Cfile_attach_name\u003E name. More information on Sending Files \u00BB", "OriginalFieldType": "String", - "ConvertedFieldType": "string", + "ConvertedFieldType": "InputFile", "Optional": false - }, + } + ] + ] + } + }, + { + "Name": "InputPaidMediaVideo", + "Description": "The paid media to send is a video.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ { "OriginalName": "type", "ConvertedName": "Type", - "Description": "Type of the sticker, currently one of \u201Cregular\u201D, \u201Cmask\u201D, \u201Ccustom_emoji\u201D. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.", + "Description": "Type of the media, must be video", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false }, + { + "OriginalName": "media", + "ConvertedName": "Media", + "Description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D to upload a new one using multipart/form-data under \u003Cfile_attach_name\u003E name. More information on Sending Files \u00BB", + "OriginalFieldType": "String", + "ConvertedFieldType": "InputFile", + "Optional": false + }, + { + "OriginalName": "thumbnail", + "ConvertedName": "Thumbnail", + "Description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail\u0027s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can\u0027t be reused and can be only uploaded as a new file, so you can pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D if the thumbnail was uploaded using multipart/form-data under \u003Cfile_attach_name\u003E. More information on Sending Files \u00BB", + "OriginalFieldType": "InputFile or String", + "ConvertedFieldType": "InputFile", + "Optional": true + }, { "OriginalName": "width", "ConvertedName": "Width", - "Description": "Sticker width", + "Description": "Video width", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", - "Optional": false + "Optional": true }, { "OriginalName": "height", "ConvertedName": "Height", - "Description": "Sticker height", + "Description": "Video height", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", - "Optional": false + "Optional": true }, { - "OriginalName": "is_animated", - "ConvertedName": "IsAnimated", - "Description": "True, if the sticker is animated", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", - "Optional": false + "OriginalName": "duration", + "ConvertedName": "Duration", + "Description": "Video duration in seconds", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true }, { - "OriginalName": "is_video", - "ConvertedName": "IsVideo", - "Description": "True, if the sticker is a video sticker", + "OriginalName": "supports_streaming", + "ConvertedName": "SupportsStreaming", + "Description": "Pass True if the uploaded video is suitable for streaming", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", - "Optional": false - }, - { - "OriginalName": "thumbnail", - "ConvertedName": "Thumbnail", - "Description": "Sticker thumbnail in the .WEBP or .JPG format", - "OriginalFieldType": "PhotoSize", - "ConvertedFieldType": "PhotoSize", - "Optional": true - }, - { - "OriginalName": "emoji", - "ConvertedName": "Emoji", - "Description": "Emoji associated with the sticker", - "OriginalFieldType": "String", - "ConvertedFieldType": "string", + "Optional": true + } + ] + ] + } + }, + { + "Name": "Sticker", + "Description": "This object represents a sticker.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "file_id", + "ConvertedName": "FileId", + "Description": "Identifier for this file, which can be used to download or reuse the file", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "file_unique_id", + "ConvertedName": "FileUniqueId", + "Description": "Unique identifier for this file, which is supposed to be the same over time and for different bots. Can\u0027t be used to download or reuse the file.", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the sticker, currently one of \u201Cregular\u201D, \u201Cmask\u201D, \u201Ccustom_emoji\u201D. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "width", + "ConvertedName": "Width", + "Description": "Sticker width", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "height", + "ConvertedName": "Height", + "Description": "Sticker height", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "is_animated", + "ConvertedName": "IsAnimated", + "Description": "True, if the sticker is animated", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": false + }, + { + "OriginalName": "is_video", + "ConvertedName": "IsVideo", + "Description": "True, if the sticker is a video sticker", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": false + }, + { + "OriginalName": "thumbnail", + "ConvertedName": "Thumbnail", + "Description": "Sticker thumbnail in the .WEBP or .JPG format", + "OriginalFieldType": "PhotoSize", + "ConvertedFieldType": "PhotoSize", + "Optional": true + }, + { + "OriginalName": "emoji", + "ConvertedName": "Emoji", + "Description": "Emoji associated with the sticker", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", "Optional": true }, { @@ -8088,6 +8420,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", @@ -8211,6 +8551,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", @@ -8334,6 +8682,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", @@ -8433,6 +8789,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "video_width", "ConvertedName": "VideoWidth", @@ -9265,6 +9629,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", @@ -9348,6 +9720,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", @@ -9431,6 +9811,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", @@ -9664,6 +10052,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "show_caption_above_media", + "ConvertedName": "ShowCaptionAboveMedia", + "Description": "Pass True, if the caption must be shown above the message media", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "reply_markup", "ConvertedName": "ReplyMarkup", @@ -10127,15 +10523,15 @@ { "OriginalName": "provider_token", "ConvertedName": "ProviderToken", - "Description": "Payment provider token, obtained via @BotFather", + "Description": "Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.", "OriginalFieldType": "String", "ConvertedFieldType": "string", - "Optional": false + "Optional": true }, { "OriginalName": "currency", "ConvertedName": "Currency", - "Description": "Three-letter ISO 4217 currency code, see more on currencies", + "Description": "Three-letter ISO 4217 currency code, see more on currencies. Pass \u201CXTR\u201D for payments in Telegram Stars.", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false @@ -10143,7 +10539,7 @@ { "OriginalName": "prices", "ConvertedName": "Prices", - "Description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", + "Description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.", "OriginalFieldType": "Array of LabeledPrice", "ConvertedFieldType": "LabeledPrice[]", "Optional": false @@ -10151,7 +10547,7 @@ { "OriginalName": "max_tip_amount", "ConvertedName": "MaxTipAmount", - "Description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0", + "Description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -10207,7 +10603,7 @@ { "OriginalName": "need_name", "ConvertedName": "NeedName", - "Description": "Pass True if you require the user\u0027s full name to complete the order", + "Description": "Pass True if you require the user\u0027s full name to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -10215,7 +10611,7 @@ { "OriginalName": "need_phone_number", "ConvertedName": "NeedPhoneNumber", - "Description": "Pass True if you require the user\u0027s phone number to complete the order", + "Description": "Pass True if you require the user\u0027s phone number to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -10223,7 +10619,7 @@ { "OriginalName": "need_email", "ConvertedName": "NeedEmail", - "Description": "Pass True if you require the user\u0027s email address to complete the order", + "Description": "Pass True if you require the user\u0027s email address to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -10231,7 +10627,7 @@ { "OriginalName": "need_shipping_address", "ConvertedName": "NeedShippingAddress", - "Description": "Pass True if you require the user\u0027s shipping address to complete the order", + "Description": "Pass True if you require the user\u0027s shipping address to complete the order. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -10239,7 +10635,7 @@ { "OriginalName": "send_phone_number_to_provider", "ConvertedName": "SendPhoneNumberToProvider", - "Description": "Pass True if the user\u0027s phone number should be sent to provider", + "Description": "Pass True if the user\u0027s phone number should be sent to the provider. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -10247,7 +10643,7 @@ { "OriginalName": "send_email_to_provider", "ConvertedName": "SendEmailToProvider", - "Description": "Pass True if the user\u0027s email address should be sent to provider", + "Description": "Pass True if the user\u0027s email address should be sent to the provider. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -10255,7 +10651,7 @@ { "OriginalName": "is_flexible", "ConvertedName": "IsFlexible", - "Description": "Pass True if the final price depends on the shipping method", + "Description": "Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -10395,7 +10791,7 @@ { "OriginalName": "currency", "ConvertedName": "Currency", - "Description": "Three-letter ISO 4217 currency code", + "Description": "Three-letter ISO 4217 currency code, or \u201CXTR\u201D for payments in Telegram Stars", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false @@ -10559,7 +10955,7 @@ { "OriginalName": "currency", "ConvertedName": "Currency", - "Description": "Three-letter ISO 4217 currency code", + "Description": "Three-letter ISO 4217 currency code, or \u201CXTR\u201D for payments in Telegram Stars", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false @@ -10575,7 +10971,7 @@ { "OriginalName": "invoice_payload", "ConvertedName": "InvoicePayload", - "Description": "Bot specified invoice payload", + "Description": "Bot-specified invoice payload", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false @@ -10616,6 +11012,57 @@ ] } }, + { + "Name": "RefundedPayment", + "Description": "This object contains basic information about a refunded payment.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "currency", + "ConvertedName": "Currency", + "Description": "Three-letter ISO 4217 currency code, or \u201CXTR\u201D for payments in Telegram Stars. Currently, always \u201CXTR\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "total_amount", + "ConvertedName": "TotalAmount", + "Description": "Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "invoice_payload", + "ConvertedName": "InvoicePayload", + "Description": "Bot-specified invoice payload", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "telegram_payment_charge_id", + "ConvertedName": "TelegramPaymentChargeId", + "Description": "Telegram payment identifier", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "provider_payment_charge_id", + "ConvertedName": "ProviderPaymentChargeId", + "Description": "Provider payment identifier", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + } + ] + ] + } + }, { "Name": "ShippingQuery", "Description": "This object contains information about an incoming shipping query.", @@ -10642,7 +11089,7 @@ { "OriginalName": "invoice_payload", "ConvertedName": "InvoicePayload", - "Description": "Bot specified invoice payload", + "Description": "Bot-specified invoice payload", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false @@ -10661,7 +11108,7 @@ }, { "Name": "PreCheckoutQuery", - "Description": "This object contains information about an incoming pre-checkout query.\nTelegram Passport is a unified authorization method for services that require personal identification. Users can upload their documents once, then instantly share their data with services that require real-world ID (finance, ICOs, etc.). Please see the manual for details.", + "Description": "This object contains information about an incoming pre-checkout query.", "Kind": { "Case": "Fields", "Fields": [ @@ -10685,7 +11132,7 @@ { "OriginalName": "currency", "ConvertedName": "Currency", - "Description": "Three-letter ISO 4217 currency code", + "Description": "Three-letter ISO 4217 currency code, or \u201CXTR\u201D for payments in Telegram Stars", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false @@ -10701,7 +11148,7 @@ { "OriginalName": "invoice_payload", "ConvertedName": "InvoicePayload", - "Description": "Bot specified invoice payload", + "Description": "Bot-specified invoice payload", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false @@ -10726,6 +11173,299 @@ ] } }, + { + "Name": "RevenueWithdrawalState", + "Description": "This object describes the state of a revenue withdrawal operation. Currently, it can be one of", + "Kind": { + "Case": "Cases", + "Fields": [ + [ + { + "Name": "Pending", + "CaseType": "RevenueWithdrawalStatePending" + }, + { + "Name": "Succeeded", + "CaseType": "RevenueWithdrawalStateSucceeded" + }, + { + "Name": "Failed", + "CaseType": "RevenueWithdrawalStateFailed" + } + ] + ] + } + }, + { + "Name": "RevenueWithdrawalStatePending", + "Description": "The withdrawal is in progress.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the state, always \u201Cpending\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ] + ] + } + }, + { + "Name": "RevenueWithdrawalStateSucceeded", + "Description": "The withdrawal succeeded.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the state, always \u201Csucceeded\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "date", + "ConvertedName": "Date", + "Description": "Date the withdrawal was completed in Unix time", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "DateTime", + "Optional": false + }, + { + "OriginalName": "url", + "ConvertedName": "Url", + "Description": "An HTTPS URL that can be used to see transaction details", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ] + ] + } + }, + { + "Name": "RevenueWithdrawalStateFailed", + "Description": "The withdrawal failed and the transaction was refunded.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the state, always \u201Cfailed\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ] + ] + } + }, + { + "Name": "TransactionPartner", + "Description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of", + "Kind": { + "Case": "Cases", + "Fields": [ + [ + { + "Name": "User", + "CaseType": "TransactionPartnerUser" + }, + { + "Name": "Fragment", + "CaseType": "TransactionPartnerFragment" + }, + { + "Name": "TelegramAds", + "CaseType": "TransactionPartnerTelegramAds" + }, + { + "Name": "Other", + "CaseType": "TransactionPartnerOther" + } + ] + ] + } + }, + { + "Name": "TransactionPartnerUser", + "Description": "Describes a transaction with a user.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the transaction partner, always \u201Cuser\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "user", + "ConvertedName": "User", + "Description": "Information about the user", + "OriginalFieldType": "User", + "ConvertedFieldType": "User", + "Optional": false + }, + { + "OriginalName": "invoice_payload", + "ConvertedName": "InvoicePayload", + "Description": "Bot-specified invoice payload", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + } + ] + ] + } + }, + { + "Name": "TransactionPartnerFragment", + "Description": "Describes a withdrawal transaction with Fragment.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the transaction partner, always \u201Cfragment\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "withdrawal_state", + "ConvertedName": "WithdrawalState", + "Description": "State of the transaction if the transaction is outgoing", + "OriginalFieldType": "RevenueWithdrawalState", + "ConvertedFieldType": "RevenueWithdrawalState", + "Optional": true + } + ] + ] + } + }, + { + "Name": "TransactionPartnerTelegramAds", + "Description": "Describes a withdrawal transaction to the Telegram Ads platform.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the transaction partner, always \u201Ctelegram_ads\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ] + ] + } + }, + { + "Name": "TransactionPartnerOther", + "Description": "Describes a transaction with an unknown source or recipient.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the transaction partner, always \u201Cother\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ] + ] + } + }, + { + "Name": "StarTransaction", + "Description": "Describes a Telegram Star transaction.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "id", + "ConvertedName": "Id", + "Description": "Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "amount", + "ConvertedName": "Amount", + "Description": "Number of Telegram Stars transferred by the transaction", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "date", + "ConvertedName": "Date", + "Description": "Date the transaction was created in Unix time", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "DateTime", + "Optional": false + }, + { + "OriginalName": "source", + "ConvertedName": "Source", + "Description": "Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions", + "OriginalFieldType": "TransactionPartner", + "ConvertedFieldType": "TransactionPartner", + "Optional": true + }, + { + "OriginalName": "receiver", + "ConvertedName": "Receiver", + "Description": "Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions", + "OriginalFieldType": "TransactionPartner", + "ConvertedFieldType": "TransactionPartner", + "Optional": true + } + ] + ] + } + }, + { + "Name": "StarTransactions", + "Description": "Contains a list of Telegram Star transactions.\nTelegram Passport is a unified authorization method for services that require personal identification. Users can upload their documents once, then instantly share their data with services that require real-world ID (finance, ICOs, etc.). Please see the manual for details.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "transactions", + "ConvertedName": "Transactions", + "Description": "The list of transactions", + "OriginalFieldType": "Array of StarTransaction", + "ConvertedFieldType": "StarTransaction[]", + "Optional": false + } + ] + ] + } + }, { "Name": "PassportData", "Description": "Describes Telegram Passport data shared with the bot by the user.", diff --git a/src/Funogram.Telegram/Api.fs b/src/Funogram.Telegram/Api.fs index e5fb3a6..c61ebed 100644 --- a/src/Funogram.Telegram/Api.fs +++ b/src/Funogram.Telegram/Api.fs @@ -117,8 +117,8 @@ let editMessageMediaBase chatId messageId inlineMessageId media replyMarkup = let editMessageReplyMarkupBase (chatId: ChatId option) messageId inlineMessageId replyMarkup = Req.EditMessageReplyMarkup.Make(?chatId = chatId, ?messageId = messageId, ?inlineMessageId = inlineMessageId, ?replyMarkup = replyMarkup) -let stopPollBase chatId messageId replyMarkup = - ({ ChatId = chatId; MessageId = messageId; ReplyMarkup = replyMarkup }: Req.StopPoll) +let stopPollBase chatId messageId replyMarkup businessConnectionId = + ({ ChatId = chatId; MessageId = messageId; ReplyMarkup = replyMarkup; BusinessConnectionId = businessConnectionId }: Req.StopPoll) let private deleteMessageBase chatId messageId = ({ ChatId = chatId; MessageId = messageId }: Req.DeleteMessage) diff --git a/src/Funogram.Telegram/Directory.Build.props b/src/Funogram.Telegram/Directory.Build.props index f1fc90c..9acc287 100644 --- a/src/Funogram.Telegram/Directory.Build.props +++ b/src/Funogram.Telegram/Directory.Build.props @@ -1,14 +1,15 @@ + - - 7.3.0.1 - Nikolay Matyushin - Funogram.Telegram - Funogram.Telegram - Funogram.Telegram - telegram;funogram;F#;bot - logo.png - https://github.com/Dolfik1/Funogram - MIT - true - - + + 7.7.0.0 + Nikolay Matyushin + Funogram.Telegram + Funogram.Telegram + Funogram.Telegram + telegram;funogram;F#;bot + logo.png + https://github.com/Dolfik1/Funogram + MIT + true + + \ No newline at end of file diff --git a/src/Funogram.Telegram/RequestsTypes.fs b/src/Funogram.Telegram/RequestsTypes.fs index ad66932..0423cb9 100644 --- a/src/Funogram.Telegram/RequestsTypes.fs +++ b/src/Funogram.Telegram/RequestsTypes.fs @@ -87,10 +87,11 @@ type SendMessage = LinkPreviewOptions: LinkPreviewOptions option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, text: string, ?businessConnectionId: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, text: string, ?businessConnectionId: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -101,13 +102,14 @@ type SendMessage = LinkPreviewOptions = linkPreviewOptions DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, text: string, ?businessConnectionId: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendMessage.Make(ChatId.Int chatId, text, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?linkPreviewOptions = linkPreviewOptions, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, text: string, ?businessConnectionId: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendMessage.Make(ChatId.String chatId, text, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?linkPreviewOptions = linkPreviewOptions, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, text: string, ?businessConnectionId: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendMessage.Make(ChatId.Int chatId, text, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?linkPreviewOptions = linkPreviewOptions, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, text: string, ?businessConnectionId: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendMessage.Make(ChatId.String chatId, text, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?linkPreviewOptions = linkPreviewOptions, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendMessage" @@ -170,12 +172,13 @@ type CopyMessage = Caption: string option ParseMode: ParseMode option CaptionEntities: MessageEntity[] option + ShowCaptionAboveMedia: bool option DisableNotification: bool option ProtectContent: bool option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, fromChatId: ChatId, messageId: int64, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, fromChatId: ChatId, messageId: int64, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -184,15 +187,16 @@ type CopyMessage = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia DisableNotification = disableNotification ProtectContent = protectContent ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, fromChatId: int64, messageId: int64, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - CopyMessage.Make(ChatId.Int chatId, ChatId.Int fromChatId, messageId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, fromChatId: string, messageId: int64, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - CopyMessage.Make(ChatId.String chatId, ChatId.String fromChatId, messageId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, fromChatId: int64, messageId: int64, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + CopyMessage.Make(ChatId.Int chatId, ChatId.Int fromChatId, messageId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?showCaptionAboveMedia = showCaptionAboveMedia, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, fromChatId: string, messageId: int64, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + CopyMessage.Make(ChatId.String chatId, ChatId.String fromChatId, messageId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?showCaptionAboveMedia = showCaptionAboveMedia, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "copyMessage" @@ -232,13 +236,15 @@ type SendPhoto = Caption: string option ParseMode: ParseMode option CaptionEntities: MessageEntity[] option + ShowCaptionAboveMedia: bool option HasSpoiler: bool option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, photo: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, photo: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -247,16 +253,18 @@ type SendPhoto = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia HasSpoiler = hasSpoiler DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, photo: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendPhoto.Make(ChatId.Int chatId, photo, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, photo: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendPhoto.Make(ChatId.String chatId, photo, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, photo: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendPhoto.Make(ChatId.Int chatId, photo, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?showCaptionAboveMedia = showCaptionAboveMedia, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, photo: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendPhoto.Make(ChatId.String chatId, photo, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?showCaptionAboveMedia = showCaptionAboveMedia, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendPhoto" @@ -275,10 +283,11 @@ type SendAudio = Thumbnail: InputFile option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, audio: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, audio: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -293,13 +302,14 @@ type SendAudio = Thumbnail = thumbnail DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, audio: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendAudio.Make(ChatId.Int chatId, audio, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?performer = performer, ?title = title, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, audio: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendAudio.Make(ChatId.String chatId, audio, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?performer = performer, ?title = title, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, audio: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendAudio.Make(ChatId.Int chatId, audio, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?performer = performer, ?title = title, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, audio: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendAudio.Make(ChatId.String chatId, audio, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?performer = performer, ?title = title, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendAudio" @@ -316,10 +326,11 @@ type SendDocument = DisableContentTypeDetection: bool option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, document: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, document: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -332,13 +343,14 @@ type SendDocument = DisableContentTypeDetection = disableContentTypeDetection DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, document: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendDocument.Make(ChatId.Int chatId, document, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableContentTypeDetection = disableContentTypeDetection, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, document: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendDocument.Make(ChatId.String chatId, document, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableContentTypeDetection = disableContentTypeDetection, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, document: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendDocument.Make(ChatId.Int chatId, document, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableContentTypeDetection = disableContentTypeDetection, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, document: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendDocument.Make(ChatId.String chatId, document, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableContentTypeDetection = disableContentTypeDetection, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendDocument" @@ -355,14 +367,16 @@ type SendVideo = Caption: string option ParseMode: ParseMode option CaptionEntities: MessageEntity[] option + ShowCaptionAboveMedia: bool option HasSpoiler: bool option SupportsStreaming: bool option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, video: InputFile, ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, video: InputFile, ?businessConnectionId: string, ?messageEffectId: string, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?showCaptionAboveMedia: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -375,17 +389,19 @@ type SendVideo = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia HasSpoiler = hasSpoiler SupportsStreaming = supportsStreaming DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, video: InputFile, ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVideo.Make(ChatId.Int chatId, video, ?businessConnectionId = businessConnectionId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?supportsStreaming = supportsStreaming, ?hasSpoiler = hasSpoiler, ?captionEntities = captionEntities, ?parseMode = parseMode, ?caption = caption, ?thumbnail = thumbnail, ?height = height, ?width = width, ?duration = duration, ?messageThreadId = messageThreadId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, video: InputFile, ?businessConnectionId: string, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVideo.Make(ChatId.String chatId, video, ?businessConnectionId = businessConnectionId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?supportsStreaming = supportsStreaming, ?hasSpoiler = hasSpoiler, ?captionEntities = captionEntities, ?parseMode = parseMode, ?caption = caption, ?thumbnail = thumbnail, ?height = height, ?width = width, ?duration = duration, ?messageThreadId = messageThreadId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, video: InputFile, ?businessConnectionId: string, ?messageEffectId: string, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?showCaptionAboveMedia: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideo.Make(ChatId.Int chatId, video, ?businessConnectionId = businessConnectionId, ?messageEffectId = messageEffectId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?supportsStreaming = supportsStreaming, ?hasSpoiler = hasSpoiler, ?showCaptionAboveMedia = showCaptionAboveMedia, ?captionEntities = captionEntities, ?parseMode = parseMode, ?caption = caption, ?thumbnail = thumbnail, ?height = height, ?width = width, ?duration = duration, ?messageThreadId = messageThreadId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, video: InputFile, ?businessConnectionId: string, ?messageEffectId: string, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?showCaptionAboveMedia: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideo.Make(ChatId.String chatId, video, ?businessConnectionId = businessConnectionId, ?messageEffectId = messageEffectId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?supportsStreaming = supportsStreaming, ?hasSpoiler = hasSpoiler, ?showCaptionAboveMedia = showCaptionAboveMedia, ?captionEntities = captionEntities, ?parseMode = parseMode, ?caption = caption, ?thumbnail = thumbnail, ?height = height, ?width = width, ?duration = duration, ?messageThreadId = messageThreadId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVideo" @@ -402,13 +418,15 @@ type SendAnimation = Caption: string option ParseMode: ParseMode option CaptionEntities: MessageEntity[] option + ShowCaptionAboveMedia: bool option HasSpoiler: bool option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, animation: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, animation: InputFile, ?businessConnectionId: string, ?messageEffectId: string, ?protectContent: bool, ?disableNotification: bool, ?hasSpoiler: bool, ?showCaptionAboveMedia: bool, ?captionEntities: MessageEntity[], ?caption: string, ?replyParameters: ReplyParameters, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?parseMode: ParseMode, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -421,16 +439,18 @@ type SendAnimation = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia HasSpoiler = hasSpoiler DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, animation: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendAnimation.Make(ChatId.Int chatId, animation, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, animation: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendAnimation.Make(ChatId.String chatId, animation, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, animation: InputFile, ?businessConnectionId: string, ?messageEffectId: string, ?protectContent: bool, ?disableNotification: bool, ?hasSpoiler: bool, ?showCaptionAboveMedia: bool, ?captionEntities: MessageEntity[], ?caption: string, ?replyParameters: ReplyParameters, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?parseMode: ParseMode, ?replyMarkup: Markup) = + SendAnimation.Make(ChatId.Int chatId, animation, ?businessConnectionId = businessConnectionId, ?messageEffectId = messageEffectId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?hasSpoiler = hasSpoiler, ?showCaptionAboveMedia = showCaptionAboveMedia, ?captionEntities = captionEntities, ?caption = caption, ?replyParameters = replyParameters, ?thumbnail = thumbnail, ?height = height, ?width = width, ?duration = duration, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?replyMarkup = replyMarkup) + static member Make(chatId: string, animation: InputFile, ?businessConnectionId: string, ?messageEffectId: string, ?protectContent: bool, ?disableNotification: bool, ?hasSpoiler: bool, ?showCaptionAboveMedia: bool, ?captionEntities: MessageEntity[], ?caption: string, ?replyParameters: ReplyParameters, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?parseMode: ParseMode, ?replyMarkup: Markup) = + SendAnimation.Make(ChatId.String chatId, animation, ?businessConnectionId = businessConnectionId, ?messageEffectId = messageEffectId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?hasSpoiler = hasSpoiler, ?showCaptionAboveMedia = showCaptionAboveMedia, ?captionEntities = captionEntities, ?caption = caption, ?replyParameters = replyParameters, ?thumbnail = thumbnail, ?height = height, ?width = width, ?duration = duration, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendAnimation" @@ -446,10 +466,11 @@ type SendVoice = Duration: int64 option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, voice: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, voice: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -461,13 +482,14 @@ type SendVoice = Duration = duration DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, voice: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVoice.Make(ChatId.Int chatId, voice, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, voice: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVoice.Make(ChatId.String chatId, voice, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, voice: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVoice.Make(ChatId.Int chatId, voice, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, voice: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVoice.Make(ChatId.String chatId, voice, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVoice" @@ -482,10 +504,11 @@ type SendVideoNote = Thumbnail: InputFile option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, videoNote: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, videoNote: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -496,16 +519,52 @@ type SendVideoNote = Thumbnail = thumbnail DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, videoNote: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVideoNote.Make(ChatId.Int chatId, videoNote, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, videoNote: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVideoNote.Make(ChatId.String chatId, videoNote, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, videoNote: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideoNote.Make(ChatId.Int chatId, videoNote, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, videoNote: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideoNote.Make(ChatId.String chatId, videoNote, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVideoNote" +type SendPaidMedia = + { + ChatId: ChatId + StarCount: int64 + Media: InputPaidMedia[] + Caption: string option + ParseMode: ParseMode option + CaptionEntities: MessageEntity[] option + ShowCaptionAboveMedia: bool option + DisableNotification: bool option + ProtectContent: bool option + ReplyParameters: ReplyParameters option + ReplyMarkup: Markup option + } + static member Make(chatId: ChatId, starCount: int64, media: InputPaidMedia[], ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + { + ChatId = chatId + StarCount = starCount + Media = media + Caption = caption + ParseMode = parseMode + CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia + DisableNotification = disableNotification + ProtectContent = protectContent + ReplyParameters = replyParameters + ReplyMarkup = replyMarkup + } + static member Make(chatId: int64, starCount: int64, media: InputPaidMedia[], ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendPaidMedia.Make(ChatId.Int chatId, starCount, media, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?showCaptionAboveMedia = showCaptionAboveMedia, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, starCount: int64, media: InputPaidMedia[], ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendPaidMedia.Make(ChatId.String chatId, starCount, media, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?showCaptionAboveMedia = showCaptionAboveMedia, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + interface IRequestBase with + member _.MethodName = "sendPaidMedia" + type SendMediaGroup = { BusinessConnectionId: string option @@ -514,9 +573,10 @@ type SendMediaGroup = Media: InputMedia[] DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option } - static member Make(chatId: ChatId, media: InputMedia[], ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = + static member Make(chatId: ChatId, media: InputMedia[], ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -524,12 +584,13 @@ type SendMediaGroup = Media = media DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters } - static member Make(chatId: int64, media: InputMedia[], ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = - SendMediaGroup.Make(ChatId.Int chatId, media, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters) - static member Make(chatId: string, media: InputMedia[], ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = - SendMediaGroup.Make(ChatId.String chatId, media, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters) + static member Make(chatId: int64, media: InputMedia[], ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters) = + SendMediaGroup.Make(ChatId.Int chatId, media, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters) + static member Make(chatId: string, media: InputMedia[], ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters) = + SendMediaGroup.Make(ChatId.String chatId, media, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters) interface IRequestBase with member _.MethodName = "sendMediaGroup" @@ -546,10 +607,11 @@ type SendLocation = ProximityAlertRadius: int64 option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, latitude: float, longitude: float, ?businessConnectionId: string, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, latitude: float, longitude: float, ?businessConnectionId: string, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -562,13 +624,14 @@ type SendLocation = ProximityAlertRadius = proximityAlertRadius DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, latitude: float, longitude: float, ?businessConnectionId: string, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendLocation.Make(ChatId.Int chatId, latitude, longitude, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?horizontalAccuracy = horizontalAccuracy, ?livePeriod = livePeriod, ?heading = heading, ?proximityAlertRadius = proximityAlertRadius, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, latitude: float, longitude: float, ?businessConnectionId: string, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendLocation.Make(ChatId.String chatId, latitude, longitude, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?horizontalAccuracy = horizontalAccuracy, ?livePeriod = livePeriod, ?heading = heading, ?proximityAlertRadius = proximityAlertRadius, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, latitude: float, longitude: float, ?businessConnectionId: string, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendLocation.Make(ChatId.Int chatId, latitude, longitude, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?horizontalAccuracy = horizontalAccuracy, ?livePeriod = livePeriod, ?heading = heading, ?proximityAlertRadius = proximityAlertRadius, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, latitude: float, longitude: float, ?businessConnectionId: string, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendLocation.Make(ChatId.String chatId, latitude, longitude, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?horizontalAccuracy = horizontalAccuracy, ?livePeriod = livePeriod, ?heading = heading, ?proximityAlertRadius = proximityAlertRadius, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendLocation" @@ -587,10 +650,11 @@ type SendVenue = GooglePlaceType: string option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, latitude: float, longitude: float, title: string, address: string, ?businessConnectionId: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, latitude: float, longitude: float, title: string, address: string, ?businessConnectionId: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -605,13 +669,14 @@ type SendVenue = GooglePlaceType = googlePlaceType DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, latitude: float, longitude: float, title: string, address: string, ?businessConnectionId: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVenue.Make(ChatId.Int chatId, latitude, longitude, title, address, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?foursquareId = foursquareId, ?foursquareType = foursquareType, ?googlePlaceId = googlePlaceId, ?googlePlaceType = googlePlaceType, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, latitude: float, longitude: float, title: string, address: string, ?businessConnectionId: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendVenue.Make(ChatId.String chatId, latitude, longitude, title, address, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?foursquareId = foursquareId, ?foursquareType = foursquareType, ?googlePlaceId = googlePlaceId, ?googlePlaceType = googlePlaceType, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, latitude: float, longitude: float, title: string, address: string, ?businessConnectionId: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVenue.Make(ChatId.Int chatId, latitude, longitude, title, address, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?foursquareId = foursquareId, ?foursquareType = foursquareType, ?googlePlaceId = googlePlaceId, ?googlePlaceType = googlePlaceType, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, latitude: float, longitude: float, title: string, address: string, ?businessConnectionId: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVenue.Make(ChatId.String chatId, latitude, longitude, title, address, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?foursquareId = foursquareId, ?foursquareType = foursquareType, ?googlePlaceId = googlePlaceId, ?googlePlaceType = googlePlaceType, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVenue" @@ -626,10 +691,11 @@ type SendContact = Vcard: string option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, phoneNumber: string, firstName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, phoneNumber: string, firstName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -640,13 +706,14 @@ type SendContact = Vcard = vcard DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, phoneNumber: string, firstName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendContact.Make(ChatId.Int chatId, phoneNumber, firstName, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, phoneNumber: string, firstName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendContact.Make(ChatId.String chatId, phoneNumber, firstName, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, phoneNumber: string, firstName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendContact.Make(ChatId.Int chatId, phoneNumber, firstName, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, phoneNumber: string, firstName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendContact.Make(ChatId.String chatId, phoneNumber, firstName, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendContact" @@ -671,10 +738,11 @@ type SendPoll = IsClosed: bool option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - 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) = + static member Make(chatId: ChatId, question: string, options: InputPollOption[], ?businessConnectionId: string, ?messageEffectId: 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 @@ -695,13 +763,14 @@ type SendPoll = IsClosed = isClosed DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters 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) + static member Make(chatId: int64, question: string, options: InputPollOption[], ?businessConnectionId: string, ?messageEffectId: 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, ?messageEffectId = messageEffectId, ?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, ?messageEffectId: 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, ?messageEffectId = messageEffectId, ?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" @@ -713,10 +782,11 @@ type SendDice = Emoji: string option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -724,13 +794,14 @@ type SendDice = Emoji = emoji DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendDice.Make(ChatId.Int chatId, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendDice.Make(ChatId.String chatId, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendDice.Make(ChatId.Int chatId, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendDice.Make(ChatId.String chatId, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendDice" @@ -1741,6 +1812,7 @@ type GetMyDefaultAdministratorRights = type EditMessageText = { + BusinessConnectionId: string option ChatId: ChatId option MessageId: int64 option InlineMessageId: string option @@ -1750,8 +1822,9 @@ type EditMessageText = LinkPreviewOptions: LinkPreviewOptions option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(text: string, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(text: string, ?businessConnectionId: string, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?replyMarkup: InlineKeyboardMarkup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageId = messageId InlineMessageId = inlineMessageId @@ -1766,41 +1839,43 @@ type EditMessageText = type EditMessageCaption = { + BusinessConnectionId: string option ChatId: ChatId option MessageId: int64 option InlineMessageId: string option Caption: string option ParseMode: ParseMode option CaptionEntities: MessageEntity[] option + ShowCaptionAboveMedia: bool option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup) = + static member Make(?businessConnectionId: string, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?replyMarkup: InlineKeyboardMarkup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageId = messageId InlineMessageId = inlineMessageId Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia ReplyMarkup = replyMarkup } - static member Make(?chatId: int64, ?messageId: int64, ?inlineMessageId: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup) = - EditMessageCaption.Make(?chatId = (chatId |> Option.map ChatId.Int), ?messageId = messageId, ?inlineMessageId = inlineMessageId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?replyMarkup = replyMarkup) - static member Make(?chatId: string, ?messageId: int64, ?inlineMessageId: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup) = - EditMessageCaption.Make(?chatId = (chatId |> Option.map ChatId.String), ?messageId = messageId, ?inlineMessageId = inlineMessageId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "editMessageCaption" type EditMessageMedia = { + BusinessConnectionId: string option ChatId: ChatId option MessageId: int64 option InlineMessageId: string option Media: InputMedia ReplyMarkup: InlineKeyboardMarkup option } - static member Make(media: InputMedia, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(media: InputMedia, ?businessConnectionId: string, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?replyMarkup: InlineKeyboardMarkup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageId = messageId InlineMessageId = inlineMessageId @@ -1812,6 +1887,7 @@ type EditMessageMedia = type EditMessageLiveLocation = { + BusinessConnectionId: string option ChatId: ChatId option MessageId: int64 option InlineMessageId: string option @@ -1823,8 +1899,9 @@ type EditMessageLiveLocation = ProximityAlertRadius: int64 option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(latitude: float, longitude: float, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?livePeriod: int64, ?horizontalAccuracy: float, ?heading: int64, ?proximityAlertRadius: int64, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(latitude: float, longitude: float, ?businessConnectionId: string, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?livePeriod: int64, ?horizontalAccuracy: float, ?heading: int64, ?proximityAlertRadius: int64, ?replyMarkup: InlineKeyboardMarkup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageId = messageId InlineMessageId = inlineMessageId @@ -1841,62 +1918,60 @@ type EditMessageLiveLocation = type StopMessageLiveLocation = { + BusinessConnectionId: string option ChatId: ChatId option MessageId: int64 option InlineMessageId: string option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(?businessConnectionId: string, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?replyMarkup: InlineKeyboardMarkup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageId = messageId InlineMessageId = inlineMessageId ReplyMarkup = replyMarkup } - static member Make(?chatId: int64, ?messageId: int64, ?inlineMessageId: string, ?replyMarkup: InlineKeyboardMarkup) = - StopMessageLiveLocation.Make(?chatId = (chatId |> Option.map ChatId.Int), ?messageId = messageId, ?inlineMessageId = inlineMessageId, ?replyMarkup = replyMarkup) - static member Make(?chatId: string, ?messageId: int64, ?inlineMessageId: string, ?replyMarkup: InlineKeyboardMarkup) = - StopMessageLiveLocation.Make(?chatId = (chatId |> Option.map ChatId.String), ?messageId = messageId, ?inlineMessageId = inlineMessageId, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "stopMessageLiveLocation" type EditMessageReplyMarkup = { + BusinessConnectionId: string option ChatId: ChatId option MessageId: int64 option InlineMessageId: string option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(?businessConnectionId: string, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?replyMarkup: InlineKeyboardMarkup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageId = messageId InlineMessageId = inlineMessageId ReplyMarkup = replyMarkup } - static member Make(?chatId: int64, ?messageId: int64, ?inlineMessageId: string, ?replyMarkup: InlineKeyboardMarkup) = - EditMessageReplyMarkup.Make(?chatId = (chatId |> Option.map ChatId.Int), ?messageId = messageId, ?inlineMessageId = inlineMessageId, ?replyMarkup = replyMarkup) - static member Make(?chatId: string, ?messageId: int64, ?inlineMessageId: string, ?replyMarkup: InlineKeyboardMarkup) = - EditMessageReplyMarkup.Make(?chatId = (chatId |> Option.map ChatId.String), ?messageId = messageId, ?inlineMessageId = inlineMessageId, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "editMessageReplyMarkup" type StopPoll = { + BusinessConnectionId: string option ChatId: ChatId MessageId: int64 ReplyMarkup: InlineKeyboardMarkup option } - static member Make(chatId: ChatId, messageId: int64, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(chatId: ChatId, messageId: int64, ?businessConnectionId: string, ?replyMarkup: InlineKeyboardMarkup) = { + BusinessConnectionId = businessConnectionId ChatId = chatId MessageId = messageId ReplyMarkup = replyMarkup } - static member Make(chatId: int64, messageId: int64, ?replyMarkup: InlineKeyboardMarkup) = - StopPoll.Make(ChatId.Int chatId, messageId, ?replyMarkup = replyMarkup) - static member Make(chatId: string, messageId: int64, ?replyMarkup: InlineKeyboardMarkup) = - StopPoll.Make(ChatId.String chatId, messageId, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, messageId: int64, ?businessConnectionId: string, ?replyMarkup: InlineKeyboardMarkup) = + StopPoll.Make(ChatId.Int chatId, messageId, ?businessConnectionId = businessConnectionId, ?replyMarkup = replyMarkup) + static member Make(chatId: string, messageId: int64, ?businessConnectionId: string, ?replyMarkup: InlineKeyboardMarkup) = + StopPoll.Make(ChatId.String chatId, messageId, ?businessConnectionId = businessConnectionId, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "stopPoll" @@ -1943,10 +2018,11 @@ type SendSticker = Emoji: string option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, sticker: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, sticker: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -1955,13 +2031,14 @@ type SendSticker = Emoji = emoji DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, sticker: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendSticker.Make(ChatId.Int chatId, sticker, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) - static member Make(chatId: string, sticker: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = - SendSticker.Make(ChatId.String chatId, sticker, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, sticker: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendSticker.Make(ChatId.Int chatId, sticker, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, sticker: InputFile, ?businessConnectionId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendSticker.Make(ChatId.String chatId, sticker, ?businessConnectionId = businessConnectionId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?messageEffectId = messageEffectId, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendSticker" @@ -2213,7 +2290,7 @@ type SendInvoice = Title: string Description: string Payload: string - ProviderToken: string + ProviderToken: string option Currency: string Prices: LabeledPrice[] MaxTipAmount: int64 option @@ -2233,10 +2310,11 @@ type SendInvoice = IsFlexible: bool option DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(chatId: ChatId, title: string, description: string, payload: string, providerToken: string, currency: string, prices: LabeledPrice[], ?protectContent: bool, ?disableNotification: bool, ?isFlexible: bool, ?sendEmailToProvider: bool, ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?needName: bool, ?photoSize: int64, ?photoWidth: int64, ?replyParameters: ReplyParameters, ?photoUrl: string, ?providerData: string, ?startParameter: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?messageThreadId: int64, ?photoHeight: int64, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(chatId: ChatId, title: string, description: string, payload: string, currency: string, prices: LabeledPrice[], ?messageEffectId: string, ?protectContent: bool, ?disableNotification: bool, ?isFlexible: bool, ?sendEmailToProvider: bool, ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?needName: bool, ?photoSize: int64, ?photoWidth: int64, ?replyParameters: ReplyParameters, ?photoUrl: string, ?providerData: string, ?startParameter: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?providerToken: string, ?messageThreadId: int64, ?photoHeight: int64, ?replyMarkup: InlineKeyboardMarkup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -2263,13 +2341,14 @@ type SendInvoice = IsFlexible = isFlexible DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, title: string, description: string, payload: string, providerToken: string, currency: string, prices: LabeledPrice[], ?protectContent: bool, ?disableNotification: bool, ?isFlexible: bool, ?sendEmailToProvider: bool, ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?needName: bool, ?photoSize: int64, ?photoWidth: int64, ?replyParameters: ReplyParameters, ?photoUrl: string, ?providerData: string, ?startParameter: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?messageThreadId: int64, ?photoHeight: int64, ?replyMarkup: InlineKeyboardMarkup) = - SendInvoice.Make(ChatId.Int chatId, title, description, payload, providerToken, currency, prices, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isFlexible = isFlexible, ?sendEmailToProvider = sendEmailToProvider, ?sendPhoneNumberToProvider = sendPhoneNumberToProvider, ?needShippingAddress = needShippingAddress, ?needEmail = needEmail, ?needPhoneNumber = needPhoneNumber, ?needName = needName, ?photoSize = photoSize, ?photoWidth = photoWidth, ?replyParameters = replyParameters, ?photoUrl = photoUrl, ?providerData = providerData, ?startParameter = startParameter, ?suggestedTipAmounts = suggestedTipAmounts, ?maxTipAmount = maxTipAmount, ?messageThreadId = messageThreadId, ?photoHeight = photoHeight, ?replyMarkup = replyMarkup) - static member Make(chatId: string, title: string, description: string, payload: string, providerToken: string, currency: string, prices: LabeledPrice[], ?protectContent: bool, ?disableNotification: bool, ?isFlexible: bool, ?sendEmailToProvider: bool, ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?needName: bool, ?photoSize: int64, ?photoWidth: int64, ?replyParameters: ReplyParameters, ?photoUrl: string, ?providerData: string, ?startParameter: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?messageThreadId: int64, ?photoHeight: int64, ?replyMarkup: InlineKeyboardMarkup) = - SendInvoice.Make(ChatId.String chatId, title, description, payload, providerToken, currency, prices, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isFlexible = isFlexible, ?sendEmailToProvider = sendEmailToProvider, ?sendPhoneNumberToProvider = sendPhoneNumberToProvider, ?needShippingAddress = needShippingAddress, ?needEmail = needEmail, ?needPhoneNumber = needPhoneNumber, ?needName = needName, ?photoSize = photoSize, ?photoWidth = photoWidth, ?replyParameters = replyParameters, ?photoUrl = photoUrl, ?providerData = providerData, ?startParameter = startParameter, ?suggestedTipAmounts = suggestedTipAmounts, ?maxTipAmount = maxTipAmount, ?messageThreadId = messageThreadId, ?photoHeight = photoHeight, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, title: string, description: string, payload: string, currency: string, prices: LabeledPrice[], ?messageEffectId: string, ?protectContent: bool, ?disableNotification: bool, ?isFlexible: bool, ?sendEmailToProvider: bool, ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?needName: bool, ?photoSize: int64, ?photoWidth: int64, ?replyParameters: ReplyParameters, ?photoUrl: string, ?providerData: string, ?startParameter: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?providerToken: string, ?messageThreadId: int64, ?photoHeight: int64, ?replyMarkup: InlineKeyboardMarkup) = + SendInvoice.Make(ChatId.Int chatId, title, description, payload, currency, prices, ?messageEffectId = messageEffectId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isFlexible = isFlexible, ?sendEmailToProvider = sendEmailToProvider, ?sendPhoneNumberToProvider = sendPhoneNumberToProvider, ?needShippingAddress = needShippingAddress, ?needEmail = needEmail, ?needPhoneNumber = needPhoneNumber, ?needName = needName, ?photoSize = photoSize, ?photoWidth = photoWidth, ?replyParameters = replyParameters, ?photoUrl = photoUrl, ?providerData = providerData, ?startParameter = startParameter, ?suggestedTipAmounts = suggestedTipAmounts, ?maxTipAmount = maxTipAmount, ?providerToken = providerToken, ?messageThreadId = messageThreadId, ?photoHeight = photoHeight, ?replyMarkup = replyMarkup) + static member Make(chatId: string, title: string, description: string, payload: string, currency: string, prices: LabeledPrice[], ?messageEffectId: string, ?protectContent: bool, ?disableNotification: bool, ?isFlexible: bool, ?sendEmailToProvider: bool, ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?needName: bool, ?photoSize: int64, ?photoWidth: int64, ?replyParameters: ReplyParameters, ?photoUrl: string, ?providerData: string, ?startParameter: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?providerToken: string, ?messageThreadId: int64, ?photoHeight: int64, ?replyMarkup: InlineKeyboardMarkup) = + SendInvoice.Make(ChatId.String chatId, title, description, payload, currency, prices, ?messageEffectId = messageEffectId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isFlexible = isFlexible, ?sendEmailToProvider = sendEmailToProvider, ?sendPhoneNumberToProvider = sendPhoneNumberToProvider, ?needShippingAddress = needShippingAddress, ?needEmail = needEmail, ?needPhoneNumber = needPhoneNumber, ?needName = needName, ?photoSize = photoSize, ?photoWidth = photoWidth, ?replyParameters = replyParameters, ?photoUrl = photoUrl, ?providerData = providerData, ?startParameter = startParameter, ?suggestedTipAmounts = suggestedTipAmounts, ?maxTipAmount = maxTipAmount, ?providerToken = providerToken, ?messageThreadId = messageThreadId, ?photoHeight = photoHeight, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendInvoice" @@ -2278,7 +2357,7 @@ type CreateInvoiceLink = Title: string Description: string Payload: string - ProviderToken: string + ProviderToken: string option Currency: string Prices: LabeledPrice[] MaxTipAmount: int64 option @@ -2296,7 +2375,7 @@ type CreateInvoiceLink = SendEmailToProvider: bool option IsFlexible: bool option } - static member Make(title: string, description: string, payload: string, providerToken: string, currency: string, prices: LabeledPrice[], ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?needName: bool, ?photoHeight: int64, ?photoUrl: string, ?photoSize: int64, ?sendEmailToProvider: bool, ?providerData: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?photoWidth: int64, ?isFlexible: bool) = + static member Make(title: string, description: string, payload: string, currency: string, prices: LabeledPrice[], ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?needName: bool, ?photoHeight: int64, ?photoUrl: string, ?photoSize: int64, ?sendEmailToProvider: bool, ?providerData: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?providerToken: string, ?photoWidth: int64, ?isFlexible: bool) = { Title = title Description = description @@ -2354,6 +2433,32 @@ type AnswerPreCheckoutQuery = interface IRequestBase with member _.MethodName = "answerPreCheckoutQuery" +type GetStarTransactions = + { + Offset: int64 option + Limit: int64 option + } + static member Make(?offset: int64, ?limit: int64) = + { + Offset = offset + Limit = limit + } + interface IRequestBase with + member _.MethodName = "getStarTransactions" + +type RefundStarPayment = + { + UserId: int64 + TelegramPaymentChargeId: string + } + static member Make(userId: int64, telegramPaymentChargeId: string) = + { + UserId = userId + TelegramPaymentChargeId = telegramPaymentChargeId + } + interface IRequestBase with + member _.MethodName = "refundStarPayment" + type SetPassportDataErrors = { UserId: int64 @@ -2375,10 +2480,11 @@ type SendGame = GameShortName: string DisableNotification: bool option ProtectContent: bool option + MessageEffectId: string option ReplyParameters: ReplyParameters option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(chatId: int64, gameShortName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(chatId: int64, gameShortName: string, ?businessConnectionId: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: InlineKeyboardMarkup) = { BusinessConnectionId = businessConnectionId ChatId = chatId @@ -2386,6 +2492,7 @@ type SendGame = GameShortName = gameShortName DisableNotification = disableNotification ProtectContent = protectContent + MessageEffectId = messageEffectId ReplyParameters = replyParameters ReplyMarkup = replyMarkup } diff --git a/src/Funogram.Telegram/Types.fs b/src/Funogram.Telegram/Types.fs index d5f08b0..40b8776 100644 --- a/src/Funogram.Telegram/Types.fs +++ b/src/Funogram.Telegram/Types.fs @@ -408,6 +408,9 @@ and [] ChatFullInfo = /// Default chat member permissions, for groups and supergroups [] Permissions: ChatPermissions option + /// True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. + [] + CanSendPaidMedia: bool option /// For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds [] SlowModeDelay: int64 option @@ -445,7 +448,7 @@ and [] ChatFullInfo = [] Location: ChatLocation option } - 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) = + static member Create(id: int64, ``type``: string, accentColorId: int64, maxReactionCount: int64, ?joinToSendMessages: bool, ?joinByRequest: bool, ?description: string, ?inviteLink: string, ?pinnedMessage: Message, ?permissions: ChatPermissions, ?canSendPaidMedia: bool, ?slowModeDelay: int64, ?messageAutoDeleteTime: int64, ?hasRestrictedVoiceAndVideoMessages: bool, ?hasAggressiveAntiSpamEnabled: bool, ?hasHiddenMembers: bool, ?hasProtectedContent: bool, ?hasVisibleHistory: bool, ?stickerSetName: string, ?canSetStickerSet: bool, ?customEmojiStickerSetName: string, ?unrestrictBoostCount: 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`` @@ -457,17 +460,18 @@ and [] ChatFullInfo = InviteLink = inviteLink PinnedMessage = pinnedMessage Permissions = permissions + CanSendPaidMedia = canSendPaidMedia SlowModeDelay = slowModeDelay - UnrestrictBoostCount = unrestrictBoostCount - HasAggressiveAntiSpamEnabled = hasAggressiveAntiSpamEnabled + MessageAutoDeleteTime = messageAutoDeleteTime HasRestrictedVoiceAndVideoMessages = hasRestrictedVoiceAndVideoMessages + HasAggressiveAntiSpamEnabled = hasAggressiveAntiSpamEnabled HasHiddenMembers = hasHiddenMembers HasProtectedContent = hasProtectedContent HasVisibleHistory = hasVisibleHistory StickerSetName = stickerSetName CanSetStickerSet = canSetStickerSet CustomEmojiStickerSetName = customEmojiStickerSetName - MessageAutoDeleteTime = messageAutoDeleteTime + UnrestrictBoostCount = unrestrictBoostCount HasPrivateForwards = hasPrivateForwards EmojiStatusExpirationDate = emojiStatusExpirationDate LinkedChatId = linkedChatId @@ -570,6 +574,9 @@ and [] Message = /// Options used for link preview generation for the message, if it is a text message and link preview options were changed [] LinkPreviewOptions: LinkPreviewOptions option + /// Unique identifier of the message effect added to the message + [] + EffectId: string option /// Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set [] Animation: Animation option @@ -579,6 +586,9 @@ and [] Message = /// Message is a general file, information about the file [] Document: Document option + /// Message contains paid media; information about the paid media + [] + PaidMedia: PaidMediaInfo option /// Message is a photo, available sizes of the photo [] Photo: PhotoSize[] option @@ -597,12 +607,15 @@ and [] Message = /// Message is a voice message, information about the file [] Voice: Voice option - /// Caption for the animation, audio, document, photo, video or voice + /// Caption for the animation, audio, document, paid media, photo, video or voice [] Caption: string option /// For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption [] CaptionEntities: MessageEntity[] option + /// True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// True, if the message media is covered by a spoiler animation [] HasMediaSpoiler: bool option @@ -666,6 +679,9 @@ and [] Message = /// Message is a service message about a successful payment, information about the payment. More about payments » [] SuccessfulPayment: SuccessfulPayment option + /// Message is a service message about a refunded payment, information about the payment. More about payments » + [] + RefundedPayment: RefundedPayment option /// Service message: users were shared with the bot [] UsersShared: UsersShared option @@ -739,31 +755,32 @@ and [] Message = [] ReplyMarkup: InlineKeyboardMarkup option } - static member Create(messageId: int64, date: DateTime, chat: Chat, ?chatShared: ChatShared, ?usersShared: UsersShared, ?successfulPayment: SuccessfulPayment, ?invoice: Invoice, ?pinnedMessage: MaybeInaccessibleMessage, ?migrateFromChatId: int64, ?migrateToChatId: int64, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?channelChatCreated: bool, ?supergroupChatCreated: bool, ?groupChatCreated: bool, ?deleteChatPhoto: bool, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?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) = + static member Create(messageId: int64, date: DateTime, chat: Chat, ?usersShared: UsersShared, ?refundedPayment: RefundedPayment, ?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[], ?location: Location, ?channelChatCreated: bool, ?connectedWebsite: string, ?writeAccessAllowed: WriteAccessAllowed, ?passportData: PassportData, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?giveawayCompleted: GiveawayCompleted, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?giveawayCreated: GiveawayCreated, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?generalForumTopicHidden: GeneralForumTopicHidden, ?forumTopicReopened: ForumTopicReopened, ?forumTopicClosed: ForumTopicClosed, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?chatBackgroundSet: ChatBackground, ?boostAdded: ChatBoostAdded, ?proximityAlertTriggered: ProximityAlertTriggered, ?venue: Venue, ?poll: Poll, ?game: Game, ?dice: Dice, ?isFromOffline: bool, ?hasProtectedContent: bool, ?editDate: int64, ?viaBot: User, ?replyToStory: Story, ?quote: TextQuote, ?externalReply: ExternalReplyInfo, ?replyToMessage: Message, ?isAutomaticForward: bool, ?isTopicMessage: bool, ?forwardOrigin: MessageOrigin, ?businessConnectionId: string, ?senderBusinessBot: User, ?senderBoostCount: int64, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?mediaGroupId: string, ?webAppData: WebAppData, ?authorSignature: string, ?entities: MessageEntity[], ?contact: Contact, ?hasMediaSpoiler: bool, ?showCaptionAboveMedia: bool, ?captionEntities: MessageEntity[], ?caption: string, ?voice: Voice, ?videoNote: VideoNote, ?video: Video, ?story: Story, ?sticker: Sticker, ?photo: PhotoSize[], ?paidMedia: PaidMediaInfo, ?document: Document, ?audio: Audio, ?animation: Animation, ?effectId: string, ?linkPreviewOptions: LinkPreviewOptions, ?text: string, ?replyMarkup: InlineKeyboardMarkup) = { MessageId = messageId Date = date Chat = chat - ChatShared = chatShared UsersShared = usersShared + RefundedPayment = refundedPayment SuccessfulPayment = successfulPayment Invoice = invoice PinnedMessage = pinnedMessage MigrateFromChatId = migrateFromChatId MigrateToChatId = migrateToChatId MessageAutoDeleteTimerChanged = messageAutoDeleteTimerChanged - ChannelChatCreated = channelChatCreated SupergroupChatCreated = supergroupChatCreated + ChatShared = chatShared GroupChatCreated = groupChatCreated DeleteChatPhoto = deleteChatPhoto NewChatPhoto = newChatPhoto NewChatTitle = newChatTitle LeftChatMember = leftChatMember NewChatMembers = newChatMembers + Location = location + ChannelChatCreated = channelChatCreated ConnectedWebsite = connectedWebsite WriteAccessAllowed = writeAccessAllowed PassportData = passportData - ProximityAlertTriggered = proximityAlertTriggered VideoChatParticipantsInvited = videoChatParticipantsInvited VideoChatEnded = videoChatEnded VideoChatStarted = videoChatStarted @@ -771,8 +788,8 @@ and [] Message = GiveawayCompleted = giveawayCompleted GiveawayWinners = giveawayWinners Giveaway = giveaway - Location = location GiveawayCreated = giveawayCreated + GeneralForumTopicUnhidden = generalForumTopicUnhidden GeneralForumTopicHidden = generalForumTopicHidden ForumTopicReopened = forumTopicReopened ForumTopicClosed = forumTopicClosed @@ -780,10 +797,12 @@ and [] Message = ForumTopicCreated = forumTopicCreated ChatBackgroundSet = chatBackgroundSet BoostAdded = boostAdded - GeneralForumTopicUnhidden = generalForumTopicUnhidden + ProximityAlertTriggered = proximityAlertTriggered Venue = venue Poll = poll Game = game + Dice = dice + IsFromOffline = isFromOffline HasProtectedContent = hasProtectedContent EditDate = editDate ViaBot = viaBot @@ -791,8 +810,8 @@ and [] Message = Quote = quote ExternalReply = externalReply ReplyToMessage = replyToMessage - IsFromOffline = isFromOffline IsAutomaticForward = isAutomaticForward + IsTopicMessage = isTopicMessage ForwardOrigin = forwardOrigin BusinessConnectionId = businessConnectionId SenderBusinessBot = senderBusinessBot @@ -800,27 +819,28 @@ and [] Message = SenderChat = senderChat From = from MessageThreadId = messageThreadId - IsTopicMessage = isTopicMessage - WebAppData = webAppData MediaGroupId = mediaGroupId - Text = text - Dice = dice + WebAppData = webAppData + AuthorSignature = authorSignature + Entities = entities Contact = contact HasMediaSpoiler = hasMediaSpoiler + ShowCaptionAboveMedia = showCaptionAboveMedia CaptionEntities = captionEntities Caption = caption Voice = voice VideoNote = videoNote - AuthorSignature = authorSignature Video = video + Story = story Sticker = sticker Photo = photo + PaidMedia = paidMedia Document = document Audio = audio Animation = animation + EffectId = effectId LinkPreviewOptions = linkPreviewOptions - Entities = entities - Story = story + Text = text ReplyMarkup = replyMarkup } @@ -864,7 +884,7 @@ and MaybeInaccessibleMessage = /// This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. and [] MessageEntity = { - /// Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers) + /// Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers) [] Type: string /// Offset in UTF-16 code units to the start of the entity @@ -945,6 +965,9 @@ and [] ExternalReplyInfo = /// Message is a general file, information about the file [] Document: Document option + /// Message contains paid media; information about the paid media + [] + PaidMedia: PaidMediaInfo option /// Message is a photo, available sizes of the photo [] Photo: PhotoSize[] option @@ -994,7 +1017,7 @@ and [] ExternalReplyInfo = [] Venue: Venue option } - static member Create(origin: MessageOrigin, ?location: Location, ?invoice: Invoice, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?game: Game, ?dice: Dice, ?contact: Contact, ?hasMediaSpoiler: bool, ?voice: Voice, ?poll: Poll, ?videoNote: VideoNote, ?story: Story, ?sticker: Sticker, ?photo: PhotoSize[], ?document: Document, ?audio: Audio, ?animation: Animation, ?linkPreviewOptions: LinkPreviewOptions, ?messageId: int64, ?chat: Chat, ?video: Video, ?venue: Venue) = + static member Create(origin: MessageOrigin, ?location: Location, ?invoice: Invoice, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?game: Game, ?dice: Dice, ?contact: Contact, ?hasMediaSpoiler: bool, ?voice: Voice, ?videoNote: VideoNote, ?video: Video, ?story: Story, ?sticker: Sticker, ?photo: PhotoSize[], ?paidMedia: PaidMediaInfo, ?document: Document, ?audio: Audio, ?animation: Animation, ?linkPreviewOptions: LinkPreviewOptions, ?messageId: int64, ?chat: Chat, ?poll: Poll, ?venue: Venue) = { Origin = origin Location = location @@ -1006,18 +1029,19 @@ and [] ExternalReplyInfo = Contact = contact HasMediaSpoiler = hasMediaSpoiler Voice = voice - Poll = poll VideoNote = videoNote + Video = video Story = story Sticker = sticker Photo = photo + PaidMedia = paidMedia Document = document Audio = audio Animation = animation LinkPreviewOptions = linkPreviewOptions MessageId = messageId Chat = chat - Video = video + Poll = poll Venue = venue } @@ -1193,22 +1217,22 @@ and [] Animation = /// Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. [] FileUniqueId: string - /// Video width as defined by sender + /// Video width as defined by the sender [] Width: int64 - /// Video height as defined by sender + /// Video height as defined by the sender [] Height: int64 - /// Duration of the video in seconds as defined by sender + /// Duration of the video in seconds as defined by the sender [] Duration: int64 - /// Animation thumbnail as defined by sender + /// Animation thumbnail as defined by the sender [] Thumbnail: PhotoSize option - /// Original animation filename as defined by sender + /// Original animation filename as defined by the sender [] FileName: string option - /// MIME type of the file as defined by sender + /// MIME type of the file as defined by the sender [] MimeType: string option /// File size in bytes. It can be bigger than 2^31 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 value. @@ -1237,19 +1261,19 @@ and [] Audio = /// Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. [] FileUniqueId: string - /// Duration of the audio in seconds as defined by sender + /// Duration of the audio in seconds as defined by the sender [] Duration: int64 - /// Performer of the audio as defined by sender or by audio tags + /// Performer of the audio as defined by the sender or by audio tags [] Performer: string option - /// Title of the audio as defined by sender or by audio tags + /// Title of the audio as defined by the sender or by audio tags [] Title: string option - /// Original filename as defined by sender + /// Original filename as defined by the sender [] FileName: string option - /// MIME type of the file as defined by sender + /// MIME type of the file as defined by the sender [] MimeType: string option /// File size in bytes. It can be bigger than 2^31 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 value. @@ -1281,13 +1305,13 @@ and [] Document = /// Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. [] FileUniqueId: string - /// Document thumbnail as defined by sender + /// Document thumbnail as defined by the sender [] Thumbnail: PhotoSize option - /// Original filename as defined by sender + /// Original filename as defined by the sender [] FileName: string option - /// MIME type of the file as defined by sender + /// MIME type of the file as defined by the sender [] MimeType: string option /// File size in bytes. It can be bigger than 2^31 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 value. @@ -1329,22 +1353,22 @@ and [] Video = /// Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. [] FileUniqueId: string - /// Video width as defined by sender + /// Video width as defined by the sender [] Width: int64 - /// Video height as defined by sender + /// Video height as defined by the sender [] Height: int64 - /// Duration of the video in seconds as defined by sender + /// Duration of the video in seconds as defined by the sender [] Duration: int64 /// Video thumbnail [] Thumbnail: PhotoSize option - /// Original filename as defined by sender + /// Original filename as defined by the sender [] FileName: string option - /// MIME type of the file as defined by sender + /// MIME type of the file as defined by the sender [] MimeType: string option /// File size in bytes. It can be bigger than 2^31 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 value. @@ -1373,10 +1397,10 @@ and [] VideoNote = /// Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. [] FileUniqueId: string - /// Video width and height (diameter of the video message) as defined by sender + /// Video width and height (diameter of the video message) as defined by the sender [] Length: int64 - /// Duration of the video in seconds as defined by sender + /// Duration of the video in seconds as defined by the sender [] Duration: int64 /// Video thumbnail @@ -1405,10 +1429,10 @@ and [] Voice = /// Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. [] FileUniqueId: string - /// Duration of the audio in seconds as defined by sender + /// Duration of the audio in seconds as defined by the sender [] Duration: int64 - /// MIME type of the file as defined by sender + /// MIME type of the file as defined by the sender [] MimeType: string option /// File size in bytes. It can be bigger than 2^31 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 value. @@ -1424,6 +1448,84 @@ and [] Voice = FileSize = fileSize } +/// Describes the paid media added to a message. +and [] PaidMediaInfo = + { + /// The number of Telegram Stars that must be paid to buy access to the media + [] + StarCount: int64 + /// Information about the paid media + [] + PaidMedia: PaidMedia[] + } + static member Create(starCount: int64, paidMedia: PaidMedia[]) = + { + StarCount = starCount + PaidMedia = paidMedia + } + +/// This object describes paid media. Currently, it can be one of +and PaidMedia = + | Preview of PaidMediaPreview + | Photo of PaidMediaPhoto + | Video of PaidMediaVideo + +/// The paid media isn't available before the payment. +and [] PaidMediaPreview = + { + /// Type of the paid media, always “preview” + [] + Type: string + /// Media width as defined by the sender + [] + Width: int64 option + /// Media height as defined by the sender + [] + Height: int64 option + /// Duration of the media in seconds as defined by the sender + [] + Duration: int64 option + } + static member Create(``type``: string, ?width: int64, ?height: int64, ?duration: int64) = + { + Type = ``type`` + Width = width + Height = height + Duration = duration + } + +/// The paid media is a photo. +and [] PaidMediaPhoto = + { + /// Type of the paid media, always “photo” + [] + Type: string + /// The photo + [] + Photo: PhotoSize[] + } + static member Create(``type``: string, photo: PhotoSize[]) = + { + Type = ``type`` + Photo = photo + } + +/// The paid media is a video. +and [] PaidMediaVideo = + { + /// Type of the paid media, always “video” + [] + Type: string + /// The video + [] + Video: Video + } + static member Create(``type``: string, video: Video) = + { + Type = ``type`` + Video = video + } + /// This object represents a phone contact. and [] Contact = { @@ -1488,7 +1590,7 @@ and [] PollOption = TextEntities = textEntities } -/// This object contains information about one answer option in a poll to send. +/// This object contains information about one answer option in a poll to be sent. and [] InputPollOption = { /// Option text, 1-100 characters @@ -1599,10 +1701,10 @@ and [] Poll = /// This object represents a point on the map. and [] Location = { - /// Latitude as defined by sender + /// Latitude as defined by the sender [] Latitude: float - /// Longitude as defined by sender + /// Longitude as defined by the sender [] Longitude: float /// The radius of uncertainty for the location, measured in meters; 0-1500 @@ -2327,7 +2429,7 @@ and [] ReplyKeyboardMarkup = Selective = selective } -/// This object represents one button of the reply keyboard. For simple text buttons, String can be used instead of this object to specify the button text. The optional fields web_app, request_users, request_chat, request_contact, request_location, and request_poll are mutually exclusive. +/// This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text. /// Note:request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message. and [] KeyboardButton = { @@ -2494,7 +2596,7 @@ and [] InlineKeyboardMarkup = InlineKeyboard = inlineKeyboard } -/// This object represents one button of an inline keyboard. You must use exactly one of the optional fields. +/// This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button. and [] InlineKeyboardButton = { /// Label text on the button @@ -2503,7 +2605,7 @@ 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. Not supported for messages sent on behalf of a Telegram Business account. + /// Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes [] 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. Not supported for messages sent on behalf of a Telegram Business account. @@ -2528,7 +2630,7 @@ and [] InlineKeyboardButton = /// NOTE: This type of button must always be the first button in the first row. [] CallbackGame: CallbackGame option - /// Specify True, to send a Pay button. + /// Specify True, to send a Pay button. Substrings “” and “XTR” in the buttons's text will be replaced with a Telegram Star icon. /// /// NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages. [] @@ -3619,7 +3721,7 @@ and [] MenuButtonWebApp = /// Text on the button [] Text: string - /// 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. + /// 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. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link. [] WebApp: WebAppInfo } @@ -3874,17 +3976,21 @@ and [] InputMediaPhoto = /// List of special entities that appear in the caption, which can be specified instead of parse_mode [] CaptionEntities: MessageEntity[] option + /// Pass True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// Pass True if the photo needs to be covered with a spoiler animation [] HasSpoiler: bool option } - static member Create(``type``: string, media: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool) = + static member Create(``type``: string, media: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?hasSpoiler: bool) = { Type = ``type`` Media = media Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia HasSpoiler = hasSpoiler } @@ -3909,6 +4015,9 @@ and [] InputMediaVideo = /// List of special entities that appear in the caption, which can be specified instead of parse_mode [] CaptionEntities: MessageEntity[] option + /// Pass True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// Video width [] Width: int64 option @@ -3925,7 +4034,7 @@ and [] InputMediaVideo = [] HasSpoiler: bool option } - static member Create(``type``: string, media: InputFile, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?width: int64, ?height: int64, ?duration: int64, ?supportsStreaming: bool, ?hasSpoiler: bool) = + static member Create(``type``: string, media: InputFile, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?width: int64, ?height: int64, ?duration: int64, ?supportsStreaming: bool, ?hasSpoiler: bool) = { Type = ``type`` Media = media @@ -3933,6 +4042,7 @@ and [] InputMediaVideo = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia Width = width Height = height Duration = duration @@ -3961,6 +4071,9 @@ and [] InputMediaAnimation = /// List of special entities that appear in the caption, which can be specified instead of parse_mode [] CaptionEntities: MessageEntity[] option + /// Pass True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// Animation width [] Width: int64 option @@ -3974,7 +4087,7 @@ and [] InputMediaAnimation = [] HasSpoiler: bool option } - static member Create(``type``: string, media: InputFile, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?width: int64, ?height: int64, ?duration: int64, ?hasSpoiler: bool) = + static member Create(``type``: string, media: InputFile, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?width: int64, ?height: int64, ?duration: int64, ?hasSpoiler: bool) = { Type = ``type`` Media = media @@ -3982,6 +4095,7 @@ and [] InputMediaAnimation = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia Width = width Height = height Duration = duration @@ -4068,6 +4182,63 @@ and [] InputMediaDocument = DisableContentTypeDetection = disableContentTypeDetection } +/// This object describes the paid media to be sent. Currently, it can be one of +and InputPaidMedia = + | Photo of InputPaidMediaPhoto + | Video of InputPaidMediaVideo + +/// The paid media to send is a photo. +and [] InputPaidMediaPhoto = + { + /// Type of the media, must be photo + [] + Type: string + /// File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More information on Sending Files » + [] + Media: InputFile + } + static member Create(``type``: string, media: InputFile) = + { + Type = ``type`` + Media = media + } + +/// The paid media to send is a video. +and [] InputPaidMediaVideo = + { + /// Type of the media, must be video + [] + Type: string + /// File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://” to upload a new one using multipart/form-data under name. More information on Sending Files » + [] + Media: InputFile + /// Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://” if the thumbnail was uploaded using multipart/form-data under . More information on Sending Files » + [] + Thumbnail: InputFile option + /// Video width + [] + Width: int64 option + /// Video height + [] + Height: int64 option + /// Video duration in seconds + [] + Duration: int64 option + /// Pass True if the uploaded video is suitable for streaming + [] + SupportsStreaming: bool option + } + static member Create(``type``: string, media: InputFile, ?thumbnail: InputFile, ?width: int64, ?height: int64, ?duration: int64, ?supportsStreaming: bool) = + { + Type = ``type`` + Media = media + Thumbnail = thumbnail + Width = width + Height = height + Duration = duration + SupportsStreaming = supportsStreaming + } + /// This object represents a sticker. and [] Sticker = { @@ -4382,6 +4553,9 @@ and [] InlineQueryResultPhoto = /// List of special entities that appear in the caption, which can be specified instead of parse_mode [] CaptionEntities: MessageEntity[] option + /// Pass True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// Inline keyboard attached to the message [] ReplyMarkup: InlineKeyboardMarkup option @@ -4389,7 +4563,7 @@ and [] InlineQueryResultPhoto = [] InputMessageContent: InputMessageContent option } - static member Create(``type``: string, id: string, photoUrl: string, thumbnailUrl: string, ?photoWidth: int64, ?photoHeight: int64, ?title: string, ?description: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = + static member Create(``type``: string, id: string, photoUrl: string, thumbnailUrl: string, ?photoWidth: int64, ?photoHeight: int64, ?title: string, ?description: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = { Type = ``type`` Id = id @@ -4402,6 +4576,7 @@ and [] InlineQueryResultPhoto = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia ReplyMarkup = replyMarkup InputMessageContent = inputMessageContent } @@ -4445,6 +4620,9 @@ and [] InlineQueryResultGif = /// List of special entities that appear in the caption, which can be specified instead of parse_mode [] CaptionEntities: MessageEntity[] option + /// Pass True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// Inline keyboard attached to the message [] ReplyMarkup: InlineKeyboardMarkup option @@ -4452,7 +4630,7 @@ and [] InlineQueryResultGif = [] InputMessageContent: InputMessageContent option } - static member Create(``type``: string, id: string, gifUrl: string, thumbnailUrl: string, ?gifWidth: int64, ?gifHeight: int64, ?gifDuration: int64, ?thumbnailMimeType: string, ?title: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = + static member Create(``type``: string, id: string, gifUrl: string, thumbnailUrl: string, ?gifWidth: int64, ?gifHeight: int64, ?gifDuration: int64, ?thumbnailMimeType: string, ?title: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = { Type = ``type`` Id = id @@ -4466,6 +4644,7 @@ and [] InlineQueryResultGif = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia ReplyMarkup = replyMarkup InputMessageContent = inputMessageContent } @@ -4509,6 +4688,9 @@ and [] InlineQueryResultMpeg4Gif = /// List of special entities that appear in the caption, which can be specified instead of parse_mode [] CaptionEntities: MessageEntity[] option + /// Pass True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// Inline keyboard attached to the message [] ReplyMarkup: InlineKeyboardMarkup option @@ -4516,7 +4698,7 @@ and [] InlineQueryResultMpeg4Gif = [] InputMessageContent: InputMessageContent option } - static member Create(``type``: string, id: string, mpeg4Url: string, thumbnailUrl: string, ?mpeg4Width: int64, ?mpeg4Height: int64, ?mpeg4Duration: int64, ?thumbnailMimeType: string, ?title: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = + static member Create(``type``: string, id: string, mpeg4Url: string, thumbnailUrl: string, ?mpeg4Width: int64, ?mpeg4Height: int64, ?mpeg4Duration: int64, ?thumbnailMimeType: string, ?title: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = { Type = ``type`` Id = id @@ -4530,6 +4712,7 @@ and [] InlineQueryResultMpeg4Gif = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia ReplyMarkup = replyMarkup InputMessageContent = inputMessageContent } @@ -4564,6 +4747,9 @@ and [] InlineQueryResultVideo = /// List of special entities that appear in the caption, which can be specified instead of parse_mode [] CaptionEntities: MessageEntity[] option + /// Pass True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// Video width [] VideoWidth: int64 option @@ -4583,7 +4769,7 @@ and [] InlineQueryResultVideo = [] InputMessageContent: InputMessageContent option } - static member Create(``type``: string, id: string, videoUrl: string, mimeType: string, thumbnailUrl: string, title: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?videoWidth: int64, ?videoHeight: int64, ?videoDuration: int64, ?description: string, ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = + static member Create(``type``: string, id: string, videoUrl: string, mimeType: string, thumbnailUrl: string, title: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?videoWidth: int64, ?videoHeight: int64, ?videoDuration: int64, ?description: string, ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = { Type = ``type`` Id = id @@ -4594,6 +4780,7 @@ and [] InlineQueryResultVideo = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia VideoWidth = videoWidth VideoHeight = videoHeight VideoDuration = videoDuration @@ -5001,6 +5188,9 @@ and [] InlineQueryResultCachedPhoto = /// List of special entities that appear in the caption, which can be specified instead of parse_mode [] CaptionEntities: MessageEntity[] option + /// Pass True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// Inline keyboard attached to the message [] ReplyMarkup: InlineKeyboardMarkup option @@ -5008,7 +5198,7 @@ and [] InlineQueryResultCachedPhoto = [] InputMessageContent: InputMessageContent option } - static member Create(``type``: string, id: string, photoFileId: string, ?title: string, ?description: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = + static member Create(``type``: string, id: string, photoFileId: string, ?title: string, ?description: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = { Type = ``type`` Id = id @@ -5018,6 +5208,7 @@ and [] InlineQueryResultCachedPhoto = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia ReplyMarkup = replyMarkup InputMessageContent = inputMessageContent } @@ -5046,6 +5237,9 @@ and [] InlineQueryResultCachedGif = /// List of special entities that appear in the caption, which can be specified instead of parse_mode [] CaptionEntities: MessageEntity[] option + /// Pass True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// Inline keyboard attached to the message [] ReplyMarkup: InlineKeyboardMarkup option @@ -5053,7 +5247,7 @@ and [] InlineQueryResultCachedGif = [] InputMessageContent: InputMessageContent option } - static member Create(``type``: string, id: string, gifFileId: string, ?title: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = + static member Create(``type``: string, id: string, gifFileId: string, ?title: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = { Type = ``type`` Id = id @@ -5062,6 +5256,7 @@ and [] InlineQueryResultCachedGif = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia ReplyMarkup = replyMarkup InputMessageContent = inputMessageContent } @@ -5090,6 +5285,9 @@ and [] InlineQueryResultCachedMpeg4Gif = /// List of special entities that appear in the caption, which can be specified instead of parse_mode [] CaptionEntities: MessageEntity[] option + /// Pass True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// Inline keyboard attached to the message [] ReplyMarkup: InlineKeyboardMarkup option @@ -5097,7 +5295,7 @@ and [] InlineQueryResultCachedMpeg4Gif = [] InputMessageContent: InputMessageContent option } - static member Create(``type``: string, id: string, mpeg4FileId: string, ?title: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = + static member Create(``type``: string, id: string, mpeg4FileId: string, ?title: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = { Type = ``type`` Id = id @@ -5106,6 +5304,7 @@ and [] InlineQueryResultCachedMpeg4Gif = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia ReplyMarkup = replyMarkup InputMessageContent = inputMessageContent } @@ -5213,6 +5412,9 @@ and [] InlineQueryResultCachedVideo = /// List of special entities that appear in the caption, which can be specified instead of parse_mode [] CaptionEntities: MessageEntity[] option + /// Pass True, if the caption must be shown above the message media + [] + ShowCaptionAboveMedia: bool option /// Inline keyboard attached to the message [] ReplyMarkup: InlineKeyboardMarkup option @@ -5220,7 +5422,7 @@ and [] InlineQueryResultCachedVideo = [] InputMessageContent: InputMessageContent option } - static member Create(``type``: string, id: string, videoFileId: string, title: string, ?description: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = + static member Create(``type``: string, id: string, videoFileId: string, title: string, ?description: string, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?showCaptionAboveMedia: bool, ?replyMarkup: InlineKeyboardMarkup, ?inputMessageContent: InputMessageContent) = { Type = ``type`` Id = id @@ -5230,6 +5432,7 @@ and [] InlineQueryResultCachedVideo = Caption = caption ParseMode = parseMode CaptionEntities = captionEntities + ShowCaptionAboveMedia = showCaptionAboveMedia ReplyMarkup = replyMarkup InputMessageContent = inputMessageContent } @@ -5458,16 +5661,16 @@ and [] InputInvoiceMessageContent = /// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. [] Payload: string - /// Payment provider token, obtained via @BotFather + /// Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. [] - ProviderToken: string - /// Three-letter ISO 4217 currency code, see more on currencies + ProviderToken: string option + /// Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars. [] Currency: string - /// Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) + /// Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars. [] Prices: LabeledPrice[] - /// The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 + /// The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars. [] MaxTipAmount: int64 option /// A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. @@ -5488,34 +5691,33 @@ and [] InputInvoiceMessageContent = /// Photo height [] PhotoHeight: int64 option - /// Pass True if you require the user's full name to complete the order + /// Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars. [] NeedName: bool option - /// Pass True if you require the user's phone number to complete the order + /// Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars. [] NeedPhoneNumber: bool option - /// Pass True if you require the user's email address to complete the order + /// Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars. [] NeedEmail: bool option - /// Pass True if you require the user's shipping address to complete the order + /// Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars. [] NeedShippingAddress: bool option - /// Pass True if the user's phone number should be sent to provider + /// Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars. [] SendPhoneNumberToProvider: bool option - /// Pass True if the user's email address should be sent to provider + /// Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars. [] SendEmailToProvider: bool option - /// Pass True if the final price depends on the shipping method + /// Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. [] IsFlexible: bool option } - static member Create(title: string, description: string, payload: string, providerToken: string, currency: string, prices: LabeledPrice[], ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?needName: bool, ?photoHeight: int64, ?photoUrl: string, ?photoSize: int64, ?sendEmailToProvider: bool, ?providerData: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?photoWidth: int64, ?isFlexible: bool) = + static member Create(title: string, description: string, payload: string, currency: string, prices: LabeledPrice[], ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?needName: bool, ?photoHeight: int64, ?photoUrl: string, ?photoSize: int64, ?sendEmailToProvider: bool, ?providerData: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?providerToken: string, ?photoWidth: int64, ?isFlexible: bool) = { Title = title Description = description Payload = payload - ProviderToken = providerToken Currency = currency Prices = prices SendPhoneNumberToProvider = sendPhoneNumberToProvider @@ -5530,6 +5732,7 @@ and [] InputInvoiceMessageContent = ProviderData = providerData SuggestedTipAmounts = suggestedTipAmounts MaxTipAmount = maxTipAmount + ProviderToken = providerToken PhotoWidth = photoWidth IsFlexible = isFlexible } @@ -5604,7 +5807,7 @@ and [] Invoice = /// Unique bot deep-linking parameter that can be used to generate this invoice [] StartParameter: string - /// Three-letter ISO 4217 currency code + /// Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars [] Currency: string /// Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). @@ -5699,13 +5902,13 @@ and [] ShippingOption = /// This object contains basic information about a successful payment. and [] SuccessfulPayment = { - /// Three-letter ISO 4217 currency code + /// Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars [] Currency: string /// Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). [] TotalAmount: int64 - /// Bot specified invoice payload + /// Bot-specified invoice payload [] InvoicePayload: string /// Identifier of the shipping option chosen by the user @@ -5732,6 +5935,34 @@ and [] SuccessfulPayment = OrderInfo = orderInfo } +/// This object contains basic information about a refunded payment. +and [] RefundedPayment = + { + /// Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. Currently, always “XTR” + [] + Currency: string + /// Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + [] + TotalAmount: int64 + /// Bot-specified invoice payload + [] + InvoicePayload: string + /// Telegram payment identifier + [] + TelegramPaymentChargeId: string + /// Provider payment identifier + [] + ProviderPaymentChargeId: string option + } + static member Create(currency: string, totalAmount: int64, invoicePayload: string, telegramPaymentChargeId: string, ?providerPaymentChargeId: string) = + { + Currency = currency + TotalAmount = totalAmount + InvoicePayload = invoicePayload + TelegramPaymentChargeId = telegramPaymentChargeId + ProviderPaymentChargeId = providerPaymentChargeId + } + /// This object contains information about an incoming shipping query. and [] ShippingQuery = { @@ -5741,7 +5972,7 @@ and [] ShippingQuery = /// User who sent the query [] From: User - /// Bot specified invoice payload + /// Bot-specified invoice payload [] InvoicePayload: string /// User specified shipping address @@ -5757,7 +5988,6 @@ and [] ShippingQuery = } /// This object contains information about an incoming pre-checkout query. -/// Telegram Passport is a unified authorization method for services that require personal identification. Users can upload their documents once, then instantly share their data with services that require real-world ID (finance, ICOs, etc.). Please see the manual for details. and [] PreCheckoutQuery = { /// Unique query identifier @@ -5766,13 +5996,13 @@ and [] PreCheckoutQuery = /// User who sent the query [] From: User - /// Three-letter ISO 4217 currency code + /// Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars [] Currency: string /// Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). [] TotalAmount: int64 - /// Bot specified invoice payload + /// Bot-specified invoice payload [] InvoicePayload: string /// Identifier of the shipping option chosen by the user @@ -5793,6 +6023,164 @@ and [] PreCheckoutQuery = OrderInfo = orderInfo } +/// This object describes the state of a revenue withdrawal operation. Currently, it can be one of +and RevenueWithdrawalState = + | Pending of RevenueWithdrawalStatePending + | Succeeded of RevenueWithdrawalStateSucceeded + | Failed of RevenueWithdrawalStateFailed + +/// The withdrawal is in progress. +and [] RevenueWithdrawalStatePending = + { + /// Type of the state, always “pending” + [] + Type: string + } + static member Create(``type``: string) = + { + Type = ``type`` + } + +/// The withdrawal succeeded. +and [] RevenueWithdrawalStateSucceeded = + { + /// Type of the state, always “succeeded” + [] + Type: string + /// Date the withdrawal was completed in Unix time + [] + Date: DateTime + /// An HTTPS URL that can be used to see transaction details + [] + Url: string + } + static member Create(``type``: string, date: DateTime, url: string) = + { + Type = ``type`` + Date = date + Url = url + } + +/// The withdrawal failed and the transaction was refunded. +and [] RevenueWithdrawalStateFailed = + { + /// Type of the state, always “failed” + [] + Type: string + } + static member Create(``type``: string) = + { + Type = ``type`` + } + +/// This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of +and TransactionPartner = + | User of TransactionPartnerUser + | Fragment of TransactionPartnerFragment + | TelegramAds of TransactionPartnerTelegramAds + | Other of TransactionPartnerOther + +/// Describes a transaction with a user. +and [] TransactionPartnerUser = + { + /// Type of the transaction partner, always “user” + [] + Type: string + /// Information about the user + [] + User: User + /// Bot-specified invoice payload + [] + InvoicePayload: string option + } + static member Create(``type``: string, user: User, ?invoicePayload: string) = + { + Type = ``type`` + User = user + InvoicePayload = invoicePayload + } + +/// Describes a withdrawal transaction with Fragment. +and [] TransactionPartnerFragment = + { + /// Type of the transaction partner, always “fragment” + [] + Type: string + /// State of the transaction if the transaction is outgoing + [] + WithdrawalState: RevenueWithdrawalState option + } + static member Create(``type``: string, ?withdrawalState: RevenueWithdrawalState) = + { + Type = ``type`` + WithdrawalState = withdrawalState + } + +/// Describes a withdrawal transaction to the Telegram Ads platform. +and [] TransactionPartnerTelegramAds = + { + /// Type of the transaction partner, always “telegram_ads” + [] + Type: string + } + static member Create(``type``: string) = + { + Type = ``type`` + } + +/// Describes a transaction with an unknown source or recipient. +and [] TransactionPartnerOther = + { + /// Type of the transaction partner, always “other” + [] + Type: string + } + static member Create(``type``: string) = + { + Type = ``type`` + } + +/// Describes a Telegram Star transaction. +and [] StarTransaction = + { + /// Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users. + [] + Id: string + /// Number of Telegram Stars transferred by the transaction + [] + Amount: int64 + /// Date the transaction was created in Unix time + [] + Date: DateTime + /// Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions + [] + Source: TransactionPartner option + /// Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions + [] + Receiver: TransactionPartner option + } + static member Create(id: string, amount: int64, date: DateTime, ?source: TransactionPartner, ?receiver: TransactionPartner) = + { + Id = id + Amount = amount + Date = date + Source = source + Receiver = receiver + } + +/// Contains a list of Telegram Star transactions. +/// Telegram Passport is a unified authorization method for services that require personal identification. Users can upload their documents once, then instantly share their data with services that require real-world ID (finance, ICOs, etc.). Please see the manual for details. +and [] StarTransactions = + { + /// The list of transactions + [] + Transactions: StarTransaction[] + } + static member Create(transactions: StarTransaction[]) = + { + Transactions = transactions + } + /// Describes Telegram Passport data shared with the bot by the user. and [] PassportData = { diff --git a/src/examples/Funogram.TestBot/Commands/Base.fs b/src/examples/Funogram.TestBot/Commands/Base.fs index 0775411..f793f4c 100644 --- a/src/examples/Funogram.TestBot/Commands/Base.fs +++ b/src/examples/Funogram.TestBot/Commands/Base.fs @@ -65,7 +65,7 @@ let updateArrived (ctx: UpdateContext) = match c.Message with | Some (MaybeInaccessibleMessage.Message msg) -> let inlineKeyboardMarkup = InlineKeyboardMarkup.Create([| [| InlineKeyboardButton.Create("Changed!", callbackData = "Test") |] |]) - Req.EditMessageReplyMarkup.Make(msg.Chat.Id, msg.MessageId, replyMarkup = inlineKeyboardMarkup) + Req.EditMessageReplyMarkup.Make(chatId = ChatId.Int msg.Chat.Id, messageId = msg.MessageId, replyMarkup = inlineKeyboardMarkup) |> bot ctx.Config | _ -> () | _ -> () diff --git a/src/examples/Funogram.TestBot/Commands/Files.fs b/src/examples/Funogram.TestBot/Commands/Files.fs index 41f0392..e5a2fa9 100644 --- a/src/examples/Funogram.TestBot/Commands/Files.fs +++ b/src/examples/Funogram.TestBot/Commands/Files.fs @@ -18,6 +18,7 @@ let testUploadAndSendPhotoGroup config (chatId: int64) = ParseMode = None CaptionEntities = None HasSpoiler = None + ShowCaptionAboveMedia = None } |> InputMedia.Photo let image1 = Http.RequestStream(PhotoUrl).ResponseStream @@ -38,6 +39,7 @@ let testUploadAndSendPhotoGroupAsBytes config (chatId: int64) = ParseMode = None CaptionEntities = None HasSpoiler = None + ShowCaptionAboveMedia = None } |> InputMedia.Photo use image1 = Http.RequestStream(PhotoUrl).ResponseStream