diff --git a/src/Funogram.Generator/Helpers.fs b/src/Funogram.Generator/Helpers.fs index 64d1074..acb0a94 100644 --- a/src/Funogram.Generator/Helpers.fs +++ b/src/Funogram.Generator/Helpers.fs @@ -25,6 +25,7 @@ let typeMap = "Float number", "float" "InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "Markup" "array of Messages", "Message[]" + "array of MessageId", "MessageId[]" "InputMediaAudio, InputMediaDocument, InputMediaPhoto and InputMediaVideo", "InputMedia" "Message or True", "EditMessageResult" ] |> Map.ofList diff --git a/src/Funogram.Generator/Types/TypesParser.fs b/src/Funogram.Generator/Types/TypesParser.fs index 30bb487..d1d05fd 100644 --- a/src/Funogram.Generator/Types/TypesParser.fs +++ b/src/Funogram.Generator/Types/TypesParser.fs @@ -47,7 +47,11 @@ let private splitCaseNameAndType (typeName: string) (nameAndType: string) = | "InputMessageContent" -> "Input" | _ -> typeName - try nameAndType.Substring(typeName.Length) with | _ -> "ERROR!" + match typeName, nameAndType with + | "MaybeInaccessibleMessage", "Message" -> "Message" + | "MaybeInaccessibleMessage", "InaccessibleMessage" -> "InaccessibleMessage" + | _ -> + try nameAndType.Substring(typeName.Length) with | _ -> "ERROR!" let private isValidTypeNode (typeNodeInfo: ApiTypeNodeInfo) = let name = Helpers.innerText typeNodeInfo.TypeName diff --git a/src/Funogram.Generator/out/methods.json b/src/Funogram.Generator/out/methods.json index 923d29b..d01e9b9 100644 --- a/src/Funogram.Generator/out/methods.json +++ b/src/Funogram.Generator/out/methods.json @@ -31,7 +31,7 @@ { "OriginalName": "allowed_updates", "ConvertedName": "AllowedUpdates", - "Description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\u0022message\u0022, \u0022edited_channel_post\u0022, \u0022callback_query\u0022] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.\n\nPlease note that this parameter doesn\u0027t affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.", + "Description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\u0022message\u0022, \u0022edited_channel_post\u0022, \u0022callback_query\u0022] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.\n\nPlease note that this parameter doesn\u0027t affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time.", "OriginalFieldType": "Array of String", "ConvertedFieldType": "string[]", "Optional": true @@ -80,7 +80,7 @@ { "OriginalName": "allowed_updates", "ConvertedName": "AllowedUpdates", - "Description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\u0022message\u0022, \u0022edited_channel_post\u0022, \u0022callback_query\u0022] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.\nPlease note that this parameter doesn\u0027t affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.", + "Description": "A JSON-serialized list of the update types you want your bot to receive. For example, specify [\u0022message\u0022, \u0022edited_channel_post\u0022, \u0022callback_query\u0022] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.\nPlease note that this parameter doesn\u0027t affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time.", "OriginalFieldType": "Array of String", "ConvertedFieldType": "string[]", "Optional": true @@ -200,11 +200,11 @@ "Optional": true }, { - "OriginalName": "disable_web_page_preview", - "ConvertedName": "DisableWebPagePreview", - "Description": "Disables link previews for links in this message", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "link_preview_options", + "ConvertedName": "LinkPreviewOptions", + "Description": "Link preview generation options for the message", + "OriginalFieldType": "LinkPreviewOptions", + "ConvertedFieldType": "LinkPreviewOptions", "Optional": true }, { @@ -224,19 +224,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -254,7 +246,7 @@ { "OriginalName": "forwardMessage", "ConvertedName": "ForwardMessage", - "Description": "Use this method to forward messages of any kind. Service messages can\u0027t be forwarded. On success, the sent Message is returned.", + "Description": "Use this method to forward messages of any kind. Service messages and messages with protected content can\u0027t be forwarded. On success, the sent Message is returned.", "Fields": [ { "OriginalName": "chat_id", @@ -308,10 +300,67 @@ "OriginalReturnType": "Message", "ConvertedReturnType": "Message" }, + { + "OriginalName": "forwardMessages", + "ConvertedName": "ForwardMessages", + "Description": "Use this method to forward multiple messages of any kind. If some of the specified messages can\u0027t be found or forwarded, they are skipped. Service messages and messages with protected content can\u0027t be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages 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": "message_thread_id", + "ConvertedName": "MessageThreadId", + "Description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "from_chat_id", + "ConvertedName": "FromChatId", + "Description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)", + "OriginalFieldType": "Integer or String", + "ConvertedFieldType": "ChatId", + "Optional": false + }, + { + "OriginalName": "message_ids", + "ConvertedName": "MessageIds", + "Description": "Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.", + "OriginalFieldType": "Array of Integer", + "ConvertedFieldType": "int64[]", + "Optional": false + }, + { + "OriginalName": "disable_notification", + "ConvertedName": "DisableNotification", + "Description": "Sends the messages 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 forwarded messages from forwarding and saving", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + } + ], + "OriginalReturnType": "array of MessageId", + "ConvertedReturnType": "MessageId[]" + }, { "OriginalName": "copyMessage", "ConvertedName": "CopyMessage", - "Description": "Use this method to copy messages of any kind. Service 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, 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", @@ -386,19 +435,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -413,6 +454,71 @@ "OriginalReturnType": "MessageId", "ConvertedReturnType": "MessageId" }, + { + "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.", + "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": "message_thread_id", + "ConvertedName": "MessageThreadId", + "Description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "from_chat_id", + "ConvertedName": "FromChatId", + "Description": "Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)", + "OriginalFieldType": "Integer or String", + "ConvertedFieldType": "ChatId", + "Optional": false + }, + { + "OriginalName": "message_ids", + "ConvertedName": "MessageIds", + "Description": "Identifiers of 1-100 messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.", + "OriginalFieldType": "Array of Integer", + "ConvertedFieldType": "int64[]", + "Optional": false + }, + { + "OriginalName": "disable_notification", + "ConvertedName": "DisableNotification", + "Description": "Sends the messages 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 messages from forwarding and saving", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "remove_caption", + "ConvertedName": "RemoveCaption", + "Description": "Pass True to copy the messages without their captions", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + } + ], + "OriginalReturnType": "array of MessageId", + "ConvertedReturnType": "MessageId[]" + }, { "OriginalName": "sendPhoto", "ConvertedName": "SendPhoto", @@ -491,19 +597,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -620,19 +718,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -733,19 +823,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -878,19 +960,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -1015,19 +1089,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -1120,19 +1186,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -1217,19 +1275,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -1290,19 +1340,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the messages are a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true } ], @@ -1395,19 +1437,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -1524,19 +1558,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -1621,19 +1647,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -1782,19 +1800,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -1855,19 +1865,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -1915,6 +1917,47 @@ "OriginalReturnType": "True", "ConvertedReturnType": "bool" }, + { + "OriginalName": "setMessageReaction", + "ConvertedName": "SetMessageReaction", + "Description": "Use this method to change the chosen reactions on a message. Service messages can\u0027t be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.", + "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": "message_id", + "ConvertedName": "MessageId", + "Description": "Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "reaction", + "ConvertedName": "Reaction", + "Description": "New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.", + "OriginalFieldType": "Array of ReactionType", + "ConvertedFieldType": "ReactionType[]", + "Optional": true + }, + { + "OriginalName": "is_big", + "ConvertedName": "IsBig", + "Description": "Pass True to set the reaction with a big animation", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + } + ], + "OriginalReturnType": "True", + "ConvertedReturnType": "bool" + }, { "OriginalName": "getUserProfilePhotos", "ConvertedName": "GetUserProfilePhotos", @@ -2734,7 +2777,7 @@ { "OriginalName": "getChat", "ConvertedName": "GetChat", - "Description": "Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.", + "Description": "Use this method to get up to date information about the chat. Returns a Chat object on success.", "Fields": [ { "OriginalName": "chat_id", @@ -3198,6 +3241,31 @@ "OriginalReturnType": "True", "ConvertedReturnType": "bool" }, + { + "OriginalName": "getUserChatBoosts", + "ConvertedName": "GetUserChatBoosts", + "Description": "Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.", + "Fields": [ + { + "OriginalName": "chat_id", + "ConvertedName": "ChatId", + "Description": "Unique identifier for the chat or username of the channel (in the format @channelusername)", + "OriginalFieldType": "Integer or String", + "ConvertedFieldType": "ChatId", + "Optional": false + }, + { + "OriginalName": "user_id", + "ConvertedName": "UserId", + "Description": "Unique identifier of the target user", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + } + ], + "OriginalReturnType": "UserChatBoosts", + "ConvertedReturnType": "UserChatBoosts" + }, { "OriginalName": "setMyCommands", "ConvertedName": "SetMyCommands", @@ -3545,11 +3613,11 @@ "Optional": true }, { - "OriginalName": "disable_web_page_preview", - "ConvertedName": "DisableWebPagePreview", - "Description": "Disables link previews for links in this message", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "link_preview_options", + "ConvertedName": "LinkPreviewOptions", + "Description": "Link preview generation options for the message", + "OriginalFieldType": "LinkPreviewOptions", + "ConvertedFieldType": "LinkPreviewOptions", "Optional": true }, { @@ -3899,6 +3967,31 @@ "OriginalReturnType": "True", "ConvertedReturnType": "bool" }, + { + "OriginalName": "deleteMessages", + "ConvertedName": "DeleteMessages", + "Description": "Use this method to delete multiple messages simultaneously. If some of the specified messages can\u0027t be found, they are skipped. Returns True on success.", + "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": "message_ids", + "ConvertedName": "MessageIds", + "Description": "Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted", + "OriginalFieldType": "Array of Integer", + "ConvertedFieldType": "int64[]", + "Optional": false + } + ], + "OriginalReturnType": "True", + "ConvertedReturnType": "bool" + }, { "OriginalName": "sendSticker", "ConvertedName": "SendSticker", @@ -3953,19 +4046,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -4650,19 +4735,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { @@ -4991,19 +5068,11 @@ "Optional": true }, { - "OriginalName": "reply_to_message_id", - "ConvertedName": "ReplyToMessageId", - "Description": "If the message is a reply, ID of the original message", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "allow_sending_without_reply", - "ConvertedName": "AllowSendingWithoutReply", - "Description": "Pass True if the message should be sent even if the specified replied-to message is not found", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "Description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", "Optional": true }, { diff --git a/src/Funogram.Generator/out/types.json b/src/Funogram.Generator/out/types.json index a6ac59d..7a49c31 100644 --- a/src/Funogram.Generator/out/types.json +++ b/src/Funogram.Generator/out/types.json @@ -46,6 +46,22 @@ "ConvertedFieldType": "Message", "Optional": true }, + { + "OriginalName": "message_reaction", + "ConvertedName": "MessageReaction", + "Description": "A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify \u0022message_reaction\u0022 in the list of allowed_updates to receive these updates. The update isn\u0027t received for reactions set by bots.", + "OriginalFieldType": "MessageReactionUpdated", + "ConvertedFieldType": "MessageReactionUpdated", + "Optional": true + }, + { + "OriginalName": "message_reaction_count", + "ConvertedName": "MessageReactionCount", + "Description": "Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify \u0022message_reaction_count\u0022 in the list of allowed_updates to receive these updates.", + "OriginalFieldType": "MessageReactionCountUpdated", + "ConvertedFieldType": "MessageReactionCountUpdated", + "Optional": true + }, { "OriginalName": "inline_query", "ConvertedName": "InlineQuery", @@ -125,6 +141,22 @@ "OriginalFieldType": "ChatJoinRequest", "ConvertedFieldType": "ChatJoinRequest", "Optional": true + }, + { + "OriginalName": "chat_boost", + "ConvertedName": "ChatBoost", + "Description": "A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.", + "OriginalFieldType": "ChatBoostUpdated", + "ConvertedFieldType": "ChatBoostUpdated", + "Optional": true + }, + { + "OriginalName": "removed_chat_boost", + "ConvertedName": "RemovedChatBoost", + "Description": "A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.", + "OriginalFieldType": "ChatBoostRemoved", + "ConvertedFieldType": "ChatBoostRemoved", + "Optional": true } ] ] @@ -391,10 +423,50 @@ "ConvertedFieldType": "string[]", "Optional": true }, + { + "OriginalName": "available_reactions", + "ConvertedName": "AvailableReactions", + "Description": "List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat.", + "OriginalFieldType": "Array of ReactionType", + "ConvertedFieldType": "ReactionType[]", + "Optional": true + }, + { + "OriginalName": "accent_color_id", + "ConvertedName": "AccentColorId", + "Description": "Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. Returned only in getChat. Always returned in getChat.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "background_custom_emoji_id", + "ConvertedName": "BackgroundCustomEmojiId", + "Description": "Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat.", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "profile_accent_color_id", + "ConvertedName": "ProfileAccentColorId", + "Description": "Identifier of the accent color for the chat\u0027s profile background. See profile accent colors for more details. Returned only in getChat.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "profile_background_custom_emoji_id", + "ConvertedName": "ProfileBackgroundCustomEmojiId", + "Description": "Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat.", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, { "OriginalName": "emoji_status_custom_emoji_id", "ConvertedName": "EmojiStatusCustomEmojiId", - "Description": "Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.", + "Description": "Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in getChat.", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": true @@ -402,7 +474,7 @@ { "OriginalName": "emoji_status_expiration_date", "ConvertedName": "EmojiStatusExpirationDate", - "Description": "Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in getChat.", + "Description": "Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in getChat.", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true @@ -519,6 +591,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "has_visible_history", + "ConvertedName": "HasVisibleHistory", + "Description": "True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat.", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, { "OriginalName": "sticker_set_name", "ConvertedName": "StickerSetName", @@ -597,7 +677,7 @@ { "OriginalName": "date", "ConvertedName": "Date", - "Description": "Date the message was sent in Unix time", + "Description": "Date the message was sent in Unix time. It is always a positive number, representing a valid date.", "OriginalFieldType": "Integer", "ConvertedFieldType": "DateTime", "Optional": false @@ -605,57 +685,17 @@ { "OriginalName": "chat", "ConvertedName": "Chat", - "Description": "Conversation the message belongs to", + "Description": "Chat the message belongs to", "OriginalFieldType": "Chat", "ConvertedFieldType": "Chat", "Optional": false }, { - "OriginalName": "forward_from", - "ConvertedName": "ForwardFrom", - "Description": "For forwarded messages, sender of the original message", - "OriginalFieldType": "User", - "ConvertedFieldType": "User", - "Optional": true - }, - { - "OriginalName": "forward_from_chat", - "ConvertedName": "ForwardFromChat", - "Description": "For messages forwarded from channels or from anonymous administrators, information about the original sender chat", - "OriginalFieldType": "Chat", - "ConvertedFieldType": "Chat", - "Optional": true - }, - { - "OriginalName": "forward_from_message_id", - "ConvertedName": "ForwardFromMessageId", - "Description": "For messages forwarded from channels, identifier of the original message in the channel", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": true - }, - { - "OriginalName": "forward_signature", - "ConvertedName": "ForwardSignature", - "Description": "For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present", - "OriginalFieldType": "String", - "ConvertedFieldType": "string", - "Optional": true - }, - { - "OriginalName": "forward_sender_name", - "ConvertedName": "ForwardSenderName", - "Description": "Sender\u0027s name for messages forwarded from users who disallow adding a link to their account in forwarded messages", - "OriginalFieldType": "String", - "ConvertedFieldType": "string", - "Optional": true - }, - { - "OriginalName": "forward_date", - "ConvertedName": "ForwardDate", - "Description": "For forwarded messages, date the original message was sent in Unix time", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "DateTime", + "OriginalName": "forward_origin", + "ConvertedName": "ForwardOrigin", + "Description": "Information about the original message for forwarded messages", + "OriginalFieldType": "MessageOrigin", + "ConvertedFieldType": "MessageOrigin", "Optional": true }, { @@ -677,11 +717,27 @@ { "OriginalName": "reply_to_message", "ConvertedName": "ReplyToMessage", - "Description": "For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.", + "Description": "For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.", "OriginalFieldType": "Message", "ConvertedFieldType": "Message", "Optional": true }, + { + "OriginalName": "external_reply", + "ConvertedName": "ExternalReply", + "Description": "Information about the message that is being replied to, which may come from another chat or forum topic", + "OriginalFieldType": "ExternalReplyInfo", + "ConvertedFieldType": "ExternalReplyInfo", + "Optional": true + }, + { + "OriginalName": "quote", + "ConvertedName": "Quote", + "Description": "For replies that quote part of the original message, the quoted part of the message", + "OriginalFieldType": "TextQuote", + "ConvertedFieldType": "TextQuote", + "Optional": true + }, { "OriginalName": "via_bot", "ConvertedName": "ViaBot", @@ -738,6 +794,14 @@ "ConvertedFieldType": "MessageEntity[]", "Optional": true }, + { + "OriginalName": "link_preview_options", + "ConvertedName": "LinkPreviewOptions", + "Description": "Options used for link preview generation for the message, if it is a text message and link preview options were changed", + "OriginalFieldType": "LinkPreviewOptions", + "ConvertedFieldType": "LinkPreviewOptions", + "Optional": true + }, { "OriginalName": "animation", "ConvertedName": "Animation", @@ -973,9 +1037,9 @@ { "OriginalName": "pinned_message", "ConvertedName": "PinnedMessage", - "Description": "Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.", - "OriginalFieldType": "Message", - "ConvertedFieldType": "Message", + "Description": "Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.", + "OriginalFieldType": "MaybeInaccessibleMessage", + "ConvertedFieldType": "MaybeInaccessibleMessage", "Optional": true }, { @@ -995,11 +1059,11 @@ "Optional": true }, { - "OriginalName": "user_shared", - "ConvertedName": "UserShared", - "Description": "Service message: a user was shared with the bot", - "OriginalFieldType": "UserShared", - "ConvertedFieldType": "UserShared", + "OriginalName": "users_shared", + "ConvertedName": "UsersShared", + "Description": "Service message: users were shared with the bot", + "OriginalFieldType": "UsersShared", + "ConvertedFieldType": "UsersShared", "Optional": true }, { @@ -1090,6 +1154,38 @@ "ConvertedFieldType": "GeneralForumTopicUnhidden", "Optional": true }, + { + "OriginalName": "giveaway_created", + "ConvertedName": "GiveawayCreated", + "Description": "Service message: a scheduled giveaway was created", + "OriginalFieldType": "GiveawayCreated", + "ConvertedFieldType": "GiveawayCreated", + "Optional": true + }, + { + "OriginalName": "giveaway", + "ConvertedName": "Giveaway", + "Description": "The message is a scheduled giveaway message", + "OriginalFieldType": "Giveaway", + "ConvertedFieldType": "Giveaway", + "Optional": true + }, + { + "OriginalName": "giveaway_winners", + "ConvertedName": "GiveawayWinners", + "Description": "A giveaway with public winners was completed", + "OriginalFieldType": "GiveawayWinners", + "ConvertedFieldType": "GiveawayWinners", + "Optional": true + }, + { + "OriginalName": "giveaway_completed", + "ConvertedName": "GiveawayCompleted", + "Description": "Service message: a giveaway without public winners was completed", + "OriginalFieldType": "GiveawayCompleted", + "ConvertedFieldType": "GiveawayCompleted", + "Optional": true + }, { "OriginalName": "video_chat_scheduled", "ConvertedName": "VideoChatScheduled", @@ -1161,6 +1257,60 @@ ] } }, + { + "Name": "InaccessibleMessage", + "Description": "This object describes a message that was deleted or is otherwise inaccessible to the bot.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "chat", + "ConvertedName": "Chat", + "Description": "Chat the message belonged to", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": false + }, + { + "OriginalName": "message_id", + "ConvertedName": "MessageId", + "Description": "Unique message identifier inside the chat", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "date", + "ConvertedName": "Date", + "Description": "Always 0. The field can be used to differentiate regular and inaccessible messages.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "DateTime", + "Optional": false + } + ] + ] + } + }, + { + "Name": "MaybeInaccessibleMessage", + "Description": "This object describes a message that can be inaccessible to the bot. It can be one of", + "Kind": { + "Case": "Cases", + "Fields": [ + [ + { + "Name": "Message", + "CaseType": "Message" + }, + { + "Name": "InaccessibleMessage", + "CaseType": "InaccessibleMessage" + } + ] + ] + } + }, { "Name": "MessageEntity", "Description": "This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.", @@ -1171,7 +1321,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), \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), \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 @@ -1229,50 +1379,42 @@ } }, { - "Name": "PhotoSize", - "Description": "This object represents one size of a photo or a file / sticker thumbnail.", + "Name": "TextQuote", + "Description": "This object contains information about the quoted part of a message that is replied to by the given message.", "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.", + "OriginalName": "text", + "ConvertedName": "Text", + "Description": "Text of the quoted part of a message that is replied to by the given message", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false }, { - "OriginalName": "width", - "ConvertedName": "Width", - "Description": "Photo width", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": false + "OriginalName": "entities", + "ConvertedName": "Entities", + "Description": "Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes.", + "OriginalFieldType": "Array of MessageEntity", + "ConvertedFieldType": "MessageEntity[]", + "Optional": true }, { - "OriginalName": "height", - "ConvertedName": "Height", - "Description": "Photo height", + "OriginalName": "position", + "ConvertedName": "Position", + "Description": "Approximate quote position in the original message in UTF-16 code units as specified by the sender", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false }, { - "OriginalName": "file_size", - "ConvertedName": "FileSize", - "Description": "File size in bytes", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", + "OriginalName": "is_manual", + "ConvertedName": "IsManual", + "Description": "True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", "Optional": true } ] @@ -1280,85 +1422,589 @@ } }, { - "Name": "Animation", - "Description": "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).", + "Name": "ExternalReplyInfo", + "Description": "This object contains information about a message that is being replied to, which may come from another chat or forum topic.", "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", + "OriginalName": "origin", + "ConvertedName": "Origin", + "Description": "Origin of the message replied to by the given message", + "OriginalFieldType": "MessageOrigin", + "ConvertedFieldType": "MessageOrigin", "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": "chat", + "ConvertedName": "Chat", + "Description": "Chat the original message belongs to. Available only if the chat is a supergroup or a channel.", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": true }, { - "OriginalName": "width", - "ConvertedName": "Width", - "Description": "Video width as defined by sender", + "OriginalName": "message_id", + "ConvertedName": "MessageId", + "Description": "Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", - "Optional": false + "Optional": true }, { - "OriginalName": "height", - "ConvertedName": "Height", - "Description": "Video height as defined by sender", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": false + "OriginalName": "link_preview_options", + "ConvertedName": "LinkPreviewOptions", + "Description": "Options used for link preview generation for the original message, if it is a text message", + "OriginalFieldType": "LinkPreviewOptions", + "ConvertedFieldType": "LinkPreviewOptions", + "Optional": true }, { - "OriginalName": "duration", - "ConvertedName": "Duration", - "Description": "Duration of the video in seconds as defined by sender", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": false + "OriginalName": "animation", + "ConvertedName": "Animation", + "Description": "Message is an animation, information about the animation", + "OriginalFieldType": "Animation", + "ConvertedFieldType": "Animation", + "Optional": true }, { - "OriginalName": "thumbnail", - "ConvertedName": "Thumbnail", - "Description": "Animation thumbnail as defined by sender", - "OriginalFieldType": "PhotoSize", - "ConvertedFieldType": "PhotoSize", + "OriginalName": "audio", + "ConvertedName": "Audio", + "Description": "Message is an audio file, information about the file", + "OriginalFieldType": "Audio", + "ConvertedFieldType": "Audio", "Optional": true }, { - "OriginalName": "file_name", - "ConvertedName": "FileName", - "Description": "Original animation filename as defined by sender", - "OriginalFieldType": "String", - "ConvertedFieldType": "string", + "OriginalName": "document", + "ConvertedName": "Document", + "Description": "Message is a general file, information about the file", + "OriginalFieldType": "Document", + "ConvertedFieldType": "Document", "Optional": true }, { - "OriginalName": "mime_type", - "ConvertedName": "MimeType", - "Description": "MIME type of the file as defined by sender", - "OriginalFieldType": "String", - "ConvertedFieldType": "string", + "OriginalName": "photo", + "ConvertedName": "Photo", + "Description": "Message is a photo, available sizes of the photo", + "OriginalFieldType": "Array of PhotoSize", + "ConvertedFieldType": "PhotoSize[]", "Optional": true }, { - "OriginalName": "file_size", - "ConvertedName": "FileSize", - "Description": "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.", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", + "OriginalName": "sticker", + "ConvertedName": "Sticker", + "Description": "Message is a sticker, information about the sticker", + "OriginalFieldType": "Sticker", + "ConvertedFieldType": "Sticker", "Optional": true - } - ] + }, + { + "OriginalName": "story", + "ConvertedName": "Story", + "Description": "Message is a forwarded story", + "OriginalFieldType": "Story", + "ConvertedFieldType": "Story", + "Optional": true + }, + { + "OriginalName": "video", + "ConvertedName": "Video", + "Description": "Message is a video, information about the video", + "OriginalFieldType": "Video", + "ConvertedFieldType": "Video", + "Optional": true + }, + { + "OriginalName": "video_note", + "ConvertedName": "VideoNote", + "Description": "Message is a video note, information about the video message", + "OriginalFieldType": "VideoNote", + "ConvertedFieldType": "VideoNote", + "Optional": true + }, + { + "OriginalName": "voice", + "ConvertedName": "Voice", + "Description": "Message is a voice message, information about the file", + "OriginalFieldType": "Voice", + "ConvertedFieldType": "Voice", + "Optional": true + }, + { + "OriginalName": "has_media_spoiler", + "ConvertedName": "HasMediaSpoiler", + "Description": "True, if the message media is covered by a spoiler animation", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "contact", + "ConvertedName": "Contact", + "Description": "Message is a shared contact, information about the contact", + "OriginalFieldType": "Contact", + "ConvertedFieldType": "Contact", + "Optional": true + }, + { + "OriginalName": "dice", + "ConvertedName": "Dice", + "Description": "Message is a dice with random value", + "OriginalFieldType": "Dice", + "ConvertedFieldType": "Dice", + "Optional": true + }, + { + "OriginalName": "game", + "ConvertedName": "Game", + "Description": "Message is a game, information about the game. More about games \u00BB", + "OriginalFieldType": "Game", + "ConvertedFieldType": "Game", + "Optional": true + }, + { + "OriginalName": "giveaway", + "ConvertedName": "Giveaway", + "Description": "Message is a scheduled giveaway, information about the giveaway", + "OriginalFieldType": "Giveaway", + "ConvertedFieldType": "Giveaway", + "Optional": true + }, + { + "OriginalName": "giveaway_winners", + "ConvertedName": "GiveawayWinners", + "Description": "A giveaway with public winners was completed", + "OriginalFieldType": "GiveawayWinners", + "ConvertedFieldType": "GiveawayWinners", + "Optional": true + }, + { + "OriginalName": "invoice", + "ConvertedName": "Invoice", + "Description": "Message is an invoice for a payment, information about the invoice. More about payments \u00BB", + "OriginalFieldType": "Invoice", + "ConvertedFieldType": "Invoice", + "Optional": true + }, + { + "OriginalName": "location", + "ConvertedName": "Location", + "Description": "Message is a shared location, information about the location", + "OriginalFieldType": "Location", + "ConvertedFieldType": "Location", + "Optional": true + }, + { + "OriginalName": "poll", + "ConvertedName": "Poll", + "Description": "Message is a native poll, information about the poll", + "OriginalFieldType": "Poll", + "ConvertedFieldType": "Poll", + "Optional": true + }, + { + "OriginalName": "venue", + "ConvertedName": "Venue", + "Description": "Message is a venue, information about the venue", + "OriginalFieldType": "Venue", + "ConvertedFieldType": "Venue", + "Optional": true + } + ] + ] + } + }, + { + "Name": "ReplyParameters", + "Description": "Describes reply parameters for the message that is being sent.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "message_id", + "ConvertedName": "MessageId", + "Description": "Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "chat_id", + "ConvertedName": "ChatId", + "Description": "If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername)", + "OriginalFieldType": "Integer or String", + "ConvertedFieldType": "ChatId", + "Optional": true + }, + { + "OriginalName": "allow_sending_without_reply", + "ConvertedName": "AllowSendingWithoutReply", + "Description": "Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic.", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "quote", + "ConvertedName": "Quote", + "Description": "Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn\u0027t found in the original message.", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "quote_parse_mode", + "ConvertedName": "QuoteParseMode", + "Description": "Mode for parsing entities in the quote. See formatting options for more details.", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "quote_entities", + "ConvertedName": "QuoteEntities", + "Description": "A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode.", + "OriginalFieldType": "Array of MessageEntity", + "ConvertedFieldType": "MessageEntity[]", + "Optional": true + }, + { + "OriginalName": "quote_position", + "ConvertedName": "QuotePosition", + "Description": "Position of the quote in the original message in UTF-16 code units", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + } + ] + ] + } + }, + { + "Name": "MessageOrigin", + "Description": "This object describes the origin of a message. It can be one of", + "Kind": { + "Case": "Cases", + "Fields": [ + [ + { + "Name": "User", + "CaseType": "MessageOriginUser" + }, + { + "Name": "HiddenUser", + "CaseType": "MessageOriginHiddenUser" + }, + { + "Name": "Chat", + "CaseType": "MessageOriginChat" + }, + { + "Name": "Channel", + "CaseType": "MessageOriginChannel" + } + ] + ] + } + }, + { + "Name": "MessageOriginUser", + "Description": "The message was originally sent by a known user.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the message origin, always \u201Cuser\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "date", + "ConvertedName": "Date", + "Description": "Date the message was sent originally in Unix time", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "DateTime", + "Optional": false + }, + { + "OriginalName": "sender_user", + "ConvertedName": "SenderUser", + "Description": "User that sent the message originally", + "OriginalFieldType": "User", + "ConvertedFieldType": "User", + "Optional": false + } + ] + ] + } + }, + { + "Name": "MessageOriginHiddenUser", + "Description": "The message was originally sent by an unknown user.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the message origin, always \u201Chidden_user\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "date", + "ConvertedName": "Date", + "Description": "Date the message was sent originally in Unix time", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "DateTime", + "Optional": false + }, + { + "OriginalName": "sender_user_name", + "ConvertedName": "SenderUserName", + "Description": "Name of the user that sent the message originally", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ] + ] + } + }, + { + "Name": "MessageOriginChat", + "Description": "The message was originally sent on behalf of a chat to a group chat.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the message origin, always \u201Cchat\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "date", + "ConvertedName": "Date", + "Description": "Date the message was sent originally in Unix time", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "DateTime", + "Optional": false + }, + { + "OriginalName": "sender_chat", + "ConvertedName": "SenderChat", + "Description": "Chat that sent the message originally", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": false + }, + { + "OriginalName": "author_signature", + "ConvertedName": "AuthorSignature", + "Description": "For messages originally sent by an anonymous chat administrator, original message author signature", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + } + ] + ] + } + }, + { + "Name": "MessageOriginChannel", + "Description": "The message was originally sent to a channel chat.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the message origin, always \u201Cchannel\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "date", + "ConvertedName": "Date", + "Description": "Date the message was sent originally in Unix time", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "DateTime", + "Optional": false + }, + { + "OriginalName": "chat", + "ConvertedName": "Chat", + "Description": "Channel chat to which the message was originally sent", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": false + }, + { + "OriginalName": "message_id", + "ConvertedName": "MessageId", + "Description": "Unique message identifier inside the chat", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "author_signature", + "ConvertedName": "AuthorSignature", + "Description": "Signature of the original post author", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + } + ] + ] + } + }, + { + "Name": "PhotoSize", + "Description": "This object represents one size of a photo or a file / sticker thumbnail.", + "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": "width", + "ConvertedName": "Width", + "Description": "Photo width", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "height", + "ConvertedName": "Height", + "Description": "Photo height", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "file_size", + "ConvertedName": "FileSize", + "Description": "File size in bytes", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + } + ] + ] + } + }, + { + "Name": "Animation", + "Description": "This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).", + "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": "width", + "ConvertedName": "Width", + "Description": "Video width as defined by sender", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "height", + "ConvertedName": "Height", + "Description": "Video height as defined by sender", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "duration", + "ConvertedName": "Duration", + "Description": "Duration of the video in seconds as defined by sender", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "thumbnail", + "ConvertedName": "Thumbnail", + "Description": "Animation thumbnail as defined by sender", + "OriginalFieldType": "PhotoSize", + "ConvertedFieldType": "PhotoSize", + "Optional": true + }, + { + "OriginalName": "file_name", + "ConvertedName": "FileName", + "Description": "Original animation filename as defined by sender", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "mime_type", + "ConvertedName": "MimeType", + "Description": "MIME type of the file as defined by sender", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "file_size", + "ConvertedName": "FileSize", + "Description": "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.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + } + ] ] } }, @@ -2265,8 +2911,8 @@ } }, { - "Name": "UserShared", - "Description": "This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.", + "Name": "UsersShared", + "Description": "This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.", "Kind": { "Case": "Fields", "Fields": [ @@ -2278,14 +2924,14 @@ "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false - }, - { - "OriginalName": "user_id", - "ConvertedName": "UserId", - "Description": "Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "int64", - "Optional": false + }, + { + "OriginalName": "user_ids", + "ConvertedName": "UserIds", + "Description": "Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means.", + "OriginalFieldType": "Array of Integer", + "ConvertedFieldType": "int64[]", + "Optional": false } ] ] @@ -2417,6 +3063,273 @@ ] } }, + { + "Name": "GiveawayCreated", + "Description": "This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.", + "Kind": { + "Case": "Stub" + } + }, + { + "Name": "Giveaway", + "Description": "This object represents a message about a scheduled giveaway.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "chats", + "ConvertedName": "Chats", + "Description": "The list of chats which the user must join to participate in the giveaway", + "OriginalFieldType": "Array of Chat", + "ConvertedFieldType": "Chat[]", + "Optional": false + }, + { + "OriginalName": "winners_selection_date", + "ConvertedName": "WinnersSelectionDate", + "Description": "Point in time (Unix timestamp) when winners of the giveaway will be selected", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "winner_count", + "ConvertedName": "WinnerCount", + "Description": "The number of users which are supposed to be selected as winners of the giveaway", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "only_new_members", + "ConvertedName": "OnlyNewMembers", + "Description": "True, if only users who join the chats after the giveaway started should be eligible to win", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "has_public_winners", + "ConvertedName": "HasPublicWinners", + "Description": "True, if the list of giveaway winners will be visible to everyone", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "prize_description", + "ConvertedName": "PrizeDescription", + "Description": "Description of additional giveaway prize", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "country_codes", + "ConvertedName": "CountryCodes", + "Description": "A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.", + "OriginalFieldType": "Array of String", + "ConvertedFieldType": "string[]", + "Optional": true + }, + { + "OriginalName": "premium_subscription_month_count", + "ConvertedName": "PremiumSubscriptionMonthCount", + "Description": "The number of months the Telegram Premium subscription won from the giveaway will be active for", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + } + ] + ] + } + }, + { + "Name": "GiveawayWinners", + "Description": "This object represents a message about the completion of a giveaway with public winners.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "chat", + "ConvertedName": "Chat", + "Description": "The chat that created the giveaway", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": false + }, + { + "OriginalName": "giveaway_message_id", + "ConvertedName": "GiveawayMessageId", + "Description": "Identifier of the messsage with the giveaway in the chat", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "winners_selection_date", + "ConvertedName": "WinnersSelectionDate", + "Description": "Point in time (Unix timestamp) when winners of the giveaway were selected", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "winner_count", + "ConvertedName": "WinnerCount", + "Description": "Total number of winners in the giveaway", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "winners", + "ConvertedName": "Winners", + "Description": "List of up to 100 winners of the giveaway", + "OriginalFieldType": "Array of User", + "ConvertedFieldType": "User[]", + "Optional": false + }, + { + "OriginalName": "additional_chat_count", + "ConvertedName": "AdditionalChatCount", + "Description": "The number of other chats the user had to join in order to be eligible for the giveaway", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "premium_subscription_month_count", + "ConvertedName": "PremiumSubscriptionMonthCount", + "Description": "The number of months the Telegram Premium subscription won from the giveaway will be active for", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "unclaimed_prize_count", + "ConvertedName": "UnclaimedPrizeCount", + "Description": "Number of undistributed prizes", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "only_new_members", + "ConvertedName": "OnlyNewMembers", + "Description": "True, if only users who had joined the chats after the giveaway started were eligible to win", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "was_refunded", + "ConvertedName": "WasRefunded", + "Description": "True, if the giveaway was canceled because the payment for it was refunded", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "prize_description", + "ConvertedName": "PrizeDescription", + "Description": "Description of additional giveaway prize", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + } + ] + ] + } + }, + { + "Name": "GiveawayCompleted", + "Description": "This object represents a service message about the completion of a giveaway without public winners.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "winner_count", + "ConvertedName": "WinnerCount", + "Description": "Number of winners in the giveaway", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "unclaimed_prize_count", + "ConvertedName": "UnclaimedPrizeCount", + "Description": "Number of undistributed prizes", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, + { + "OriginalName": "giveaway_message", + "ConvertedName": "GiveawayMessage", + "Description": "Message with the giveaway that was completed, if it wasn\u0027t deleted", + "OriginalFieldType": "Message", + "ConvertedFieldType": "Message", + "Optional": true + } + ] + ] + } + }, + { + "Name": "LinkPreviewOptions", + "Description": "Describes the options used for link preview generation.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "is_disabled", + "ConvertedName": "IsDisabled", + "Description": "True, if the link preview is disabled", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "url", + "ConvertedName": "Url", + "Description": "URL to use for the link preview. If empty, then the first URL found in the message text will be used", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "prefer_small_media", + "ConvertedName": "PreferSmallMedia", + "Description": "True, if the media in the link preview is suppposed to be shrunk; ignored if the URL isn\u0027t explicitly specified or media size change isn\u0027t supported for the preview", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "prefer_large_media", + "ConvertedName": "PreferLargeMedia", + "Description": "True, if the media in the link preview is suppposed to be enlarged; ignored if the URL isn\u0027t explicitly specified or media size change isn\u0027t supported for the preview", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "show_above_text", + "ConvertedName": "ShowAboveText", + "Description": "True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + } + ] + ] + } + }, { "Name": "UserProfilePhotos", "Description": "This object represent a user\u0027s profile pictures.", @@ -2567,7 +3480,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_user, request_chat, request_contact, request_location, and request_poll are mutually exclusive.\nNote:request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.\nNote:request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.\nNote:web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.\nNote:request_user 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. 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_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.\nNote:request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.\nNote:web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.\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": [ @@ -2581,11 +3494,11 @@ "Optional": false }, { - "OriginalName": "request_user", - "ConvertedName": "RequestUser", - "Description": "If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a \u201Cuser_shared\u201D service message. Available in private chats only.", - "OriginalFieldType": "KeyboardButtonRequestUser", - "ConvertedFieldType": "KeyboardButtonRequestUser", + "OriginalName": "request_users", + "ConvertedName": "RequestUsers", + "Description": "If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a \u201Cusers_shared\u201D service message. Available in private chats only.", + "OriginalFieldType": "KeyboardButtonRequestUsers", + "ConvertedFieldType": "KeyboardButtonRequestUsers", "Optional": true }, { @@ -2633,8 +3546,8 @@ } }, { - "Name": "KeyboardButtonRequestUser", - "Description": "This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. More about requesting users \u00BB", + "Name": "KeyboardButtonRequestUsers", + "Description": "This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users \u00BB", "Kind": { "Case": "Fields", "Fields": [ @@ -2642,7 +3555,7 @@ { "OriginalName": "request_id", "ConvertedName": "RequestId", - "Description": "Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message", + "Description": "Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message", "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": false @@ -2650,7 +3563,7 @@ { "OriginalName": "user_is_bot", "ConvertedName": "UserIsBot", - "Description": "Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied.", + "Description": "Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -2658,10 +3571,18 @@ { "OriginalName": "user_is_premium", "ConvertedName": "UserIsPremium", - "Description": "Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied.", + "Description": "Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true + }, + { + "OriginalName": "max_quantity", + "ConvertedName": "MaxQuantity", + "Description": "The maximum number of users to be selected; 1-10. Defaults to 1.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true } ] ] @@ -3018,9 +3939,9 @@ { "OriginalName": "message", "ConvertedName": "Message", - "Description": "Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old", - "OriginalFieldType": "Message", - "ConvertedFieldType": "Message", + "Description": "Message sent by the bot with the callback button that originated the query", + "OriginalFieldType": "MaybeInaccessibleMessage", + "ConvertedFieldType": "MaybeInaccessibleMessage", "Optional": true }, { @@ -3332,25 +4253,92 @@ "Optional": true }, { - "OriginalName": "can_delete_stories", - "ConvertedName": "CanDeleteStories", - "Description": "True, if the administrator can delete stories posted by other users; channels only", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", - "Optional": true + "OriginalName": "can_delete_stories", + "ConvertedName": "CanDeleteStories", + "Description": "True, if the administrator can delete stories posted by other users; channels only", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "can_manage_topics", + "ConvertedName": "CanManageTopics", + "Description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "can_manage_voice_chats", + "ConvertedName": "CanManageVoiceChats", + "Description": "DEPRECATED: use can_manage_video_chats instead", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + } + ] + ] + } + }, + { + "Name": "ChatMemberUpdated", + "Description": "This object represents changes in the status of a chat member.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "chat", + "ConvertedName": "Chat", + "Description": "Chat the user belongs to", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": false + }, + { + "OriginalName": "from", + "ConvertedName": "From", + "Description": "Performer of the action, which resulted in the change", + "OriginalFieldType": "User", + "ConvertedFieldType": "User", + "Optional": false + }, + { + "OriginalName": "date", + "ConvertedName": "Date", + "Description": "Date the change was done in Unix time", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "DateTime", + "Optional": false + }, + { + "OriginalName": "old_chat_member", + "ConvertedName": "OldChatMember", + "Description": "Previous information about the chat member", + "OriginalFieldType": "ChatMember", + "ConvertedFieldType": "ChatMember", + "Optional": false + }, + { + "OriginalName": "new_chat_member", + "ConvertedName": "NewChatMember", + "Description": "New information about the chat member", + "OriginalFieldType": "ChatMember", + "ConvertedFieldType": "ChatMember", + "Optional": false }, { - "OriginalName": "can_manage_topics", - "ConvertedName": "CanManageTopics", - "Description": "True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "invite_link", + "ConvertedName": "InviteLink", + "Description": "Chat invite link, which was used by the user to join the chat; for joining by invite link events only.", + "OriginalFieldType": "ChatInviteLink", + "ConvertedFieldType": "ChatInviteLink", "Optional": true }, { - "OriginalName": "can_manage_voice_chats", - "ConvertedName": "CanManageVoiceChats", - "Description": "DEPRECATED: use can_manage_video_chats instead", + "OriginalName": "via_chat_folder_invite_link", + "ConvertedName": "ViaChatFolderInviteLink", + "Description": "True, if the user joined the chat via a chat folder invite link", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -3669,7 +4657,7 @@ { "OriginalName": "can_send_messages", "ConvertedName": "CanSendMessages", - "Description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues", + "Description": "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": false @@ -3852,73 +4840,6 @@ ] } }, - { - "Name": "ChatMemberUpdated", - "Description": "This object represents changes in the status of a chat member.", - "Kind": { - "Case": "Fields", - "Fields": [ - [ - { - "OriginalName": "chat", - "ConvertedName": "Chat", - "Description": "Chat the user belongs to", - "OriginalFieldType": "Chat", - "ConvertedFieldType": "Chat", - "Optional": false - }, - { - "OriginalName": "from", - "ConvertedName": "From", - "Description": "Performer of the action, which resulted in the change", - "OriginalFieldType": "User", - "ConvertedFieldType": "User", - "Optional": false - }, - { - "OriginalName": "date", - "ConvertedName": "Date", - "Description": "Date the change was done in Unix time", - "OriginalFieldType": "Integer", - "ConvertedFieldType": "DateTime", - "Optional": false - }, - { - "OriginalName": "old_chat_member", - "ConvertedName": "OldChatMember", - "Description": "Previous information about the chat member", - "OriginalFieldType": "ChatMember", - "ConvertedFieldType": "ChatMember", - "Optional": false - }, - { - "OriginalName": "new_chat_member", - "ConvertedName": "NewChatMember", - "Description": "New information about the chat member", - "OriginalFieldType": "ChatMember", - "ConvertedFieldType": "ChatMember", - "Optional": false - }, - { - "OriginalName": "invite_link", - "ConvertedName": "InviteLink", - "Description": "Chat invite link, which was used by the user to join the chat; for joining by invite link events only.", - "OriginalFieldType": "ChatInviteLink", - "ConvertedFieldType": "ChatInviteLink", - "Optional": true - }, - { - "OriginalName": "via_chat_folder_invite_link", - "ConvertedName": "ViaChatFolderInviteLink", - "Description": "True, if the user joined the chat via a chat folder invite link", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", - "Optional": true - } - ] - ] - } - }, { "Name": "ChatJoinRequest", "Description": "Represents a join request sent to a chat.", @@ -3988,7 +4909,7 @@ { "OriginalName": "can_send_messages", "ConvertedName": "CanSendMessages", - "Description": "True, if the user is allowed to send text messages, contacts, invoices, locations and venues", + "Description": "True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4066,62 +4987,272 @@ "Optional": true }, { - "OriginalName": "can_change_info", - "ConvertedName": "CanChangeInfo", - "Description": "True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "can_change_info", + "ConvertedName": "CanChangeInfo", + "Description": "True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "can_invite_users", + "ConvertedName": "CanInviteUsers", + "Description": "True, if the user is allowed to invite new users to the chat", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "can_pin_messages", + "ConvertedName": "CanPinMessages", + "Description": "True, if the user is allowed to pin messages. Ignored in public supergroups", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "can_manage_topics", + "ConvertedName": "CanManageTopics", + "Description": "True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + } + ] + ] + } + }, + { + "Name": "ChatLocation", + "Description": "Represents a location to which a chat is connected.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "location", + "ConvertedName": "Location", + "Description": "The location to which the supergroup is connected. Can\u0027t be a live location.", + "OriginalFieldType": "Location", + "ConvertedFieldType": "Location", + "Optional": false + }, + { + "OriginalName": "address", + "ConvertedName": "Address", + "Description": "Location address; 1-64 characters, as defined by the chat owner", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ] + ] + } + }, + { + "Name": "ReactionType", + "Description": "This object describes the type of a reaction. Currently, it can be one of", + "Kind": { + "Case": "Cases", + "Fields": [ + [ + { + "Name": "Emoji", + "CaseType": "ReactionTypeEmoji" + }, + { + "Name": "CustomEmoji", + "CaseType": "ReactionTypeCustomEmoji" + } + ] + ] + } + }, + { + "Name": "ReactionTypeEmoji", + "Description": "The reaction is based on an emoji.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the reaction, always \u201Cemoji\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "emoji", + "ConvertedName": "Emoji", + "Description": "Reaction emoji. Currently, it can be one of \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022, \u0022\u0022", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ] + ] + } + }, + { + "Name": "ReactionTypeCustomEmoji", + "Description": "The reaction is based on a custom emoji.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the reaction, always \u201Ccustom_emoji\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "custom_emoji_id", + "ConvertedName": "CustomEmojiId", + "Description": "Custom emoji identifier", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + } + ] + ] + } + }, + { + "Name": "ReactionCount", + "Description": "Represents a reaction added to a message along with the number of times it was added.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "type", + "ConvertedName": "Type", + "Description": "Type of the reaction", + "OriginalFieldType": "ReactionType", + "ConvertedFieldType": "ReactionType", + "Optional": false + }, + { + "OriginalName": "total_count", + "ConvertedName": "TotalCount", + "Description": "Number of times the reaction was added", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + } + ] + ] + } + }, + { + "Name": "MessageReactionUpdated", + "Description": "This object represents a change of a reaction on a message performed by a user.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "chat", + "ConvertedName": "Chat", + "Description": "The chat containing the message the user reacted to", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": false + }, + { + "OriginalName": "message_id", + "ConvertedName": "MessageId", + "Description": "Unique identifier of the message inside the chat", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "user", + "ConvertedName": "User", + "Description": "The user that changed the reaction, if the user isn\u0027t anonymous", + "OriginalFieldType": "User", + "ConvertedFieldType": "User", "Optional": true }, { - "OriginalName": "can_invite_users", - "ConvertedName": "CanInviteUsers", - "Description": "True, if the user is allowed to invite new users to the chat", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "actor_chat", + "ConvertedName": "ActorChat", + "Description": "The chat on behalf of which the reaction was changed, if the user is anonymous", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", "Optional": true }, { - "OriginalName": "can_pin_messages", - "ConvertedName": "CanPinMessages", - "Description": "True, if the user is allowed to pin messages. Ignored in public supergroups", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", - "Optional": true + "OriginalName": "date", + "ConvertedName": "Date", + "Description": "Date of the change in Unix time", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "DateTime", + "Optional": false }, { - "OriginalName": "can_manage_topics", - "ConvertedName": "CanManageTopics", - "Description": "True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", - "Optional": true + "OriginalName": "old_reaction", + "ConvertedName": "OldReaction", + "Description": "Previous list of reaction types that were set by the user", + "OriginalFieldType": "Array of ReactionType", + "ConvertedFieldType": "ReactionType[]", + "Optional": false + }, + { + "OriginalName": "new_reaction", + "ConvertedName": "NewReaction", + "Description": "New list of reaction types that have been set by the user", + "OriginalFieldType": "Array of ReactionType", + "ConvertedFieldType": "ReactionType[]", + "Optional": false } ] ] } }, { - "Name": "ChatLocation", - "Description": "Represents a location to which a chat is connected.", + "Name": "MessageReactionCountUpdated", + "Description": "This object represents reaction changes on a message with anonymous reactions.", "Kind": { "Case": "Fields", "Fields": [ [ { - "OriginalName": "location", - "ConvertedName": "Location", - "Description": "The location to which the supergroup is connected. Can\u0027t be a live location.", - "OriginalFieldType": "Location", - "ConvertedFieldType": "Location", + "OriginalName": "chat", + "ConvertedName": "Chat", + "Description": "The chat containing the message", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", "Optional": false }, { - "OriginalName": "address", - "ConvertedName": "Address", - "Description": "Location address; 1-64 characters, as defined by the chat owner", - "OriginalFieldType": "String", - "ConvertedFieldType": "string", + "OriginalName": "message_id", + "ConvertedName": "MessageId", + "Description": "Unique message identifier inside the chat", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "date", + "ConvertedName": "Date", + "Description": "Date of the change in Unix time", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "DateTime", + "Optional": false + }, + { + "OriginalName": "reactions", + "ConvertedName": "Reactions", + "Description": "List of reactions that are present on the message", + "OriginalFieldType": "Array of ReactionCount", + "ConvertedFieldType": "ReactionCount[]", "Optional": false } ] @@ -4555,6 +5686,258 @@ ] } }, + { + "Name": "ChatBoostSource", + "Description": "This object describes the source of a chat boost. It can be one of", + "Kind": { + "Case": "Cases", + "Fields": [ + [ + { + "Name": "Premium", + "CaseType": "ChatBoostSourcePremium" + }, + { + "Name": "GiftCode", + "CaseType": "ChatBoostSourceGiftCode" + }, + { + "Name": "Giveaway", + "CaseType": "ChatBoostSourceGiveaway" + } + ] + ] + } + }, + { + "Name": "ChatBoostSourcePremium", + "Description": "The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "source", + "ConvertedName": "Source", + "Description": "Source of the boost, always \u201Cpremium\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "user", + "ConvertedName": "User", + "Description": "User that boosted the chat", + "OriginalFieldType": "User", + "ConvertedFieldType": "User", + "Optional": false + } + ] + ] + } + }, + { + "Name": "ChatBoostSourceGiftCode", + "Description": "The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "source", + "ConvertedName": "Source", + "Description": "Source of the boost, always \u201Cgift_code\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "user", + "ConvertedName": "User", + "Description": "User for which the gift code was created", + "OriginalFieldType": "User", + "ConvertedFieldType": "User", + "Optional": false + } + ] + ] + } + }, + { + "Name": "ChatBoostSourceGiveaway", + "Description": "The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "source", + "ConvertedName": "Source", + "Description": "Source of the boost, always \u201Cgiveaway\u201D", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "giveaway_message_id", + "ConvertedName": "GiveawayMessageId", + "Description": "Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn\u0027t sent yet.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "user", + "ConvertedName": "User", + "Description": "User that won the prize in the giveaway if any", + "OriginalFieldType": "User", + "ConvertedFieldType": "User", + "Optional": true + }, + { + "OriginalName": "is_unclaimed", + "ConvertedName": "IsUnclaimed", + "Description": "True, if the giveaway was completed, but there was no user to win the prize", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + } + ] + ] + } + }, + { + "Name": "ChatBoost", + "Description": "This object contains information about a chat boost.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "boost_id", + "ConvertedName": "BoostId", + "Description": "Unique identifier of the boost", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "add_date", + "ConvertedName": "AddDate", + "Description": "Point in time (Unix timestamp) when the chat was boosted", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "expiration_date", + "ConvertedName": "ExpirationDate", + "Description": "Point in time (Unix timestamp) when the boost will automatically expire, unless the booster\u0027s Telegram Premium subscription is prolonged", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "source", + "ConvertedName": "Source", + "Description": "Source of the added boost", + "OriginalFieldType": "ChatBoostSource", + "ConvertedFieldType": "ChatBoostSource", + "Optional": false + } + ] + ] + } + }, + { + "Name": "ChatBoostUpdated", + "Description": "This object represents a boost added to a chat or changed.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "chat", + "ConvertedName": "Chat", + "Description": "Chat which was boosted", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": false + }, + { + "OriginalName": "boost", + "ConvertedName": "Boost", + "Description": "Infomation about the chat boost", + "OriginalFieldType": "ChatBoost", + "ConvertedFieldType": "ChatBoost", + "Optional": false + } + ] + ] + } + }, + { + "Name": "ChatBoostRemoved", + "Description": "This object represents a boost removed from a chat.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "chat", + "ConvertedName": "Chat", + "Description": "Chat which was boosted", + "OriginalFieldType": "Chat", + "ConvertedFieldType": "Chat", + "Optional": false + }, + { + "OriginalName": "boost_id", + "ConvertedName": "BoostId", + "Description": "Unique identifier of the boost", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "remove_date", + "ConvertedName": "RemoveDate", + "Description": "Point in time (Unix timestamp) when the boost was removed", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "source", + "ConvertedName": "Source", + "Description": "Source of the removed boost", + "OriginalFieldType": "ChatBoostSource", + "ConvertedFieldType": "ChatBoostSource", + "Optional": false + } + ] + ] + } + }, + { + "Name": "UserChatBoosts", + "Description": "This object represents a list of boosts added to a chat by a user.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "boosts", + "ConvertedName": "Boosts", + "Description": "The list of boosts added to the chat by the user", + "OriginalFieldType": "Array of ChatBoost", + "ConvertedFieldType": "ChatBoost[]", + "Optional": false + } + ] + ] + } + }, { "Name": "ResponseParameters", "Description": "Describes why a request was unsuccessful.", @@ -7499,11 +8882,11 @@ "Optional": true }, { - "OriginalName": "disable_web_page_preview", - "ConvertedName": "DisableWebPagePreview", - "Description": "Disables link previews for links in the sent message", - "OriginalFieldType": "Boolean", - "ConvertedFieldType": "bool", + "OriginalName": "link_preview_options", + "ConvertedName": "LinkPreviewOptions", + "Description": "Link preview generation options for the message", + "OriginalFieldType": "LinkPreviewOptions", + "ConvertedFieldType": "LinkPreviewOptions", "Optional": true } ] diff --git a/src/Funogram.Telegram/Api.fs b/src/Funogram.Telegram/Api.fs index eafddf9..e5fb3a6 100644 --- a/src/Funogram.Telegram/Api.fs +++ b/src/Funogram.Telegram/Api.fs @@ -2,6 +2,7 @@ module Funogram.Telegram.Api open Funogram.Telegram +open Funogram.Telegram.Types open Types let deleteWebhookBase () = @@ -15,7 +16,7 @@ let sendMessageByChatName chatName text = Req.SendMessage.Make(ChatId.String cha let sendMessageMarkup chatId text replyMarkup = Req.SendMessage.Make(ChatId.Int chatId, text, replyMarkup = replyMarkup) -let sendMessageReply chatId text replyToMessageId = Req.SendMessage.Make(ChatId.Int chatId, text, replyToMessageId = replyToMessageId) +let sendMessageReply chatId text replyToMessageId = Req.SendMessage.Make(ChatId.Int chatId, text, replyParameters = ReplyParameters.Create replyToMessageId) let forwardMessage chatId fromChatId messageId = Req.ForwardMessage.Make(ChatId.Int chatId, ChatId.Int fromChatId, messageId) diff --git a/src/Funogram.Telegram/Bot.fs b/src/Funogram.Telegram/Bot.fs index dd61f1a..f11f79c 100644 --- a/src/Funogram.Telegram/Bot.fs +++ b/src/Funogram.Telegram/Bot.fs @@ -107,7 +107,7 @@ let private runBot config me updateArrived updatesArrived = async { try let! updatesResult = - Req.GetUpdates.Make(offset, ?limit = config.Limit, ?timeout = config.Timeout) + Req.GetUpdates.Make(offset, ?limit = config.Limit, ?timeout = config.Timeout, ?allowedUpdates = (config.AllowedUpdates |> Option.map Seq.toArray)) |> bot match updatesResult with diff --git a/src/Funogram.Telegram/RequestsTypes.fs b/src/Funogram.Telegram/RequestsTypes.fs index bce16a0..1d70310 100644 --- a/src/Funogram.Telegram/RequestsTypes.fs +++ b/src/Funogram.Telegram/RequestsTypes.fs @@ -83,31 +83,29 @@ type SendMessage = Text: string ParseMode: ParseMode option Entities: MessageEntity[] option - DisableWebPagePreview: bool option + LinkPreviewOptions: LinkPreviewOptions option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, text: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?disableWebPagePreview: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, text: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId Text = text ParseMode = parseMode Entities = entities - DisableWebPagePreview = disableWebPagePreview + LinkPreviewOptions = linkPreviewOptions DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, text: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?disableWebPagePreview: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendMessage.Make(ChatId.Int chatId, text, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?disableWebPagePreview = disableWebPagePreview, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, text: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?disableWebPagePreview: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendMessage.Make(ChatId.String chatId, text, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?disableWebPagePreview = disableWebPagePreview, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, text: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendMessage.Make(ChatId.Int chatId, text, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?linkPreviewOptions = linkPreviewOptions, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, text: string, ?messageThreadId: int64, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendMessage.Make(ChatId.String chatId, text, ?messageThreadId = messageThreadId, ?parseMode = parseMode, ?entities = entities, ?linkPreviewOptions = linkPreviewOptions, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendMessage" @@ -136,6 +134,31 @@ type ForwardMessage = interface IRequestBase with member _.MethodName = "forwardMessage" +type ForwardMessages = + { + ChatId: ChatId + MessageThreadId: int64 option + FromChatId: ChatId + MessageIds: int64[] + DisableNotification: bool option + ProtectContent: bool option + } + static member Make(chatId: ChatId, fromChatId: ChatId, messageIds: int64[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool) = + { + ChatId = chatId + MessageThreadId = messageThreadId + FromChatId = fromChatId + MessageIds = messageIds + DisableNotification = disableNotification + ProtectContent = protectContent + } + static member Make(chatId: int64, fromChatId: int64, messageIds: int64[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool) = + ForwardMessages.Make(ChatId.Int chatId, ChatId.Int fromChatId, messageIds, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent) + static member Make(chatId: string, fromChatId: string, messageIds: int64[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool) = + ForwardMessages.Make(ChatId.String chatId, ChatId.String fromChatId, messageIds, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent) + interface IRequestBase with + member _.MethodName = "forwardMessages" + type CopyMessage = { ChatId: ChatId @@ -147,11 +170,10 @@ type CopyMessage = CaptionEntities: MessageEntity[] option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: 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, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + 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) = { ChatId = chatId MessageThreadId = messageThreadId @@ -162,17 +184,43 @@ type CopyMessage = CaptionEntities = captionEntities DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + 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, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - CopyMessage.Make(ChatId.Int chatId, ChatId.Int fromChatId, messageId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, fromChatId: string, messageId: int64, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - CopyMessage.Make(ChatId.String chatId, ChatId.String fromChatId, messageId, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?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) interface IRequestBase with member _.MethodName = "copyMessage" +type CopyMessages = + { + ChatId: ChatId + MessageThreadId: int64 option + FromChatId: ChatId + MessageIds: int64[] + DisableNotification: bool option + ProtectContent: bool option + RemoveCaption: bool option + } + static member Make(chatId: ChatId, fromChatId: ChatId, messageIds: int64[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?removeCaption: bool) = + { + ChatId = chatId + MessageThreadId = messageThreadId + FromChatId = fromChatId + MessageIds = messageIds + DisableNotification = disableNotification + ProtectContent = protectContent + RemoveCaption = removeCaption + } + static member Make(chatId: int64, fromChatId: int64, messageIds: int64[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?removeCaption: bool) = + CopyMessages.Make(ChatId.Int chatId, ChatId.Int fromChatId, messageIds, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?removeCaption = removeCaption) + static member Make(chatId: string, fromChatId: string, messageIds: int64[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?removeCaption: bool) = + CopyMessages.Make(ChatId.String chatId, ChatId.String fromChatId, messageIds, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?removeCaption = removeCaption) + interface IRequestBase with + member _.MethodName = "copyMessages" + type SendPhoto = { ChatId: ChatId @@ -184,11 +232,10 @@ type SendPhoto = HasSpoiler: bool option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, photo: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, photo: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -199,14 +246,13 @@ type SendPhoto = HasSpoiler = hasSpoiler DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, photo: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendPhoto.Make(ChatId.Int chatId, photo, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, photo: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendPhoto.Make(ChatId.String chatId, photo, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, photo: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendPhoto.Make(ChatId.Int chatId, photo, ?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, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendPhoto.Make(ChatId.String chatId, photo, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendPhoto" @@ -224,11 +270,10 @@ type SendAudio = Thumbnail: InputFile option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, audio: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, audio: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -242,14 +287,13 @@ type SendAudio = Thumbnail = thumbnail DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, audio: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendAudio.Make(ChatId.Int chatId, audio, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?performer = performer, ?title = title, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, audio: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?performer: string, ?title: string, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendAudio.Make(ChatId.String chatId, audio, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?performer = performer, ?title = title, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, audio: InputFile, ?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, ?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, ?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, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?performer = performer, ?title = title, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendAudio" @@ -265,11 +309,10 @@ type SendDocument = DisableContentTypeDetection: bool option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, document: InputFile, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, document: InputFile, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -281,14 +324,13 @@ type SendDocument = DisableContentTypeDetection = disableContentTypeDetection DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, document: InputFile, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendDocument.Make(ChatId.Int chatId, document, ?messageThreadId = messageThreadId, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableContentTypeDetection = disableContentTypeDetection, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, document: InputFile, ?messageThreadId: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?disableContentTypeDetection: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendDocument.Make(ChatId.String chatId, document, ?messageThreadId = messageThreadId, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableContentTypeDetection = disableContentTypeDetection, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, document: InputFile, ?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, ?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, ?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, ?messageThreadId = messageThreadId, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?disableContentTypeDetection = disableContentTypeDetection, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendDocument" @@ -308,11 +350,10 @@ type SendVideo = SupportsStreaming: bool option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, video: InputFile, ?replyToMessageId: int64, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, video: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?supportsStreaming: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -328,14 +369,13 @@ type SendVideo = SupportsStreaming = supportsStreaming DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, video: InputFile, ?replyToMessageId: int64, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendVideo.Make(ChatId.Int chatId, video, ?replyToMessageId = replyToMessageId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?supportsStreaming = supportsStreaming, ?hasSpoiler = hasSpoiler, ?captionEntities = captionEntities, ?parseMode = parseMode, ?caption = caption, ?thumbnail = thumbnail, ?height = height, ?width = width, ?duration = duration, ?messageThreadId = messageThreadId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, video: InputFile, ?replyToMessageId: int64, ?protectContent: bool, ?disableNotification: bool, ?supportsStreaming: bool, ?hasSpoiler: bool, ?captionEntities: MessageEntity[], ?parseMode: ParseMode, ?caption: string, ?thumbnail: InputFile, ?height: int64, ?width: int64, ?duration: int64, ?messageThreadId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendVideo.Make(ChatId.String chatId, video, ?replyToMessageId = replyToMessageId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?supportsStreaming = supportsStreaming, ?hasSpoiler = hasSpoiler, ?captionEntities = captionEntities, ?parseMode = parseMode, ?caption = caption, ?thumbnail = thumbnail, ?height = height, ?width = width, ?duration = duration, ?messageThreadId = messageThreadId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, video: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?supportsStreaming: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideo.Make(ChatId.Int chatId, video, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?supportsStreaming = supportsStreaming, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, video: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?supportsStreaming: bool, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideo.Make(ChatId.String chatId, video, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?supportsStreaming = supportsStreaming, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVideo" @@ -354,11 +394,10 @@ type SendAnimation = HasSpoiler: bool option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, animation: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, animation: InputFile, ?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) = { ChatId = chatId MessageThreadId = messageThreadId @@ -373,14 +412,13 @@ type SendAnimation = HasSpoiler = hasSpoiler DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, animation: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendAnimation.Make(ChatId.Int chatId, animation, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, animation: InputFile, ?messageThreadId: int64, ?duration: int64, ?width: int64, ?height: int64, ?thumbnail: InputFile, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?hasSpoiler: bool, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendAnimation.Make(ChatId.String chatId, animation, ?messageThreadId = messageThreadId, ?duration = duration, ?width = width, ?height = height, ?thumbnail = thumbnail, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?hasSpoiler = hasSpoiler, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, animation: InputFile, ?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, ?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, ?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, ?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) interface IRequestBase with member _.MethodName = "sendAnimation" @@ -395,11 +433,10 @@ type SendVoice = Duration: int64 option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, voice: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, voice: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -410,14 +447,13 @@ type SendVoice = Duration = duration DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, voice: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendVoice.Make(ChatId.Int chatId, voice, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, voice: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendVoice.Make(ChatId.String chatId, voice, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, voice: InputFile, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVoice.Make(ChatId.Int chatId, voice, ?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, ?messageThreadId: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?duration: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVoice.Make(ChatId.String chatId, voice, ?messageThreadId = messageThreadId, ?caption = caption, ?parseMode = parseMode, ?captionEntities = captionEntities, ?duration = duration, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVoice" @@ -431,11 +467,10 @@ type SendVideoNote = Thumbnail: InputFile option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, videoNote: InputFile, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, videoNote: InputFile, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -445,14 +480,13 @@ type SendVideoNote = Thumbnail = thumbnail DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, videoNote: InputFile, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendVideoNote.Make(ChatId.Int chatId, videoNote, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, videoNote: InputFile, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendVideoNote.Make(ChatId.String chatId, videoNote, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, videoNote: InputFile, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideoNote.Make(ChatId.Int chatId, videoNote, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, videoNote: InputFile, ?messageThreadId: int64, ?duration: int64, ?length: int64, ?thumbnail: InputFile, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendVideoNote.Make(ChatId.String chatId, videoNote, ?messageThreadId = messageThreadId, ?duration = duration, ?length = length, ?thumbnail = thumbnail, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVideoNote" @@ -463,23 +497,21 @@ type SendMediaGroup = Media: InputMedia[] DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option } - static member Make(chatId: ChatId, media: InputMedia[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool) = + static member Make(chatId: ChatId, media: InputMedia[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = { ChatId = chatId MessageThreadId = messageThreadId Media = media DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters } - static member Make(chatId: int64, media: InputMedia[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool) = - SendMediaGroup.Make(ChatId.Int chatId, media, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply) - static member Make(chatId: string, media: InputMedia[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool) = - SendMediaGroup.Make(ChatId.String chatId, media, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply) + static member Make(chatId: int64, media: InputMedia[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = + SendMediaGroup.Make(ChatId.Int chatId, media, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters) + static member Make(chatId: string, media: InputMedia[], ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters) = + SendMediaGroup.Make(ChatId.String chatId, media, ?messageThreadId = messageThreadId, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters) interface IRequestBase with member _.MethodName = "sendMediaGroup" @@ -495,11 +527,10 @@ type SendLocation = ProximityAlertRadius: int64 option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, latitude: float, longitude: float, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, latitude: float, longitude: float, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -511,14 +542,13 @@ type SendLocation = ProximityAlertRadius = proximityAlertRadius DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, latitude: float, longitude: float, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendLocation.Make(ChatId.Int chatId, latitude, longitude, ?messageThreadId = messageThreadId, ?horizontalAccuracy = horizontalAccuracy, ?livePeriod = livePeriod, ?heading = heading, ?proximityAlertRadius = proximityAlertRadius, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, latitude: float, longitude: float, ?messageThreadId: int64, ?horizontalAccuracy: float, ?livePeriod: int64, ?heading: int64, ?proximityAlertRadius: int64, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendLocation.Make(ChatId.String chatId, latitude, longitude, ?messageThreadId = messageThreadId, ?horizontalAccuracy = horizontalAccuracy, ?livePeriod = livePeriod, ?heading = heading, ?proximityAlertRadius = proximityAlertRadius, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, latitude: float, longitude: float, ?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, ?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, ?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, ?messageThreadId = messageThreadId, ?horizontalAccuracy = horizontalAccuracy, ?livePeriod = livePeriod, ?heading = heading, ?proximityAlertRadius = proximityAlertRadius, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendLocation" @@ -536,11 +566,10 @@ type SendVenue = GooglePlaceType: string option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, latitude: float, longitude: float, title: string, address: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, latitude: float, longitude: float, title: string, address: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -554,14 +583,13 @@ type SendVenue = GooglePlaceType = googlePlaceType DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, latitude: float, longitude: float, title: string, address: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendVenue.Make(ChatId.Int chatId, latitude, longitude, title, address, ?messageThreadId = messageThreadId, ?foursquareId = foursquareId, ?foursquareType = foursquareType, ?googlePlaceId = googlePlaceId, ?googlePlaceType = googlePlaceType, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, latitude: float, longitude: float, title: string, address: string, ?messageThreadId: int64, ?foursquareId: string, ?foursquareType: string, ?googlePlaceId: string, ?googlePlaceType: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendVenue.Make(ChatId.String chatId, latitude, longitude, title, address, ?messageThreadId = messageThreadId, ?foursquareId = foursquareId, ?foursquareType = foursquareType, ?googlePlaceId = googlePlaceId, ?googlePlaceType = googlePlaceType, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, latitude: float, longitude: float, title: string, address: 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, ?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, ?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, ?messageThreadId = messageThreadId, ?foursquareId = foursquareId, ?foursquareType = foursquareType, ?googlePlaceId = googlePlaceId, ?googlePlaceType = googlePlaceType, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendVenue" @@ -575,11 +603,10 @@ type SendContact = Vcard: string option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, phoneNumber: string, firstName: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, phoneNumber: string, firstName: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -589,14 +616,13 @@ type SendContact = Vcard = vcard DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, phoneNumber: string, firstName: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendContact.Make(ChatId.Int chatId, phoneNumber, firstName, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, phoneNumber: string, firstName: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendContact.Make(ChatId.String chatId, phoneNumber, firstName, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, phoneNumber: string, firstName: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendContact.Make(ChatId.Int chatId, phoneNumber, firstName, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, phoneNumber: string, firstName: string, ?messageThreadId: int64, ?lastName: string, ?vcard: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendContact.Make(ChatId.String chatId, phoneNumber, firstName, ?messageThreadId = messageThreadId, ?lastName = lastName, ?vcard = vcard, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendContact" @@ -618,11 +644,10 @@ type SendPoll = IsClosed: bool option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, question: string, options: string[], ?replyToMessageId: int64, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanationParseMode: string, ?explanation: string, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, question: string, options: string[], ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -640,14 +665,13 @@ type SendPoll = IsClosed = isClosed DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, question: string, options: string[], ?replyToMessageId: int64, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanationParseMode: string, ?explanation: string, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendPoll.Make(ChatId.Int chatId, question, options, ?replyToMessageId = replyToMessageId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanationParseMode = explanationParseMode, ?explanation = explanation, ?correctOptionId = correctOptionId, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?messageThreadId = messageThreadId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, question: string, options: string[], ?replyToMessageId: int64, ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanationParseMode: string, ?explanation: string, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendPoll.Make(ChatId.String chatId, question, options, ?replyToMessageId = replyToMessageId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanationParseMode = explanationParseMode, ?explanation = explanation, ?correctOptionId = correctOptionId, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?messageThreadId = messageThreadId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, question: string, options: string[], ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = + SendPoll.Make(ChatId.Int chatId, question, options, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanation = explanation, ?replyParameters = replyParameters, ?correctOptionId = correctOptionId, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?messageThreadId = messageThreadId, ?explanationParseMode = explanationParseMode, ?replyMarkup = replyMarkup) + static member Make(chatId: string, question: string, options: string[], ?protectContent: bool, ?disableNotification: bool, ?isClosed: bool, ?closeDate: int64, ?openPeriod: int64, ?explanationEntities: MessageEntity[], ?explanation: string, ?replyParameters: ReplyParameters, ?correctOptionId: int64, ?allowsMultipleAnswers: bool, ?``type``: string, ?isAnonymous: bool, ?messageThreadId: int64, ?explanationParseMode: string, ?replyMarkup: Markup) = + SendPoll.Make(ChatId.String chatId, question, options, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isClosed = isClosed, ?closeDate = closeDate, ?openPeriod = openPeriod, ?explanationEntities = explanationEntities, ?explanation = explanation, ?replyParameters = replyParameters, ?correctOptionId = correctOptionId, ?allowsMultipleAnswers = allowsMultipleAnswers, ?``type`` = ``type``, ?isAnonymous = isAnonymous, ?messageThreadId = messageThreadId, ?explanationParseMode = explanationParseMode, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendPoll" @@ -658,25 +682,23 @@ type SendDice = Emoji: string option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId Emoji = emoji DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendDice.Make(ChatId.Int chatId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendDice.Make(ChatId.String chatId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendDice.Make(ChatId.Int chatId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendDice.Make(ChatId.String chatId, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendDice" @@ -699,6 +721,27 @@ type SendChatAction = interface IRequestBase with member _.MethodName = "sendChatAction" +type SetMessageReaction = + { + ChatId: ChatId + MessageId: int64 + Reaction: ReactionType[] option + IsBig: bool option + } + static member Make(chatId: ChatId, messageId: int64, ?reaction: ReactionType[], ?isBig: bool) = + { + ChatId = chatId + MessageId = messageId + Reaction = reaction + IsBig = isBig + } + static member Make(chatId: int64, messageId: int64, ?reaction: ReactionType[], ?isBig: bool) = + SetMessageReaction.Make(ChatId.Int chatId, messageId, ?reaction = reaction, ?isBig = isBig) + static member Make(chatId: string, messageId: int64, ?reaction: ReactionType[], ?isBig: bool) = + SetMessageReaction.Make(ChatId.String chatId, messageId, ?reaction = reaction, ?isBig = isBig) + interface IRequestBase with + member _.MethodName = "setMessageReaction" + type GetUserProfilePhotos = { UserId: int64 @@ -1473,6 +1516,23 @@ type AnswerCallbackQuery = interface IRequestBase with member _.MethodName = "answerCallbackQuery" +type GetUserChatBoosts = + { + ChatId: ChatId + UserId: int64 + } + static member Make(chatId: ChatId, userId: int64) = + { + ChatId = chatId + UserId = userId + } + static member Make(chatId: int64, userId: int64) = + GetUserChatBoosts.Make(ChatId.Int chatId, userId) + static member Make(chatId: string, userId: int64) = + GetUserChatBoosts.Make(ChatId.String chatId, userId) + interface IRequestBase with + member _.MethodName = "getUserChatBoosts" + type SetMyCommands = { Commands: BotCommand[] @@ -1642,10 +1702,10 @@ type EditMessageText = Text: string ParseMode: ParseMode option Entities: MessageEntity[] option - DisableWebPagePreview: bool option + LinkPreviewOptions: LinkPreviewOptions option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(text: string, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?parseMode: ParseMode, ?entities: MessageEntity[], ?disableWebPagePreview: bool, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(text: string, ?chatId: ChatId, ?messageId: int64, ?inlineMessageId: string, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?replyMarkup: InlineKeyboardMarkup) = { ChatId = chatId MessageId = messageId @@ -1653,7 +1713,7 @@ type EditMessageText = Text = text ParseMode = parseMode Entities = entities - DisableWebPagePreview = disableWebPagePreview + LinkPreviewOptions = linkPreviewOptions ReplyMarkup = replyMarkup } interface IRequestBase with @@ -1810,6 +1870,23 @@ type DeleteMessage = interface IRequestBase with member _.MethodName = "deleteMessage" +type DeleteMessages = + { + ChatId: ChatId + MessageIds: int64[] + } + static member Make(chatId: ChatId, messageIds: int64[]) = + { + ChatId = chatId + MessageIds = messageIds + } + static member Make(chatId: int64, messageIds: int64[]) = + DeleteMessages.Make(ChatId.Int chatId, messageIds) + static member Make(chatId: string, messageIds: int64[]) = + DeleteMessages.Make(ChatId.String chatId, messageIds) + interface IRequestBase with + member _.MethodName = "deleteMessages" + type SendSticker = { ChatId: ChatId @@ -1818,11 +1895,10 @@ type SendSticker = Emoji: string option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: Markup option } - static member Make(chatId: ChatId, sticker: InputFile, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = + static member Make(chatId: ChatId, sticker: InputFile, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = { ChatId = chatId MessageThreadId = messageThreadId @@ -1830,14 +1906,13 @@ type SendSticker = Emoji = emoji DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, sticker: InputFile, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendSticker.Make(ChatId.Int chatId, sticker, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) - static member Make(chatId: string, sticker: InputFile, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: Markup) = - SendSticker.Make(ChatId.String chatId, sticker, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyToMessageId = replyToMessageId, ?allowSendingWithoutReply = allowSendingWithoutReply, ?replyMarkup = replyMarkup) + static member Make(chatId: int64, sticker: InputFile, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendSticker.Make(ChatId.Int chatId, sticker, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) + static member Make(chatId: string, sticker: InputFile, ?messageThreadId: int64, ?emoji: string, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: Markup) = + SendSticker.Make(ChatId.String chatId, sticker, ?messageThreadId = messageThreadId, ?emoji = emoji, ?disableNotification = disableNotification, ?protectContent = protectContent, ?replyParameters = replyParameters, ?replyMarkup = replyMarkup) interface IRequestBase with member _.MethodName = "sendSticker" @@ -2092,11 +2167,10 @@ type SendInvoice = IsFlexible: bool option DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(chatId: ChatId, title: string, description: string, payload: string, providerToken: string, currency: string, prices: LabeledPrice[], ?replyToMessageId: int64, ?protectContent: bool, ?disableNotification: bool, ?isFlexible: bool, ?sendEmailToProvider: bool, ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?photoSize: int64, ?photoHeight: int64, ?photoWidth: int64, ?allowSendingWithoutReply: bool, ?photoUrl: string, ?providerData: string, ?startParameter: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?messageThreadId: int64, ?needName: bool, ?replyMarkup: InlineKeyboardMarkup) = + 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) = { ChatId = chatId MessageThreadId = messageThreadId @@ -2123,14 +2197,13 @@ type SendInvoice = IsFlexible = isFlexible DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } - static member Make(chatId: int64, title: string, description: string, payload: string, providerToken: string, currency: string, prices: LabeledPrice[], ?replyToMessageId: int64, ?protectContent: bool, ?disableNotification: bool, ?isFlexible: bool, ?sendEmailToProvider: bool, ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?photoSize: int64, ?photoHeight: int64, ?photoWidth: int64, ?allowSendingWithoutReply: bool, ?photoUrl: string, ?providerData: string, ?startParameter: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?messageThreadId: int64, ?needName: bool, ?replyMarkup: InlineKeyboardMarkup) = - SendInvoice.Make(ChatId.Int chatId, title, description, payload, providerToken, currency, prices, ?replyToMessageId = replyToMessageId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isFlexible = isFlexible, ?sendEmailToProvider = sendEmailToProvider, ?sendPhoneNumberToProvider = sendPhoneNumberToProvider, ?needShippingAddress = needShippingAddress, ?needEmail = needEmail, ?needPhoneNumber = needPhoneNumber, ?photoSize = photoSize, ?photoHeight = photoHeight, ?photoWidth = photoWidth, ?allowSendingWithoutReply = allowSendingWithoutReply, ?photoUrl = photoUrl, ?providerData = providerData, ?startParameter = startParameter, ?suggestedTipAmounts = suggestedTipAmounts, ?maxTipAmount = maxTipAmount, ?messageThreadId = messageThreadId, ?needName = needName, ?replyMarkup = replyMarkup) - static member Make(chatId: string, title: string, description: string, payload: string, providerToken: string, currency: string, prices: LabeledPrice[], ?replyToMessageId: int64, ?protectContent: bool, ?disableNotification: bool, ?isFlexible: bool, ?sendEmailToProvider: bool, ?sendPhoneNumberToProvider: bool, ?needShippingAddress: bool, ?needEmail: bool, ?needPhoneNumber: bool, ?photoSize: int64, ?photoHeight: int64, ?photoWidth: int64, ?allowSendingWithoutReply: bool, ?photoUrl: string, ?providerData: string, ?startParameter: string, ?suggestedTipAmounts: int64[], ?maxTipAmount: int64, ?messageThreadId: int64, ?needName: bool, ?replyMarkup: InlineKeyboardMarkup) = - SendInvoice.Make(ChatId.String chatId, title, description, payload, providerToken, currency, prices, ?replyToMessageId = replyToMessageId, ?protectContent = protectContent, ?disableNotification = disableNotification, ?isFlexible = isFlexible, ?sendEmailToProvider = sendEmailToProvider, ?sendPhoneNumberToProvider = sendPhoneNumberToProvider, ?needShippingAddress = needShippingAddress, ?needEmail = needEmail, ?needPhoneNumber = needPhoneNumber, ?photoSize = photoSize, ?photoHeight = photoHeight, ?photoWidth = photoWidth, ?allowSendingWithoutReply = allowSendingWithoutReply, ?photoUrl = photoUrl, ?providerData = providerData, ?startParameter = startParameter, ?suggestedTipAmounts = suggestedTipAmounts, ?maxTipAmount = maxTipAmount, ?messageThreadId = messageThreadId, ?needName = needName, ?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) interface IRequestBase with member _.MethodName = "sendInvoice" @@ -2235,19 +2308,17 @@ type SendGame = GameShortName: string DisableNotification: bool option ProtectContent: bool option - ReplyToMessageId: int64 option - AllowSendingWithoutReply: bool option + ReplyParameters: ReplyParameters option ReplyMarkup: InlineKeyboardMarkup option } - static member Make(chatId: int64, gameShortName: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyToMessageId: int64, ?allowSendingWithoutReply: bool, ?replyMarkup: InlineKeyboardMarkup) = + static member Make(chatId: int64, gameShortName: string, ?messageThreadId: int64, ?disableNotification: bool, ?protectContent: bool, ?replyParameters: ReplyParameters, ?replyMarkup: InlineKeyboardMarkup) = { ChatId = chatId MessageThreadId = messageThreadId GameShortName = gameShortName DisableNotification = disableNotification ProtectContent = protectContent - ReplyToMessageId = replyToMessageId - AllowSendingWithoutReply = allowSendingWithoutReply + ReplyParameters = replyParameters ReplyMarkup = replyMarkup } interface IRequestBase with diff --git a/src/Funogram.Telegram/Types.fs b/src/Funogram.Telegram/Types.fs index 9fe6bf8..bc6ecc6 100644 --- a/src/Funogram.Telegram/Types.fs +++ b/src/Funogram.Telegram/Types.fs @@ -89,6 +89,12 @@ and [] Update = /// New version of a channel post that is known to the bot and was edited [] EditedChannelPost: Message option + /// A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots. + [] + MessageReaction: MessageReactionUpdated option + /// Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify "message_reaction_count" in the list of allowed_updates to receive these updates. + [] + MessageReactionCount: MessageReactionCountUpdated option /// New incoming inline query [] InlineQuery: InlineQuery option @@ -119,24 +125,34 @@ and [] Update = /// A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates. [] ChatJoinRequest: ChatJoinRequest option + /// A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates. + [] + ChatBoost: ChatBoostUpdated option + /// A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates. + [] + RemovedChatBoost: ChatBoostRemoved option } - static member Create(updateId: int64, ?message: Message, ?editedMessage: Message, ?channelPost: Message, ?editedChannelPost: Message, ?inlineQuery: InlineQuery, ?chosenInlineResult: ChosenInlineResult, ?callbackQuery: CallbackQuery, ?shippingQuery: ShippingQuery, ?preCheckoutQuery: PreCheckoutQuery, ?poll: Poll, ?pollAnswer: PollAnswer, ?myChatMember: ChatMemberUpdated, ?chatMember: ChatMemberUpdated, ?chatJoinRequest: ChatJoinRequest) = + static member Create(updateId: int64, ?chatJoinRequest: ChatJoinRequest, ?chatMember: ChatMemberUpdated, ?myChatMember: ChatMemberUpdated, ?pollAnswer: PollAnswer, ?poll: Poll, ?preCheckoutQuery: PreCheckoutQuery, ?shippingQuery: ShippingQuery, ?chatBoost: ChatBoostUpdated, ?callbackQuery: CallbackQuery, ?inlineQuery: InlineQuery, ?messageReactionCount: MessageReactionCountUpdated, ?messageReaction: MessageReactionUpdated, ?editedChannelPost: Message, ?channelPost: Message, ?editedMessage: Message, ?message: Message, ?chosenInlineResult: ChosenInlineResult, ?removedChatBoost: ChatBoostRemoved) = { UpdateId = updateId - Message = message - EditedMessage = editedMessage - ChannelPost = channelPost - EditedChannelPost = editedChannelPost + ChatJoinRequest = chatJoinRequest + ChatMember = chatMember + MyChatMember = myChatMember + PollAnswer = pollAnswer + Poll = poll + PreCheckoutQuery = preCheckoutQuery + ShippingQuery = shippingQuery + ChatBoost = chatBoost + CallbackQuery = callbackQuery InlineQuery = inlineQuery + MessageReactionCount = messageReactionCount + MessageReaction = messageReaction + EditedChannelPost = editedChannelPost + ChannelPost = channelPost + EditedMessage = editedMessage + Message = message ChosenInlineResult = chosenInlineResult - CallbackQuery = callbackQuery - ShippingQuery = shippingQuery - PreCheckoutQuery = preCheckoutQuery - Poll = poll - PollAnswer = pollAnswer - MyChatMember = myChatMember - ChatMember = chatMember - ChatJoinRequest = chatJoinRequest + RemovedChatBoost = removedChatBoost } /// Describes the current status of a webhook. @@ -267,10 +283,25 @@ and [] Chat = /// If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat. [] ActiveUsernames: string[] option - /// Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat. + /// List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. Returned only in getChat. + [] + AvailableReactions: ReactionType[] option + /// Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. Returned only in getChat. Always returned in getChat. + [] + AccentColorId: int64 option + /// Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in getChat. + [] + BackgroundCustomEmojiId: string option + /// Identifier of the accent color for the chat's profile background. See profile accent colors for more details. Returned only in getChat. + [] + ProfileAccentColorId: int64 option + /// Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in getChat. + [] + ProfileBackgroundCustomEmojiId: string option + /// Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in getChat. [] EmojiStatusCustomEmojiId: string option - /// Expiration date of the emoji status of the other party in a private chat in Unix time, if any. Returned only in getChat. + /// Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in getChat. [] EmojiStatusExpirationDate: int64 option /// Bio of the other party in a private chat. Returned only in getChat. @@ -315,6 +346,9 @@ and [] Chat = /// True, if messages from the chat can't be forwarded to other chats. Returned only in getChat. [] HasProtectedContent: bool option + /// True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat. + [] + HasVisibleHistory: bool option /// For supergroups, name of group sticker set. Returned only in getChat. [] StickerSetName: string option @@ -328,36 +362,42 @@ and [] Chat = [] Location: ChatLocation option } - static member Create(id: int64, ``type``: ChatType, ?canSetStickerSet: bool, ?stickerSetName: string, ?hasProtectedContent: bool, ?hasHiddenMembers: bool, ?hasAggressiveAntiSpamEnabled: bool, ?messageAutoDeleteTime: int64, ?slowModeDelay: int64, ?permissions: ChatPermissions, ?pinnedMessage: Message, ?inviteLink: string, ?description: string, ?joinByRequest: bool, ?joinToSendMessages: bool, ?hasRestrictedVoiceAndVideoMessages: bool, ?hasPrivateForwards: bool, ?bio: string, ?emojiStatusExpirationDate: int64, ?emojiStatusCustomEmojiId: string, ?activeUsernames: string[], ?photo: ChatPhoto, ?isForum: bool, ?lastName: string, ?firstName: string, ?username: string, ?title: string, ?linkedChatId: int64, ?location: ChatLocation) = + static member Create(id: int64, ``type``: ChatType, ?joinByRequest: bool, ?description: string, ?inviteLink: string, ?pinnedMessage: Message, ?permissions: ChatPermissions, ?slowModeDelay: int64, ?messageAutoDeleteTime: int64, ?hasAggressiveAntiSpamEnabled: bool, ?hasHiddenMembers: bool, ?hasProtectedContent: bool, ?hasVisibleHistory: bool, ?stickerSetName: string, ?canSetStickerSet: bool, ?joinToSendMessages: bool, ?hasRestrictedVoiceAndVideoMessages: bool, ?hasPrivateForwards: bool, ?bio: string, ?title: string, ?username: string, ?firstName: string, ?lastName: string, ?isForum: bool, ?photo: ChatPhoto, ?linkedChatId: int64, ?activeUsernames: string[], ?accentColorId: int64, ?backgroundCustomEmojiId: string, ?profileAccentColorId: int64, ?profileBackgroundCustomEmojiId: string, ?emojiStatusCustomEmojiId: string, ?emojiStatusExpirationDate: int64, ?availableReactions: ReactionType[], ?location: ChatLocation) = { Id = id Type = ``type`` - CanSetStickerSet = canSetStickerSet - StickerSetName = stickerSetName - HasProtectedContent = hasProtectedContent - HasHiddenMembers = hasHiddenMembers - HasAggressiveAntiSpamEnabled = hasAggressiveAntiSpamEnabled - MessageAutoDeleteTime = messageAutoDeleteTime - SlowModeDelay = slowModeDelay - Permissions = permissions - PinnedMessage = pinnedMessage - InviteLink = inviteLink - Description = description JoinByRequest = joinByRequest + Description = description + InviteLink = inviteLink + PinnedMessage = pinnedMessage + Permissions = permissions + SlowModeDelay = slowModeDelay + MessageAutoDeleteTime = messageAutoDeleteTime + HasAggressiveAntiSpamEnabled = hasAggressiveAntiSpamEnabled + HasHiddenMembers = hasHiddenMembers + HasProtectedContent = hasProtectedContent + HasVisibleHistory = hasVisibleHistory + StickerSetName = stickerSetName + CanSetStickerSet = canSetStickerSet JoinToSendMessages = joinToSendMessages HasRestrictedVoiceAndVideoMessages = hasRestrictedVoiceAndVideoMessages HasPrivateForwards = hasPrivateForwards Bio = bio - EmojiStatusExpirationDate = emojiStatusExpirationDate - EmojiStatusCustomEmojiId = emojiStatusCustomEmojiId - ActiveUsernames = activeUsernames - Photo = photo - IsForum = isForum - LastName = lastName - FirstName = firstName - Username = username Title = title + Username = username + FirstName = firstName + LastName = lastName + IsForum = isForum + Photo = photo LinkedChatId = linkedChatId + ActiveUsernames = activeUsernames + AccentColorId = accentColorId + BackgroundCustomEmojiId = backgroundCustomEmojiId + ProfileAccentColorId = profileAccentColorId + ProfileBackgroundCustomEmojiId = profileBackgroundCustomEmojiId + EmojiStatusCustomEmojiId = emojiStatusCustomEmojiId + EmojiStatusExpirationDate = emojiStatusExpirationDate + AvailableReactions = availableReactions Location = location } @@ -376,39 +416,30 @@ and [] Message = /// Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. [] SenderChat: Chat option - /// Date the message was sent in Unix time + /// Date the message was sent in Unix time. It is always a positive number, representing a valid date. [] Date: DateTime - /// Conversation the message belongs to + /// Chat the message belongs to [] Chat: Chat - /// For forwarded messages, sender of the original message - [] - ForwardFrom: User option - /// For messages forwarded from channels or from anonymous administrators, information about the original sender chat - [] - ForwardFromChat: Chat option - /// For messages forwarded from channels, identifier of the original message in the channel - [] - ForwardFromMessageId: int64 option - /// For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present - [] - ForwardSignature: string option - /// Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages - [] - ForwardSenderName: string option - /// For forwarded messages, date the original message was sent in Unix time - [] - ForwardDate: DateTime option + /// Information about the original message for forwarded messages + [] + ForwardOrigin: MessageOrigin option /// True, if the message is sent to a forum topic [] IsTopicMessage: bool option /// True, if the message is a channel post that was automatically forwarded to the connected discussion group [] IsAutomaticForward: bool option - /// For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. + /// For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. [] ReplyToMessage: Message option + /// Information about the message that is being replied to, which may come from another chat or forum topic + [] + ExternalReply: ExternalReplyInfo option + /// For replies that quote part of the original message, the quoted part of the message + [] + Quote: TextQuote option /// Bot through which the message was sent [] ViaBot: User option @@ -430,6 +461,9 @@ and [] Message = /// For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text [] Entities: MessageEntity[] option + /// Options used for link preview generation for the message, if it is a text message and link preview options were changed + [] + LinkPreviewOptions: LinkPreviewOptions 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 @@ -517,18 +551,18 @@ and [] Message = /// The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. [] MigrateFromChatId: int64 option - /// Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply. + /// Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. [] - PinnedMessage: Message option + PinnedMessage: MaybeInaccessibleMessage option /// Message is an invoice for a payment, information about the invoice. More about payments » [] Invoice: Invoice option /// Message is a service message about a successful payment, information about the payment. More about payments » [] SuccessfulPayment: SuccessfulPayment option - /// Service message: a user was shared with the bot - [] - UserShared: UserShared option + /// Service message: users were shared with the bot + [] + UsersShared: UsersShared option /// Service message: a chat was shared with the bot [] ChatShared: ChatShared option @@ -562,6 +596,18 @@ and [] Message = /// Service message: the 'General' forum topic unhidden [] GeneralForumTopicUnhidden: GeneralForumTopicUnhidden option + /// Service message: a scheduled giveaway was created + [] + GiveawayCreated: GiveawayCreated option + /// The message is a scheduled giveaway message + [] + Giveaway: Giveaway option + /// A giveaway with public winners was completed + [] + GiveawayWinners: GiveawayWinners option + /// Service message: a giveaway without public winners was completed + [] + GiveawayCompleted: GiveawayCompleted option /// Service message: video chat scheduled [] VideoChatScheduled: VideoChatScheduled option @@ -581,79 +627,81 @@ and [] Message = [] ReplyMarkup: InlineKeyboardMarkup option } - static member Create(messageId: int64, date: DateTime, chat: Chat, ?pinnedMessage: Message, ?migrateFromChatId: int64, ?migrateToChatId: int64, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?channelChatCreated: bool, ?supergroupChatCreated: bool, ?deleteChatPhoto: bool, ?invoice: Invoice, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?leftChatMember: User, ?newChatMembers: User[], ?location: Location, ?groupChatCreated: bool, ?successfulPayment: SuccessfulPayment, ?chatShared: ChatShared, ?venue: Venue, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?generalForumTopicHidden: GeneralForumTopicHidden, ?userShared: UserShared, ?forumTopicReopened: ForumTopicReopened, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?proximityAlertTriggered: ProximityAlertTriggered, ?passportData: PassportData, ?writeAccessAllowed: WriteAccessAllowed, ?connectedWebsite: string, ?forumTopicClosed: ForumTopicClosed, ?poll: Poll, ?dice: Dice, ?webAppData: WebAppData, ?editDate: int64, ?viaBot: User, ?replyToMessage: Message, ?isAutomaticForward: bool, ?isTopicMessage: bool, ?forwardDate: DateTime, ?hasProtectedContent: bool, ?forwardSenderName: string, ?forwardFromMessageId: int64, ?forwardFromChat: Chat, ?forwardFrom: User, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?forwardSignature: string, ?game: Game, ?mediaGroupId: string, ?text: string, ?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, ?entities: MessageEntity[], ?story: Story, ?replyMarkup: InlineKeyboardMarkup) = + static member Create(messageId: int64, date: DateTime, chat: Chat, ?chatShared: ChatShared, ?usersShared: UsersShared, ?successfulPayment: SuccessfulPayment, ?invoice: Invoice, ?pinnedMessage: MaybeInaccessibleMessage, ?migrateFromChatId: int64, ?migrateToChatId: int64, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?channelChatCreated: bool, ?supergroupChatCreated: bool, ?groupChatCreated: bool, ?deleteChatPhoto: bool, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?connectedWebsite: string, ?writeAccessAllowed: WriteAccessAllowed, ?passportData: PassportData, ?proximityAlertTriggered: ProximityAlertTriggered, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?giveawayCompleted: GiveawayCompleted, ?giveawayWinners: GiveawayWinners, ?leftChatMember: User, ?giveaway: Giveaway, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?generalForumTopicHidden: GeneralForumTopicHidden, ?forumTopicReopened: ForumTopicReopened, ?forumTopicClosed: ForumTopicClosed, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?giveawayCreated: GiveawayCreated, ?newChatMembers: User[], ?venue: Venue, ?webAppData: WebAppData, ?authorSignature: string, ?mediaGroupId: string, ?hasProtectedContent: bool, ?editDate: int64, ?viaBot: User, ?quote: TextQuote, ?text: string, ?externalReply: ExternalReplyInfo, ?isAutomaticForward: bool, ?isTopicMessage: bool, ?forwardOrigin: MessageOrigin, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?replyToMessage: Message, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions, ?animation: Animation, ?poll: Poll, ?game: Game, ?dice: Dice, ?contact: Contact, ?hasMediaSpoiler: bool, ?captionEntities: MessageEntity[], ?caption: string, ?voice: Voice, ?videoNote: VideoNote, ?video: Video, ?story: Story, ?sticker: Sticker, ?photo: PhotoSize[], ?document: Document, ?audio: Audio, ?location: Location, ?replyMarkup: InlineKeyboardMarkup) = { MessageId = messageId Date = date Chat = chat + ChatShared = chatShared + UsersShared = usersShared + SuccessfulPayment = successfulPayment + Invoice = invoice PinnedMessage = pinnedMessage MigrateFromChatId = migrateFromChatId MigrateToChatId = migrateToChatId MessageAutoDeleteTimerChanged = messageAutoDeleteTimerChanged ChannelChatCreated = channelChatCreated SupergroupChatCreated = supergroupChatCreated + GroupChatCreated = groupChatCreated DeleteChatPhoto = deleteChatPhoto - Invoice = invoice NewChatPhoto = newChatPhoto NewChatTitle = newChatTitle - LeftChatMember = leftChatMember - NewChatMembers = newChatMembers - Location = location - GroupChatCreated = groupChatCreated - SuccessfulPayment = successfulPayment - ChatShared = chatShared - Venue = venue + ConnectedWebsite = connectedWebsite + WriteAccessAllowed = writeAccessAllowed + PassportData = passportData + ProximityAlertTriggered = proximityAlertTriggered VideoChatParticipantsInvited = videoChatParticipantsInvited VideoChatEnded = videoChatEnded VideoChatStarted = videoChatStarted VideoChatScheduled = videoChatScheduled + GiveawayCompleted = giveawayCompleted + GiveawayWinners = giveawayWinners + LeftChatMember = leftChatMember + Giveaway = giveaway GeneralForumTopicUnhidden = generalForumTopicUnhidden GeneralForumTopicHidden = generalForumTopicHidden - UserShared = userShared ForumTopicReopened = forumTopicReopened + ForumTopicClosed = forumTopicClosed ForumTopicEdited = forumTopicEdited ForumTopicCreated = forumTopicCreated - ProximityAlertTriggered = proximityAlertTriggered - PassportData = passportData - WriteAccessAllowed = writeAccessAllowed - ConnectedWebsite = connectedWebsite - ForumTopicClosed = forumTopicClosed - Poll = poll - Dice = dice + GiveawayCreated = giveawayCreated + NewChatMembers = newChatMembers + Venue = venue WebAppData = webAppData + AuthorSignature = authorSignature + MediaGroupId = mediaGroupId + HasProtectedContent = hasProtectedContent EditDate = editDate ViaBot = viaBot - ReplyToMessage = replyToMessage + Quote = quote + Text = text + ExternalReply = externalReply IsAutomaticForward = isAutomaticForward IsTopicMessage = isTopicMessage - ForwardDate = forwardDate - HasProtectedContent = hasProtectedContent - ForwardSenderName = forwardSenderName - ForwardFromMessageId = forwardFromMessageId - ForwardFromChat = forwardFromChat - ForwardFrom = forwardFrom + ForwardOrigin = forwardOrigin SenderChat = senderChat From = from MessageThreadId = messageThreadId - ForwardSignature = forwardSignature + ReplyToMessage = replyToMessage + Entities = entities + LinkPreviewOptions = linkPreviewOptions + Animation = animation + Poll = poll Game = game - MediaGroupId = mediaGroupId - Text = text + Dice = dice Contact = contact HasMediaSpoiler = hasMediaSpoiler CaptionEntities = captionEntities Caption = caption Voice = voice VideoNote = videoNote - AuthorSignature = authorSignature Video = video + Story = story Sticker = sticker Photo = photo Document = document Audio = audio - Animation = animation - Entities = entities - Story = story + Location = location ReplyMarkup = replyMarkup } @@ -669,10 +717,35 @@ and [] MessageId = MessageId = messageId } +/// This object describes a message that was deleted or is otherwise inaccessible to the bot. +and [] InaccessibleMessage = + { + /// Chat the message belonged to + [] + Chat: Chat + /// Unique message identifier inside the chat + [] + MessageId: int64 + /// Always 0. The field can be used to differentiate regular and inaccessible messages. + [] + Date: DateTime + } + static member Create(chat: Chat, messageId: int64, date: DateTime) = + { + Chat = chat + MessageId = messageId + Date = date + } + +/// This object describes a message that can be inaccessible to the bot. It can be one of +and MaybeInaccessibleMessage = + | Message of Message + | InaccessibleMessage of InaccessibleMessage + /// 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), “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), “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 @@ -705,6 +778,265 @@ and [] MessageEntity = CustomEmojiId = customEmojiId } +/// This object contains information about the quoted part of a message that is replied to by the given message. +and [] TextQuote = + { + /// Text of the quoted part of a message that is replied to by the given message + [] + Text: string + /// Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are kept in quotes. + [] + Entities: MessageEntity[] option + /// Approximate quote position in the original message in UTF-16 code units as specified by the sender + [] + Position: int64 + /// True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server. + [] + IsManual: bool option + } + static member Create(text: string, position: int64, ?entities: MessageEntity[], ?isManual: bool) = + { + Text = text + Position = position + Entities = entities + IsManual = isManual + } + +/// This object contains information about a message that is being replied to, which may come from another chat or forum topic. +and [] ExternalReplyInfo = + { + /// Origin of the message replied to by the given message + [] + Origin: MessageOrigin + /// Chat the original message belongs to. Available only if the chat is a supergroup or a channel. + [] + Chat: Chat option + /// Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel. + [] + MessageId: int64 option + /// Options used for link preview generation for the original message, if it is a text message + [] + LinkPreviewOptions: LinkPreviewOptions option + /// Message is an animation, information about the animation + [] + Animation: Animation option + /// Message is an audio file, information about the file + [] + Audio: Audio option + /// Message is a general file, information about the file + [] + Document: Document option + /// Message is a photo, available sizes of the photo + [] + Photo: PhotoSize[] option + /// Message is a sticker, information about the sticker + [] + Sticker: Sticker option + /// Message is a forwarded story + [] + Story: Story option + /// Message is a video, information about the video + [] + Video: Video option + /// Message is a video note, information about the video message + [] + VideoNote: VideoNote option + /// Message is a voice message, information about the file + [] + Voice: Voice option + /// True, if the message media is covered by a spoiler animation + [] + HasMediaSpoiler: bool option + /// Message is a shared contact, information about the contact + [] + Contact: Contact option + /// Message is a dice with random value + [] + Dice: Dice option + /// Message is a game, information about the game. More about games » + [] + Game: Game option + /// Message is a scheduled giveaway, information about the giveaway + [] + Giveaway: Giveaway option + /// A giveaway with public winners was completed + [] + GiveawayWinners: GiveawayWinners option + /// Message is an invoice for a payment, information about the invoice. More about payments » + [] + Invoice: Invoice option + /// Message is a shared location, information about the location + [] + Location: Location option + /// Message is a native poll, information about the poll + [] + Poll: Poll option + /// Message is a venue, information about the venue + [] + 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) = + { + Origin = origin + Location = location + Invoice = invoice + GiveawayWinners = giveawayWinners + Giveaway = giveaway + Game = game + Dice = dice + Contact = contact + HasMediaSpoiler = hasMediaSpoiler + Voice = voice + Poll = poll + VideoNote = videoNote + Story = story + Sticker = sticker + Photo = photo + Document = document + Audio = audio + Animation = animation + LinkPreviewOptions = linkPreviewOptions + MessageId = messageId + Chat = chat + Video = video + Venue = venue + } + +/// Describes reply parameters for the message that is being sent. +and [] ReplyParameters = + { + /// Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified + [] + MessageId: int64 + /// If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername) + [] + ChatId: ChatId option + /// Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic. + [] + AllowSendingWithoutReply: bool option + /// Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message. + [] + Quote: string option + /// Mode for parsing entities in the quote. See formatting options for more details. + [] + QuoteParseMode: string option + /// A JSON-serialized list of special entities that appear in the quote. It can be specified instead of quote_parse_mode. + [] + QuoteEntities: MessageEntity[] option + /// Position of the quote in the original message in UTF-16 code units + [] + QuotePosition: int64 option + } + static member Create(messageId: int64, ?chatId: ChatId, ?allowSendingWithoutReply: bool, ?quote: string, ?quoteParseMode: string, ?quoteEntities: MessageEntity[], ?quotePosition: int64) = + { + MessageId = messageId + ChatId = chatId + AllowSendingWithoutReply = allowSendingWithoutReply + Quote = quote + QuoteParseMode = quoteParseMode + QuoteEntities = quoteEntities + QuotePosition = quotePosition + } + +/// This object describes the origin of a message. It can be one of +and MessageOrigin = + | User of MessageOriginUser + | HiddenUser of MessageOriginHiddenUser + | Chat of MessageOriginChat + | Channel of MessageOriginChannel + +/// The message was originally sent by a known user. +and [] MessageOriginUser = + { + /// Type of the message origin, always “user” + [] + Type: string + /// Date the message was sent originally in Unix time + [] + Date: DateTime + /// User that sent the message originally + [] + SenderUser: User + } + static member Create(``type``: string, date: DateTime, senderUser: User) = + { + Type = ``type`` + Date = date + SenderUser = senderUser + } + +/// The message was originally sent by an unknown user. +and [] MessageOriginHiddenUser = + { + /// Type of the message origin, always “hidden_user” + [] + Type: string + /// Date the message was sent originally in Unix time + [] + Date: DateTime + /// Name of the user that sent the message originally + [] + SenderUserName: string + } + static member Create(``type``: string, date: DateTime, senderUserName: string) = + { + Type = ``type`` + Date = date + SenderUserName = senderUserName + } + +/// The message was originally sent on behalf of a chat to a group chat. +and [] MessageOriginChat = + { + /// Type of the message origin, always “chat” + [] + Type: string + /// Date the message was sent originally in Unix time + [] + Date: DateTime + /// Chat that sent the message originally + [] + SenderChat: Chat + /// For messages originally sent by an anonymous chat administrator, original message author signature + [] + AuthorSignature: string option + } + static member Create(``type``: string, date: DateTime, senderChat: Chat, ?authorSignature: string) = + { + Type = ``type`` + Date = date + SenderChat = senderChat + AuthorSignature = authorSignature + } + +/// The message was originally sent to a channel chat. +and [] MessageOriginChannel = + { + /// Type of the message origin, always “channel” + [] + Type: string + /// Date the message was sent originally in Unix time + [] + Date: DateTime + /// Channel chat to which the message was originally sent + [] + Chat: Chat + /// Unique message identifier inside the chat + [] + MessageId: int64 + /// Signature of the original post author + [] + AuthorSignature: string option + } + static member Create(``type``: string, date: DateTime, chat: Chat, messageId: int64, ?authorSignature: string) = + { + Type = ``type`` + Date = date + Chat = chat + MessageId = messageId + AuthorSignature = authorSignature + } + /// This object represents one size of a photo or a file / sticker thumbnail. and [] PhotoSize = { @@ -1273,20 +1605,20 @@ and GeneralForumTopicHidden = and GeneralForumTopicUnhidden = new() = {} -/// This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button. -and [] UserShared = +/// This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button. +and [] UsersShared = { /// Identifier of the request [] RequestId: int64 - /// Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means. - [] - UserId: int64 + /// Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means. + [] + UserIds: int64[] } - static member Create(requestId: int64, userId: int64) = + static member Create(requestId: int64, userIds: int64[]) = { RequestId = requestId - UserId = userId + UserIds = userIds } /// This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. @@ -1365,6 +1697,150 @@ and [] VideoChatParticipantsInvited = Users = users } +/// This object represents a service message about the creation of a scheduled giveaway. Currently holds no information. +and GiveawayCreated = + new() = {} + +/// This object represents a message about a scheduled giveaway. +and [] Giveaway = + { + /// The list of chats which the user must join to participate in the giveaway + [] + Chats: Chat[] + /// Point in time (Unix timestamp) when winners of the giveaway will be selected + [] + WinnersSelectionDate: int64 + /// The number of users which are supposed to be selected as winners of the giveaway + [] + WinnerCount: int64 + /// True, if only users who join the chats after the giveaway started should be eligible to win + [] + OnlyNewMembers: bool option + /// True, if the list of giveaway winners will be visible to everyone + [] + HasPublicWinners: bool option + /// Description of additional giveaway prize + [] + PrizeDescription: string option + /// A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways. + [] + CountryCodes: string[] option + /// The number of months the Telegram Premium subscription won from the giveaway will be active for + [] + PremiumSubscriptionMonthCount: int64 option + } + static member Create(chats: Chat[], winnersSelectionDate: int64, winnerCount: int64, ?onlyNewMembers: bool, ?hasPublicWinners: bool, ?prizeDescription: string, ?countryCodes: string[], ?premiumSubscriptionMonthCount: int64) = + { + Chats = chats + WinnersSelectionDate = winnersSelectionDate + WinnerCount = winnerCount + OnlyNewMembers = onlyNewMembers + HasPublicWinners = hasPublicWinners + PrizeDescription = prizeDescription + CountryCodes = countryCodes + PremiumSubscriptionMonthCount = premiumSubscriptionMonthCount + } + +/// This object represents a message about the completion of a giveaway with public winners. +and [] GiveawayWinners = + { + /// The chat that created the giveaway + [] + Chat: Chat + /// Identifier of the messsage with the giveaway in the chat + [] + GiveawayMessageId: int64 + /// Point in time (Unix timestamp) when winners of the giveaway were selected + [] + WinnersSelectionDate: int64 + /// Total number of winners in the giveaway + [] + WinnerCount: int64 + /// List of up to 100 winners of the giveaway + [] + Winners: User[] + /// The number of other chats the user had to join in order to be eligible for the giveaway + [] + AdditionalChatCount: int64 option + /// The number of months the Telegram Premium subscription won from the giveaway will be active for + [] + PremiumSubscriptionMonthCount: int64 option + /// Number of undistributed prizes + [] + UnclaimedPrizeCount: int64 option + /// True, if only users who had joined the chats after the giveaway started were eligible to win + [] + OnlyNewMembers: bool option + /// True, if the giveaway was canceled because the payment for it was refunded + [] + WasRefunded: bool option + /// Description of additional giveaway prize + [] + PrizeDescription: string option + } + static member Create(chat: Chat, giveawayMessageId: int64, winnersSelectionDate: int64, winnerCount: int64, winners: User[], ?additionalChatCount: int64, ?premiumSubscriptionMonthCount: int64, ?unclaimedPrizeCount: int64, ?onlyNewMembers: bool, ?wasRefunded: bool, ?prizeDescription: string) = + { + Chat = chat + GiveawayMessageId = giveawayMessageId + WinnersSelectionDate = winnersSelectionDate + WinnerCount = winnerCount + Winners = winners + AdditionalChatCount = additionalChatCount + PremiumSubscriptionMonthCount = premiumSubscriptionMonthCount + UnclaimedPrizeCount = unclaimedPrizeCount + OnlyNewMembers = onlyNewMembers + WasRefunded = wasRefunded + PrizeDescription = prizeDescription + } + +/// This object represents a service message about the completion of a giveaway without public winners. +and [] GiveawayCompleted = + { + /// Number of winners in the giveaway + [] + WinnerCount: int64 + /// Number of undistributed prizes + [] + UnclaimedPrizeCount: int64 option + /// Message with the giveaway that was completed, if it wasn't deleted + [] + GiveawayMessage: Message option + } + static member Create(winnerCount: int64, ?unclaimedPrizeCount: int64, ?giveawayMessage: Message) = + { + WinnerCount = winnerCount + UnclaimedPrizeCount = unclaimedPrizeCount + GiveawayMessage = giveawayMessage + } + +/// Describes the options used for link preview generation. +and [] LinkPreviewOptions = + { + /// True, if the link preview is disabled + [] + IsDisabled: bool option + /// URL to use for the link preview. If empty, then the first URL found in the message text will be used + [] + Url: string option + /// True, if the media in the link preview is suppposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview + [] + PreferSmallMedia: bool option + /// True, if the media in the link preview is suppposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview + [] + PreferLargeMedia: bool option + /// True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text + [] + ShowAboveText: bool option + } + static member Create(?isDisabled: bool, ?url: string, ?preferSmallMedia: bool, ?preferLargeMedia: bool, ?showAboveText: bool) = + { + IsDisabled = isDisabled + Url = url + PreferSmallMedia = preferSmallMedia + PreferLargeMedia = preferLargeMedia + ShowAboveText = showAboveText + } + /// This object represent a user's profile pictures. and [] UserProfilePhotos = { @@ -1451,19 +1927,19 @@ 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_user, request_chat, request_contact, request_location, and request_poll are mutually exclusive. +/// 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. /// Note:request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message. /// Note:request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message. /// Note:web_app option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message. -/// Note:request_user and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message. +/// 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 = { /// Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed [] Text: string - /// If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a “user_shared” service message. Available in private chats only. - [] - RequestUser: KeyboardButtonRequestUser option + /// If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users_shared” service message. Available in private chats only. + [] + RequestUsers: KeyboardButtonRequestUsers option /// If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat_shared” service message. Available in private chats only. [] RequestChat: KeyboardButtonRequestChat option @@ -1480,10 +1956,10 @@ and [] KeyboardButton = [] WebApp: WebAppInfo option } - static member Create(text: string, ?requestUser: KeyboardButtonRequestUser, ?requestChat: KeyboardButtonRequestChat, ?requestContact: bool, ?requestLocation: bool, ?requestPoll: KeyboardButtonPollType, ?webApp: WebAppInfo) = + static member Create(text: string, ?requestUsers: KeyboardButtonRequestUsers, ?requestChat: KeyboardButtonRequestChat, ?requestContact: bool, ?requestLocation: bool, ?requestPoll: KeyboardButtonPollType, ?webApp: WebAppInfo) = { Text = text - RequestUser = requestUser + RequestUsers = requestUsers RequestChat = requestChat RequestContact = requestContact RequestLocation = requestLocation @@ -1491,24 +1967,28 @@ and [] KeyboardButton = WebApp = webApp } -/// This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. More about requesting users » -and [] KeyboardButtonRequestUser = +/// This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. More about requesting users » +and [] KeyboardButtonRequestUsers = { - /// Signed 32-bit identifier of the request, which will be received back in the UserShared object. Must be unique within the message + /// Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message [] RequestId: int64 - /// Pass True to request a bot, pass False to request a regular user. If not specified, no additional restrictions are applied. + /// Pass True to request bots, pass False to request regular users. If not specified, no additional restrictions are applied. [] UserIsBot: bool option - /// Pass True to request a premium user, pass False to request a non-premium user. If not specified, no additional restrictions are applied. + /// Pass True to request premium users, pass False to request non-premium users. If not specified, no additional restrictions are applied. [] UserIsPremium: bool option + /// The maximum number of users to be selected; 1-10. Defaults to 1. + [] + MaxQuantity: int64 option } - static member Create(requestId: int64, ?userIsBot: bool, ?userIsPremium: bool) = + static member Create(requestId: int64, ?userIsBot: bool, ?userIsPremium: bool, ?maxQuantity: int64) = { RequestId = requestId UserIsBot = userIsBot UserIsPremium = userIsPremium + MaxQuantity = maxQuantity } /// This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. More about requesting chats » @@ -1712,9 +2192,9 @@ and [] CallbackQuery = /// Sender [] From: User - /// Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old + /// Message sent by the bot with the callback button that originated the query [] - Message: Message option + Message: MaybeInaccessibleMessage option /// Identifier of the message sent via the bot in inline mode, that originated the query. [] InlineMessageId: string option @@ -1728,7 +2208,7 @@ and [] CallbackQuery = [] GameShortName: string option } - static member Create(id: string, from: User, chatInstance: string, ?message: Message, ?inlineMessageId: string, ?data: string, ?gameShortName: string) = + static member Create(id: string, from: User, chatInstance: string, ?message: MaybeInaccessibleMessage, ?inlineMessageId: string, ?data: string, ?gameShortName: string) = { Id = id From = from @@ -1899,6 +2379,42 @@ and [] ChatAdministratorRights = CanManageVoiceChats = canManageVoiceChats } +/// This object represents changes in the status of a chat member. +and [] ChatMemberUpdated = + { + /// Chat the user belongs to + [] + Chat: Chat + /// Performer of the action, which resulted in the change + [] + From: User + /// Date the change was done in Unix time + [] + Date: DateTime + /// Previous information about the chat member + [] + OldChatMember: ChatMember + /// New information about the chat member + [] + NewChatMember: ChatMember + /// Chat invite link, which was used by the user to join the chat; for joining by invite link events only. + [] + InviteLink: ChatInviteLink option + /// True, if the user joined the chat via a chat folder invite link + [] + ViaChatFolderInviteLink: bool option + } + static member Create(chat: Chat, from: User, date: DateTime, oldChatMember: ChatMember, newChatMember: ChatMember, ?inviteLink: ChatInviteLink, ?viaChatFolderInviteLink: bool) = + { + Chat = chat + From = from + Date = date + OldChatMember = oldChatMember + NewChatMember = newChatMember + InviteLink = inviteLink + ViaChatFolderInviteLink = viaChatFolderInviteLink + } + /// This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported: and ChatMember = | Owner of ChatMemberOwner @@ -2048,7 +2564,7 @@ and [] ChatMemberRestricted = /// True, if the user is a member of the chat at the moment of the request [] IsMember: bool - /// True, if the user is allowed to send text messages, contacts, invoices, locations and venues + /// True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues [] CanSendMessages: bool /// True, if the user is allowed to send audios @@ -2152,42 +2668,6 @@ and [] ChatMemberBanned = UntilDate = untilDate } -/// This object represents changes in the status of a chat member. -and [] ChatMemberUpdated = - { - /// Chat the user belongs to - [] - Chat: Chat - /// Performer of the action, which resulted in the change - [] - From: User - /// Date the change was done in Unix time - [] - Date: DateTime - /// Previous information about the chat member - [] - OldChatMember: ChatMember - /// New information about the chat member - [] - NewChatMember: ChatMember - /// Chat invite link, which was used by the user to join the chat; for joining by invite link events only. - [] - InviteLink: ChatInviteLink option - /// True, if the user joined the chat via a chat folder invite link - [] - ViaChatFolderInviteLink: bool option - } - static member Create(chat: Chat, from: User, date: DateTime, oldChatMember: ChatMember, newChatMember: ChatMember, ?inviteLink: ChatInviteLink, ?viaChatFolderInviteLink: bool) = - { - Chat = chat - From = from - Date = date - OldChatMember = oldChatMember - NewChatMember = newChatMember - InviteLink = inviteLink - ViaChatFolderInviteLink = viaChatFolderInviteLink - } - /// Represents a join request sent to a chat. and [] ChatJoinRequest = { @@ -2223,7 +2703,7 @@ and [] ChatJoinRequest = /// Describes actions that a non-administrator user is allowed to take in a chat. and [] ChatPermissions = { - /// True, if the user is allowed to send text messages, contacts, invoices, locations and venues + /// True, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues [] CanSendMessages: bool option /// True, if the user is allowed to send audios @@ -2300,6 +2780,119 @@ and [] ChatLocation = Address = address } +/// This object describes the type of a reaction. Currently, it can be one of +and ReactionType = + | Emoji of ReactionTypeEmoji + | CustomEmoji of ReactionTypeCustomEmoji + +/// The reaction is based on an emoji. +and [] ReactionTypeEmoji = + { + /// Type of the reaction, always “emoji” + [] + Type: string + /// Reaction emoji. Currently, it can be one of "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" + [] + Emoji: string + } + static member Create(``type``: string, emoji: string) = + { + Type = ``type`` + Emoji = emoji + } + +/// The reaction is based on a custom emoji. +and [] ReactionTypeCustomEmoji = + { + /// Type of the reaction, always “custom_emoji” + [] + Type: string + /// Custom emoji identifier + [] + CustomEmojiId: string + } + static member Create(``type``: string, customEmojiId: string) = + { + Type = ``type`` + CustomEmojiId = customEmojiId + } + +/// Represents a reaction added to a message along with the number of times it was added. +and [] ReactionCount = + { + /// Type of the reaction + [] + Type: ReactionType + /// Number of times the reaction was added + [] + TotalCount: int64 + } + static member Create(``type``: ReactionType, totalCount: int64) = + { + Type = ``type`` + TotalCount = totalCount + } + +/// This object represents a change of a reaction on a message performed by a user. +and [] MessageReactionUpdated = + { + /// The chat containing the message the user reacted to + [] + Chat: Chat + /// Unique identifier of the message inside the chat + [] + MessageId: int64 + /// The user that changed the reaction, if the user isn't anonymous + [] + User: User option + /// The chat on behalf of which the reaction was changed, if the user is anonymous + [] + ActorChat: Chat option + /// Date of the change in Unix time + [] + Date: DateTime + /// Previous list of reaction types that were set by the user + [] + OldReaction: ReactionType[] + /// New list of reaction types that have been set by the user + [] + NewReaction: ReactionType[] + } + static member Create(chat: Chat, messageId: int64, date: DateTime, oldReaction: ReactionType[], newReaction: ReactionType[], ?user: User, ?actorChat: Chat) = + { + Chat = chat + MessageId = messageId + Date = date + OldReaction = oldReaction + NewReaction = newReaction + User = user + ActorChat = actorChat + } + +/// This object represents reaction changes on a message with anonymous reactions. +and [] MessageReactionCountUpdated = + { + /// The chat containing the message + [] + Chat: Chat + /// Unique message identifier inside the chat + [] + MessageId: int64 + /// Date of the change in Unix time + [] + Date: DateTime + /// List of reactions that are present on the message + [] + Reactions: ReactionCount[] + } + static member Create(chat: Chat, messageId: int64, date: DateTime, reactions: ReactionCount[]) = + { + Chat = chat + MessageId = messageId + Date = date + Reactions = reactions + } + /// This object represents a forum topic. and [] ForumTopic = { @@ -2537,6 +3130,144 @@ and [] MenuButtonDefault = Type = ``type`` } +/// This object describes the source of a chat boost. It can be one of +and ChatBoostSource = + | Premium of ChatBoostSourcePremium + | GiftCode of ChatBoostSourceGiftCode + | Giveaway of ChatBoostSourceGiveaway + +/// The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user. +and [] ChatBoostSourcePremium = + { + /// Source of the boost, always “premium” + [] + Source: string + /// User that boosted the chat + [] + User: User + } + static member Create(source: string, user: User) = + { + Source = source + User = user + } + +/// The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. +and [] ChatBoostSourceGiftCode = + { + /// Source of the boost, always “gift_code” + [] + Source: string + /// User for which the gift code was created + [] + User: User + } + static member Create(source: string, user: User) = + { + Source = source + User = user + } + +/// The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. +and [] ChatBoostSourceGiveaway = + { + /// Source of the boost, always “giveaway” + [] + Source: string + /// Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet. + [] + GiveawayMessageId: int64 + /// User that won the prize in the giveaway if any + [] + User: User option + /// True, if the giveaway was completed, but there was no user to win the prize + [] + IsUnclaimed: bool option + } + static member Create(source: string, giveawayMessageId: int64, ?user: User, ?isUnclaimed: bool) = + { + Source = source + GiveawayMessageId = giveawayMessageId + User = user + IsUnclaimed = isUnclaimed + } + +/// This object contains information about a chat boost. +and [] ChatBoost = + { + /// Unique identifier of the boost + [] + BoostId: string + /// Point in time (Unix timestamp) when the chat was boosted + [] + AddDate: int64 + /// Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged + [] + ExpirationDate: int64 + /// Source of the added boost + [] + Source: ChatBoostSource + } + static member Create(boostId: string, addDate: int64, expirationDate: int64, source: ChatBoostSource) = + { + BoostId = boostId + AddDate = addDate + ExpirationDate = expirationDate + Source = source + } + +/// This object represents a boost added to a chat or changed. +and [] ChatBoostUpdated = + { + /// Chat which was boosted + [] + Chat: Chat + /// Infomation about the chat boost + [] + Boost: ChatBoost + } + static member Create(chat: Chat, boost: ChatBoost) = + { + Chat = chat + Boost = boost + } + +/// This object represents a boost removed from a chat. +and [] ChatBoostRemoved = + { + /// Chat which was boosted + [] + Chat: Chat + /// Unique identifier of the boost + [] + BoostId: string + /// Point in time (Unix timestamp) when the boost was removed + [] + RemoveDate: int64 + /// Source of the removed boost + [] + Source: ChatBoostSource + } + static member Create(chat: Chat, boostId: string, removeDate: int64, source: ChatBoostSource) = + { + Chat = chat + BoostId = boostId + RemoveDate = removeDate + Source = source + } + +/// This object represents a list of boosts added to a chat by a user. +and [] UserChatBoosts = + { + /// The list of boosts added to the chat by the user + [] + Boosts: ChatBoost[] + } + static member Create(boosts: ChatBoost[]) = + { + Boosts = boosts + } + /// Describes why a request was unsuccessful. and [] ResponseParameters = { @@ -4058,16 +4789,16 @@ and [] InputTextMessageContent = /// List of special entities that appear in message text, which can be specified instead of parse_mode [] Entities: MessageEntity[] option - /// Disables link previews for links in the sent message - [] - DisableWebPagePreview: bool option + /// Link preview generation options for the message + [] + LinkPreviewOptions: LinkPreviewOptions option } - static member Create(messageText: string, ?parseMode: ParseMode, ?entities: MessageEntity[], ?disableWebPagePreview: bool) = + static member Create(messageText: string, ?parseMode: ParseMode, ?entities: MessageEntity[], ?linkPreviewOptions: LinkPreviewOptions) = { MessageText = messageText ParseMode = parseMode Entities = entities - DisableWebPagePreview = disableWebPagePreview + LinkPreviewOptions = linkPreviewOptions } /// Represents the content of a location message to be sent as the result of an inline query. diff --git a/src/Funogram.Tests/Constants.fs b/src/Funogram.Tests/Constants.fs index b0fc1a1..8642029 100644 --- a/src/Funogram.Tests/Constants.fs +++ b/src/Funogram.Tests/Constants.fs @@ -10,7 +10,14 @@ module Constants = let testDate = System.DateTime(2117, 05, 28, 12, 47, 51, DateTimeKind.Utc) let testDateUnix = 4651649271L - + let testForwardOrigin = MessageOrigin.HiddenUser( + MessageOriginHiddenUser.Create( + ``type`` = "hidden_user", + date = testDate, + senderUserName = "test user" + ) + ) + let jsonTestObj = { Type = "italic"; Offset = 0L; Length = 100L; Url = Some("http://github.com"); User = None; Language = None; CustomEmojiId = None } let jsonTestObjString = """{"type":"italic","offset":0,"length":100,"url":"http://github.com"}""" let jsonTestObjResultString = """{"ok":true,"result":{"type":"italic","offset":0,"length":100,"url":"http://github.com","user":null,"language":null} }""" @@ -35,12 +42,13 @@ module Constants = let testMaskPosition = { MaskPosition.Point = MaskPoint.Eyes; XShift = 0.0; YShift = 0.0; Scale = 0.0 } let jsonTestMaskPosition = """{"point":"eyes","x_shift":0,"y_shift":0,"scale":0}""" let jsonTestMaskPositionResult = ok jsonTestMaskPosition + + + let jsonMessageForwardDate = Message.Create(1L, testDate, jsonTestChat, text = "abc", forwardOrigin = testForwardOrigin) - let jsonMessageForwardDate = Message.Create(1L, testDate, jsonTestChat, text = "abc", forwardDate = testDate) - - let jsonMessageForward = Message.Create(1L, testDate, jsonTestChat, forwardDate = testDate, text = "abc") + let jsonMessageForward = Message.Create(1L, testDate, jsonTestChat, forwardOrigin = testForwardOrigin, text = "abc") - let jsonMessageForwardDateString = sprintf """{"message_id":1,"date":%i,"chat":{"id":1,"type":"group","title":"Test group"},"forward_date":%i,"text":"abc"}""" testDateUnix testDateUnix + let jsonMessageForwardDateString = sprintf """{"message_id":1,"date":%i,"chat":{"id":1,"type":"group","title":"Test group"},"forward_origin":{"type":"hidden_user","date":%i,"sender_user_name":"test user"},"text":"abc"}""" testDateUnix testDateUnix let jsonMessageForwardDateApiString = ok jsonMessageForwardDateString let paramsDictionary = diff --git a/src/examples/Funogram.TestBot/Commands/TextMessages.fs b/src/examples/Funogram.TestBot/Commands/TextMessages.fs index 6552447..eb4a1dd 100644 --- a/src/examples/Funogram.TestBot/Commands/TextMessages.fs +++ b/src/examples/Funogram.TestBot/Commands/TextMessages.fs @@ -15,14 +15,14 @@ let testNoWebpageAndNotification config chatId = ChatId.Int chatId, "@Dolfik! See http://fsharplang.ru - Russian F# Community", disableNotification = true, - disableWebPagePreview = true + linkPreviewOptions = LinkPreviewOptions.Create(isDisabled = true) ) |> bot config let testReply (ctx: UpdateContext) config (chatId: int64) = Req.SendMessage.Make( chatId, "That's message with reply!", - replyToMessageId = ctx.Update.Message.Value.MessageId + replyParameters = ReplyParameters.Create(messageId = ctx.Update.Message.Value.MessageId) ) |> bot config let testForwardMessage (ctx: UpdateContext) config (chatId: int64) =