diff --git a/README.md b/README.md index a3f4c1a..1b14e4e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![.NET Core](https://github.com/Dolfik1/Funogram/workflows/.NET/badge.svg) [![NuGet](https://img.shields.io/nuget/v/Funogram.svg)](https://www.nuget.org/packages/Funogram/) [![NuGet](https://img.shields.io/nuget/v/Funogram.Telegram.svg)](https://www.nuget.org/packages/Funogram.Telegram/) -[![NuGet](https://img.shields.io/badge/Bot%20API-9.0-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/) +[![NuGet](https://img.shields.io/badge/Bot%20API-9.1-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/) Funogram Logo diff --git a/src/Funogram.Generator/Helpers.fs b/src/Funogram.Generator/Helpers.fs index acb0a94..0f1a7be 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 Message", "Message[]" "array of MessageId", "MessageId[]" "InputMediaAudio, InputMediaDocument, InputMediaPhoto and InputMediaVideo", "InputMedia" "Message or True", "EditMessageResult" diff --git a/src/Funogram.Generator/out/methods.json b/src/Funogram.Generator/out/methods.json index 927fc36..f632ca9 100644 --- a/src/Funogram.Generator/out/methods.json +++ b/src/Funogram.Generator/out/methods.json @@ -1682,7 +1682,7 @@ { "OriginalName": "sendMediaGroup", "ConvertedName": "SendMediaGroup", - "Description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.", + "Description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Message objects that were sent is returned.", "Fields": [ { "OriginalName": "business_connection_id", @@ -1757,7 +1757,7 @@ "Optional": true } ], - "OriginalReturnType": "array of Messages", + "OriginalReturnType": "array of Message", "ConvertedReturnType": "Message[]" }, { @@ -2203,7 +2203,7 @@ { "OriginalName": "options", "ConvertedName": "Options", - "Description": "A JSON-serialized list of 2-10 answer options", + "Description": "A JSON-serialized list of 2-12 answer options", "OriginalFieldType": "Array of InputPollOption", "ConvertedFieldType": "InputPollOption[]", "Optional": false @@ -2340,6 +2340,79 @@ "OriginalReturnType": "Message", "ConvertedReturnType": "Message" }, + { + "OriginalName": "sendChecklist", + "ConvertedName": "SendChecklist", + "Description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.", + "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "chat_id", + "ConvertedName": "ChatId", + "Description": "Unique identifier for the target chat", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "checklist", + "ConvertedName": "Checklist", + "Description": "A JSON-serialized object for the checklist to send", + "OriginalFieldType": "InputChecklist", + "ConvertedFieldType": "InputChecklist", + "Optional": false + }, + { + "OriginalName": "disable_notification", + "ConvertedName": "DisableNotification", + "Description": "Sends the message silently. Users will receive a notification with no sound.", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "protect_content", + "ConvertedName": "ProtectContent", + "Description": "Protects the contents of the sent message from forwarding and saving", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "message_effect_id", + "ConvertedName": "MessageEffectId", + "Description": "Unique identifier of the message effect to be added to the message", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": true + }, + { + "OriginalName": "reply_parameters", + "ConvertedName": "ReplyParameters", + "Description": "A JSON-serialized object for description of the message to reply to", + "OriginalFieldType": "ReplyParameters", + "ConvertedFieldType": "ReplyParameters", + "Optional": true + }, + { + "OriginalName": "reply_markup", + "ConvertedName": "ReplyMarkup", + "Description": "A JSON-serialized object for an inline keyboard", + "OriginalFieldType": "InlineKeyboardMarkup", + "ConvertedFieldType": "InlineKeyboardMarkup", + "Optional": true + } + ], + "OriginalReturnType": "Message", + "ConvertedReturnType": "Message" + }, { "OriginalName": "sendDice", "ConvertedName": "SendDice", @@ -2749,7 +2822,7 @@ { "OriginalName": "can_manage_chat", "ConvertedName": "CanManageChat", - "Description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", + "Description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -2829,7 +2902,7 @@ { "OriginalName": "can_post_messages", "ConvertedName": "CanPostMessages", - "Description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only", + "Description": "Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -4617,6 +4690,55 @@ "OriginalReturnType": "Message or True", "ConvertedReturnType": "EditMessageResult" }, + { + "OriginalName": "editMessageChecklist", + "ConvertedName": "EditMessageChecklist", + "Description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.", + "Fields": [ + { + "OriginalName": "business_connection_id", + "ConvertedName": "BusinessConnectionId", + "Description": "Unique identifier of the business connection on behalf of which the message will be sent", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "chat_id", + "ConvertedName": "ChatId", + "Description": "Unique identifier for the target chat", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "message_id", + "ConvertedName": "MessageId", + "Description": "Unique identifier for the target message", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "checklist", + "ConvertedName": "Checklist", + "Description": "A JSON-serialized object for the new checklist", + "OriginalFieldType": "InputChecklist", + "ConvertedFieldType": "InputChecklist", + "Optional": false + }, + { + "OriginalName": "reply_markup", + "ConvertedName": "ReplyMarkup", + "Description": "A JSON-serialized object for the new inline keyboard for the message", + "OriginalFieldType": "InlineKeyboardMarkup", + "ConvertedFieldType": "InlineKeyboardMarkup", + "Optional": true + } + ], + "OriginalReturnType": "Message", + "ConvertedReturnType": "Message" + }, { "OriginalName": "editMessageReplyMarkup", "ConvertedName": "EditMessageReplyMarkup", @@ -5007,7 +5129,7 @@ { "OriginalName": "deleteBusinessMessages", "ConvertedName": "DeleteBusinessMessages", - "Description": "Delete messages on behalf of a business account. Requires the can_delete_outgoing_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.", + "Description": "Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.", "Fields": [ { "OriginalName": "business_connection_id", @@ -6763,6 +6885,14 @@ "OriginalReturnType": "True", "ConvertedReturnType": "bool" }, + { + "OriginalName": "getMyStarBalance", + "ConvertedName": "GetMyStarBalance", + "Description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.", + "Fields": [], + "OriginalReturnType": "StarAmount", + "ConvertedReturnType": "StarAmount" + }, { "OriginalName": "getStarTransactions", "ConvertedName": "GetStarTransactions", diff --git a/src/Funogram.Generator/out/types.json b/src/Funogram.Generator/out/types.json index d820697..6736756 100644 --- a/src/Funogram.Generator/out/types.json +++ b/src/Funogram.Generator/out/types.json @@ -1173,6 +1173,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "checklist", + "ConvertedName": "Checklist", + "Description": "Message is a checklist", + "OriginalFieldType": "Checklist", + "ConvertedFieldType": "Checklist", + "Optional": true + }, { "OriginalName": "contact", "ConvertedName": "Contact", @@ -1421,6 +1429,30 @@ "ConvertedFieldType": "ChatBackground", "Optional": true }, + { + "OriginalName": "checklist_tasks_done", + "ConvertedName": "ChecklistTasksDone", + "Description": "Service message: some tasks in a checklist were marked as done or not done", + "OriginalFieldType": "ChecklistTasksDone", + "ConvertedFieldType": "ChecklistTasksDone", + "Optional": true + }, + { + "OriginalName": "checklist_tasks_added", + "ConvertedName": "ChecklistTasksAdded", + "Description": "Service message: tasks were added to a checklist", + "OriginalFieldType": "ChecklistTasksAdded", + "ConvertedFieldType": "ChecklistTasksAdded", + "Optional": true + }, + { + "OriginalName": "direct_message_price_changed", + "ConvertedName": "DirectMessagePriceChanged", + "Description": "Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed", + "OriginalFieldType": "DirectMessagePriceChanged", + "ConvertedFieldType": "DirectMessagePriceChanged", + "Optional": true + }, { "OriginalName": "forum_topic_created", "ConvertedName": "ForumTopicCreated", @@ -1871,6 +1903,14 @@ "ConvertedFieldType": "bool", "Optional": true }, + { + "OriginalName": "checklist", + "ConvertedName": "Checklist", + "Description": "Message is a checklist", + "OriginalFieldType": "Checklist", + "ConvertedFieldType": "Checklist", + "Optional": true + }, { "OriginalName": "contact", "ConvertedName": "Contact", @@ -3178,6 +3218,272 @@ ] } }, + { + "Name": "ChecklistTask", + "Description": "Describes a task in a checklist.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "id", + "ConvertedName": "Id", + "Description": "Unique identifier of the task", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "text", + "ConvertedName": "Text", + "Description": "Text of the task", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "text_entities", + "ConvertedName": "TextEntities", + "Description": "Special entities that appear in the task text", + "OriginalFieldType": "Array of MessageEntity", + "ConvertedFieldType": "MessageEntity[]", + "Optional": true + }, + { + "OriginalName": "completed_by_user", + "ConvertedName": "CompletedByUser", + "Description": "User that completed the task; omitted if the task wasn\u0027t completed", + "OriginalFieldType": "User", + "ConvertedFieldType": "User", + "Optional": true + }, + { + "OriginalName": "completion_date", + "ConvertedName": "CompletionDate", + "Description": "Point in time (Unix timestamp) when the task was completed; 0 if the task wasn\u0027t completed", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + } + ] + ] + } + }, + { + "Name": "Checklist", + "Description": "Describes a checklist.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "title", + "ConvertedName": "Title", + "Description": "Title of the checklist", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "title_entities", + "ConvertedName": "TitleEntities", + "Description": "Special entities that appear in the checklist title", + "OriginalFieldType": "Array of MessageEntity", + "ConvertedFieldType": "MessageEntity[]", + "Optional": true + }, + { + "OriginalName": "tasks", + "ConvertedName": "Tasks", + "Description": "List of tasks in the checklist", + "OriginalFieldType": "Array of ChecklistTask", + "ConvertedFieldType": "ChecklistTask[]", + "Optional": false + }, + { + "OriginalName": "others_can_add_tasks", + "ConvertedName": "OthersCanAddTasks", + "Description": "True, if users other than the creator of the list can add tasks to the list", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "others_can_mark_tasks_as_done", + "ConvertedName": "OthersCanMarkTasksAsDone", + "Description": "True, if users other than the creator of the list can mark tasks as done or not done", + "OriginalFieldType": "True", + "ConvertedFieldType": "bool", + "Optional": true + } + ] + ] + } + }, + { + "Name": "InputChecklistTask", + "Description": "Describes a task to add to a checklist.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "id", + "ConvertedName": "Id", + "Description": "Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": false + }, + { + "OriginalName": "text", + "ConvertedName": "Text", + "Description": "Text of the task; 1-100 characters after entities parsing", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "parse_mode", + "ConvertedName": "ParseMode", + "Description": "Mode for parsing entities in the text. See formatting options for more details.", + "OriginalFieldType": "String", + "ConvertedFieldType": "ParseMode", + "Optional": true + }, + { + "OriginalName": "text_entities", + "ConvertedName": "TextEntities", + "Description": "List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.", + "OriginalFieldType": "Array of MessageEntity", + "ConvertedFieldType": "MessageEntity[]", + "Optional": true + } + ] + ] + } + }, + { + "Name": "InputChecklist", + "Description": "Describes a checklist to create.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "title", + "ConvertedName": "Title", + "Description": "Title of the checklist; 1-255 characters after entities parsing", + "OriginalFieldType": "String", + "ConvertedFieldType": "string", + "Optional": false + }, + { + "OriginalName": "parse_mode", + "ConvertedName": "ParseMode", + "Description": "Mode for parsing entities in the title. See formatting options for more details.", + "OriginalFieldType": "String", + "ConvertedFieldType": "ParseMode", + "Optional": true + }, + { + "OriginalName": "title_entities", + "ConvertedName": "TitleEntities", + "Description": "List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed.", + "OriginalFieldType": "Array of MessageEntity", + "ConvertedFieldType": "MessageEntity[]", + "Optional": true + }, + { + "OriginalName": "tasks", + "ConvertedName": "Tasks", + "Description": "List of 1-30 tasks in the checklist", + "OriginalFieldType": "Array of InputChecklistTask", + "ConvertedFieldType": "InputChecklistTask[]", + "Optional": false + }, + { + "OriginalName": "others_can_add_tasks", + "ConvertedName": "OthersCanAddTasks", + "Description": "Pass True if other users can add tasks to the checklist", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + }, + { + "OriginalName": "others_can_mark_tasks_as_done", + "ConvertedName": "OthersCanMarkTasksAsDone", + "Description": "Pass True if other users can mark tasks as done or not done in the checklist", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": true + } + ] + ] + } + }, + { + "Name": "ChecklistTasksDone", + "Description": "Describes a service message about checklist tasks marked as done or not done.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "checklist_message", + "ConvertedName": "ChecklistMessage", + "Description": "Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "OriginalFieldType": "Message", + "ConvertedFieldType": "Message", + "Optional": true + }, + { + "OriginalName": "marked_as_done_task_ids", + "ConvertedName": "MarkedAsDoneTaskIds", + "Description": "Identifiers of the tasks that were marked as done", + "OriginalFieldType": "Array of Integer", + "ConvertedFieldType": "int64[]", + "Optional": true + }, + { + "OriginalName": "marked_as_not_done_task_ids", + "ConvertedName": "MarkedAsNotDoneTaskIds", + "Description": "Identifiers of the tasks that were marked as not done", + "OriginalFieldType": "Array of Integer", + "ConvertedFieldType": "int64[]", + "Optional": true + } + ] + ] + } + }, + { + "Name": "ChecklistTasksAdded", + "Description": "Describes a service message about tasks added to a checklist.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "checklist_message", + "ConvertedName": "ChecklistMessage", + "Description": "Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.", + "OriginalFieldType": "Message", + "ConvertedFieldType": "Message", + "Optional": true + }, + { + "OriginalName": "tasks", + "ConvertedName": "Tasks", + "Description": "List of tasks added to the checklist", + "OriginalFieldType": "Array of ChecklistTask", + "ConvertedFieldType": "ChecklistTask[]", + "Optional": false + } + ] + ] + } + }, { "Name": "Location", "Description": "This object represents a point on the map.", @@ -4079,6 +4385,33 @@ ] } }, + { + "Name": "DirectMessagePriceChanged", + "Description": "Describes a service message about a change in the price of direct messages sent to a channel chat.", + "Kind": { + "Case": "Fields", + "Fields": [ + [ + { + "OriginalName": "are_direct_messages_enabled", + "ConvertedName": "AreDirectMessagesEnabled", + "Description": "True, if direct messages are enabled for the channel chat; false otherwise", + "OriginalFieldType": "Boolean", + "ConvertedFieldType": "bool", + "Optional": false + }, + { + "OriginalName": "direct_message_star_count", + "ConvertedName": "DirectMessageStarCount", + "Description": "The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + } + ] + ] + } + }, { "Name": "GiveawayCreated", "Description": "This object represents a service message about the creation of a scheduled giveaway.", @@ -5302,7 +5635,7 @@ { "OriginalName": "can_manage_chat", "ConvertedName": "CanManageChat", - "Description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", + "Description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": false @@ -5382,7 +5715,7 @@ { "OriginalName": "can_post_messages", "ConvertedName": "CanPostMessages", - "Description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", + "Description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -5618,7 +5951,7 @@ { "OriginalName": "can_manage_chat", "ConvertedName": "CanManageChat", - "Description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.", + "Description": "True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": false @@ -5698,7 +6031,7 @@ { "OriginalName": "can_post_messages", "ConvertedName": "CanPostMessages", - "Description": "True, if the administrator can post messages in the channel, or access channel statistics; for channels only", + "Description": "True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -5872,7 +6205,7 @@ { "OriginalName": "can_send_polls", "ConvertedName": "CanSendPolls", - "Description": "True, if the user is allowed to send polls", + "Description": "True, if the user is allowed to send polls and checklists", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": false @@ -6124,7 +6457,7 @@ { "OriginalName": "can_send_polls", "ConvertedName": "CanSendPolls", - "Description": "True, if the user is allowed to send polls", + "Description": "True, if the user is allowed to send polls and checklists", "OriginalFieldType": "Boolean", "ConvertedFieldType": "bool", "Optional": true @@ -7356,11 +7689,19 @@ { "OriginalName": "origin", "ConvertedName": "Origin", - "Description": "Origin of the gift. Currently, either \u201Cupgrade\u201D or \u201Ctransfer\u201D", + "Description": "Origin of the gift. Currently, either \u201Cupgrade\u201D for gifts upgraded from regular gifts, \u201Ctransfer\u201D for gifts transferred from other users or channels, or \u201Cresale\u201D for gifts bought from other users", "OriginalFieldType": "String", "ConvertedFieldType": "string", "Optional": false }, + { + "OriginalName": "last_resale_star_count", + "ConvertedName": "LastResaleStarCount", + "Description": "For gifts bought from other users, the price paid for the gift", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true + }, { "OriginalName": "owned_gift_id", "ConvertedName": "OwnedGiftId", @@ -7376,6 +7717,14 @@ "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true + }, + { + "OriginalName": "next_transfer_date", + "ConvertedName": "NextTransferDate", + "Description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true } ] ] @@ -7585,6 +7934,14 @@ "OriginalFieldType": "Integer", "ConvertedFieldType": "int64", "Optional": true + }, + { + "OriginalName": "next_transfer_date", + "ConvertedName": "NextTransferDate", + "Description": "Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now", + "OriginalFieldType": "Integer", + "ConvertedFieldType": "int64", + "Optional": true } ] ] @@ -8363,8 +8720,8 @@ "Optional": true }, { - "OriginalName": "can_delete_outgoing_messages", - "ConvertedName": "CanDeleteOutgoingMessages", + "OriginalName": "can_delete_sent_messages", + "ConvertedName": "CanDeleteSentMessages", "Description": "True, if the bot can delete messages sent by the bot", "OriginalFieldType": "True", "ConvertedFieldType": "bool", diff --git a/src/Funogram.Telegram/Directory.Build.props b/src/Funogram.Telegram/Directory.Build.props index 87d7d60..9568064 100644 --- a/src/Funogram.Telegram/Directory.Build.props +++ b/src/Funogram.Telegram/Directory.Build.props @@ -1,7 +1,7 @@  - 9.0.0.0 + 9.1.0.0 Nikolay Matyushin Funogram.Telegram Funogram.Telegram diff --git a/src/Funogram.Telegram/RequestsTypes.fs b/src/Funogram.Telegram/RequestsTypes.fs index 569894a..42d97af 100644 --- a/src/Funogram.Telegram/RequestsTypes.fs +++ b/src/Funogram.Telegram/RequestsTypes.fs @@ -816,6 +816,31 @@ type SendPoll = interface IRequestBase with member _.MethodName = "sendPoll" +type SendChecklist = + { + BusinessConnectionId: string + ChatId: int64 + Checklist: InputChecklist + DisableNotification: bool option + ProtectContent: bool option + MessageEffectId: string option + ReplyParameters: ReplyParameters option + ReplyMarkup: InlineKeyboardMarkup option + } + static member Make(businessConnectionId: string, chatId: int64, checklist: InputChecklist, ?disableNotification: bool, ?protectContent: bool, ?messageEffectId: string, ?replyParameters: ReplyParameters, ?replyMarkup: InlineKeyboardMarkup) = + { + BusinessConnectionId = businessConnectionId + ChatId = chatId + Checklist = checklist + DisableNotification = disableNotification + ProtectContent = protectContent + MessageEffectId = messageEffectId + ReplyParameters = replyParameters + ReplyMarkup = replyMarkup + } + interface IRequestBase with + member _.MethodName = "sendChecklist" + type SendDice = { BusinessConnectionId: string option @@ -2038,6 +2063,25 @@ type StopMessageLiveLocation = interface IRequestBase with member _.MethodName = "stopMessageLiveLocation" +type EditMessageChecklist = + { + BusinessConnectionId: string + ChatId: int64 + MessageId: int64 + Checklist: InputChecklist + ReplyMarkup: InlineKeyboardMarkup option + } + static member Make(businessConnectionId: string, chatId: int64, messageId: int64, checklist: InputChecklist, ?replyMarkup: InlineKeyboardMarkup) = + { + BusinessConnectionId = businessConnectionId + ChatId = chatId + MessageId = messageId + Checklist = checklist + ReplyMarkup = replyMarkup + } + interface IRequestBase with + member _.MethodName = "editMessageChecklist" + type EditMessageReplyMarkup = { BusinessConnectionId: string option @@ -2943,6 +2987,11 @@ type AnswerPreCheckoutQuery = interface IRequestBase with member _.MethodName = "answerPreCheckoutQuery" +type GetMyStarBalance() = + static member Make() = GetMyStarBalance() + interface IRequestBase with + member _.MethodName = "getMyStarBalance" + type GetStarTransactions = { Offset: int64 option diff --git a/src/Funogram.Telegram/Types.fs b/src/Funogram.Telegram/Types.fs index 72852ba..aead5cf 100644 --- a/src/Funogram.Telegram/Types.fs +++ b/src/Funogram.Telegram/Types.fs @@ -634,6 +634,9 @@ and [] Message = /// True, if the message media is covered by a spoiler animation [] HasMediaSpoiler: bool option + /// Message is a checklist + [] + Checklist: Checklist option /// Message is a shared contact, information about the contact [] Contact: Contact option @@ -727,6 +730,15 @@ and [] Message = /// Service message: chat background set [] ChatBackgroundSet: ChatBackground option + /// Service message: some tasks in a checklist were marked as done or not done + [] + ChecklistTasksDone: ChecklistTasksDone option + /// Service message: tasks were added to a checklist + [] + ChecklistTasksAdded: ChecklistTasksAdded option + /// Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed + [] + DirectMessagePriceChanged: DirectMessagePriceChanged option /// Service message: forum topic created [] ForumTopicCreated: ForumTopicCreated option @@ -779,11 +791,13 @@ and [] Message = [] ReplyMarkup: InlineKeyboardMarkup option } - static member Create(messageId: int64, date: DateTime, chat: Chat, ?gift: GiftInfo, ?chatShared: ChatShared, ?usersShared: UsersShared, ?refundedPayment: RefundedPayment, ?successfulPayment: SuccessfulPayment, ?invoice: Invoice, ?pinnedMessage: MaybeInaccessibleMessage, ?migrateFromChatId: int64, ?migrateToChatId: int64, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?channelChatCreated: bool, ?supergroupChatCreated: bool, ?groupChatCreated: bool, ?deleteChatPhoto: bool, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?leftChatMember: User, ?newChatMembers: User[], ?uniqueGift: UniqueGiftInfo, ?connectedWebsite: string, ?writeAccessAllowed: WriteAccessAllowed, ?passportData: PassportData, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?paidMessagePriceChanged: PaidMessagePriceChanged, ?giveawayCompleted: GiveawayCompleted, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?location: Location, ?giveawayCreated: GiveawayCreated, ?generalForumTopicHidden: GeneralForumTopicHidden, ?forumTopicReopened: ForumTopicReopened, ?forumTopicClosed: ForumTopicClosed, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?chatBackgroundSet: ChatBackground, ?boostAdded: ChatBoostAdded, ?proximityAlertTriggered: ProximityAlertTriggered, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?venue: Venue, ?poll: Poll, ?game: Game, ?mediaGroupId: string, ?isFromOffline: bool, ?hasProtectedContent: bool, ?editDate: int64, ?viaBot: User, ?replyToStory: Story, ?quote: TextQuote, ?externalReply: ExternalReplyInfo, ?authorSignature: string, ?replyToMessage: Message, ?isTopicMessage: bool, ?forwardOrigin: MessageOrigin, ?businessConnectionId: string, ?senderBusinessBot: User, ?senderBoostCount: int64, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?isAutomaticForward: bool, ?webAppData: WebAppData, ?paidStarCount: int64, ?entities: MessageEntity[], ?dice: Dice, ?contact: Contact, ?hasMediaSpoiler: bool, ?showCaptionAboveMedia: bool, ?captionEntities: MessageEntity[], ?caption: string, ?voice: Voice, ?videoNote: VideoNote, ?text: string, ?video: Video, ?sticker: Sticker, ?photo: PhotoSize[], ?paidMedia: PaidMediaInfo, ?document: Document, ?audio: Audio, ?animation: Animation, ?effectId: string, ?linkPreviewOptions: LinkPreviewOptions, ?story: Story, ?replyMarkup: InlineKeyboardMarkup) = + static member Create(messageId: int64, date: DateTime, chat: Chat, ?connectedWebsite: string, ?uniqueGift: UniqueGiftInfo, ?gift: GiftInfo, ?chatShared: ChatShared, ?usersShared: UsersShared, ?refundedPayment: RefundedPayment, ?successfulPayment: SuccessfulPayment, ?invoice: Invoice, ?pinnedMessage: MaybeInaccessibleMessage, ?migrateToChatId: int64, ?writeAccessAllowed: WriteAccessAllowed, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?channelChatCreated: bool, ?supergroupChatCreated: bool, ?groupChatCreated: bool, ?deleteChatPhoto: bool, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?leftChatMember: User, ?migrateFromChatId: int64, ?passportData: PassportData, ?proximityAlertTriggered: ProximityAlertTriggered, ?boostAdded: ChatBoostAdded, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?paidMessagePriceChanged: PaidMessagePriceChanged, ?giveawayCompleted: GiveawayCompleted, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?giveawayCreated: GiveawayCreated, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?generalForumTopicHidden: GeneralForumTopicHidden, ?forumTopicReopened: ForumTopicReopened, ?forumTopicClosed: ForumTopicClosed, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?directMessagePriceChanged: DirectMessagePriceChanged, ?checklistTasksAdded: ChecklistTasksAdded, ?checklistTasksDone: ChecklistTasksDone, ?chatBackgroundSet: ChatBackground, ?newChatMembers: User[], ?location: Location, ?venue: Venue, ?poll: Poll, ?authorSignature: string, ?mediaGroupId: string, ?isFromOffline: bool, ?hasProtectedContent: bool, ?editDate: int64, ?viaBot: User, ?replyToStory: Story, ?quote: TextQuote, ?externalReply: ExternalReplyInfo, ?replyToMessage: Message, ?isAutomaticForward: bool, ?isTopicMessage: bool, ?forwardOrigin: MessageOrigin, ?businessConnectionId: string, ?senderBusinessBot: User, ?senderBoostCount: int64, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?paidStarCount: int64, ?webAppData: WebAppData, ?text: string, ?linkPreviewOptions: LinkPreviewOptions, ?game: Game, ?dice: Dice, ?contact: Contact, ?checklist: Checklist, ?hasMediaSpoiler: bool, ?showCaptionAboveMedia: bool, ?captionEntities: MessageEntity[], ?caption: string, ?voice: Voice, ?videoNote: VideoNote, ?video: Video, ?story: Story, ?sticker: Sticker, ?photo: PhotoSize[], ?paidMedia: PaidMediaInfo, ?document: Document, ?audio: Audio, ?animation: Animation, ?effectId: string, ?entities: MessageEntity[], ?replyMarkup: InlineKeyboardMarkup) = { MessageId = messageId Date = date Chat = chat + ConnectedWebsite = connectedWebsite + UniqueGift = uniqueGift Gift = gift ChatShared = chatShared UsersShared = usersShared @@ -791,8 +805,8 @@ and [] Message = SuccessfulPayment = successfulPayment Invoice = invoice PinnedMessage = pinnedMessage - MigrateFromChatId = migrateFromChatId MigrateToChatId = migrateToChatId + WriteAccessAllowed = writeAccessAllowed MessageAutoDeleteTimerChanged = messageAutoDeleteTimerChanged ChannelChatCreated = channelChatCreated SupergroupChatCreated = supergroupChatCreated @@ -801,11 +815,10 @@ and [] Message = NewChatPhoto = newChatPhoto NewChatTitle = newChatTitle LeftChatMember = leftChatMember - NewChatMembers = newChatMembers - UniqueGift = uniqueGift - ConnectedWebsite = connectedWebsite - WriteAccessAllowed = writeAccessAllowed + MigrateFromChatId = migrateFromChatId PassportData = passportData + ProximityAlertTriggered = proximityAlertTriggered + BoostAdded = boostAdded VideoChatParticipantsInvited = videoChatParticipantsInvited VideoChatEnded = videoChatEnded VideoChatStarted = videoChatStarted @@ -814,20 +827,22 @@ and [] Message = GiveawayCompleted = giveawayCompleted GiveawayWinners = giveawayWinners Giveaway = giveaway - Location = location GiveawayCreated = giveawayCreated + GeneralForumTopicUnhidden = generalForumTopicUnhidden GeneralForumTopicHidden = generalForumTopicHidden ForumTopicReopened = forumTopicReopened ForumTopicClosed = forumTopicClosed ForumTopicEdited = forumTopicEdited ForumTopicCreated = forumTopicCreated + DirectMessagePriceChanged = directMessagePriceChanged + ChecklistTasksAdded = checklistTasksAdded + ChecklistTasksDone = checklistTasksDone ChatBackgroundSet = chatBackgroundSet - BoostAdded = boostAdded - ProximityAlertTriggered = proximityAlertTriggered - GeneralForumTopicUnhidden = generalForumTopicUnhidden + NewChatMembers = newChatMembers + Location = location Venue = venue Poll = poll - Game = game + AuthorSignature = authorSignature MediaGroupId = mediaGroupId IsFromOffline = isFromOffline HasProtectedContent = hasProtectedContent @@ -836,8 +851,8 @@ and [] Message = ReplyToStory = replyToStory Quote = quote ExternalReply = externalReply - AuthorSignature = authorSignature ReplyToMessage = replyToMessage + IsAutomaticForward = isAutomaticForward IsTopicMessage = isTopicMessage ForwardOrigin = forwardOrigin BusinessConnectionId = businessConnectionId @@ -846,20 +861,22 @@ and [] Message = SenderChat = senderChat From = from MessageThreadId = messageThreadId - IsAutomaticForward = isAutomaticForward - WebAppData = webAppData PaidStarCount = paidStarCount - Entities = entities + WebAppData = webAppData + Text = text + LinkPreviewOptions = linkPreviewOptions + Game = game Dice = dice Contact = contact + Checklist = checklist HasMediaSpoiler = hasMediaSpoiler ShowCaptionAboveMedia = showCaptionAboveMedia CaptionEntities = captionEntities Caption = caption Voice = voice VideoNote = videoNote - Text = text Video = video + Story = story Sticker = sticker Photo = photo PaidMedia = paidMedia @@ -867,8 +884,7 @@ and [] Message = Audio = audio Animation = animation EffectId = effectId - LinkPreviewOptions = linkPreviewOptions - Story = story + Entities = entities ReplyMarkup = replyMarkup } @@ -1017,6 +1033,9 @@ and [] ExternalReplyInfo = /// True, if the message media is covered by a spoiler animation [] HasMediaSpoiler: bool option + /// Message is a checklist + [] + Checklist: Checklist option /// Message is a shared contact, information about the contact [] Contact: Contact option @@ -1045,7 +1064,7 @@ and [] ExternalReplyInfo = [] Venue: Venue option } - static member Create(origin: MessageOrigin, ?location: Location, ?invoice: Invoice, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?game: Game, ?dice: Dice, ?contact: Contact, ?hasMediaSpoiler: bool, ?voice: Voice, ?videoNote: VideoNote, ?video: Video, ?story: Story, ?sticker: Sticker, ?photo: PhotoSize[], ?paidMedia: PaidMediaInfo, ?document: Document, ?audio: Audio, ?animation: Animation, ?linkPreviewOptions: LinkPreviewOptions, ?messageId: int64, ?chat: Chat, ?poll: Poll, ?venue: Venue) = + static member Create(origin: MessageOrigin, ?location: Location, ?invoice: Invoice, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?game: Game, ?dice: Dice, ?contact: Contact, ?checklist: Checklist, ?hasMediaSpoiler: bool, ?voice: Voice, ?poll: Poll, ?videoNote: VideoNote, ?story: Story, ?sticker: Sticker, ?photo: PhotoSize[], ?paidMedia: PaidMediaInfo, ?document: Document, ?audio: Audio, ?animation: Animation, ?linkPreviewOptions: LinkPreviewOptions, ?messageId: int64, ?chat: Chat, ?video: Video, ?venue: Venue) = { Origin = origin Location = location @@ -1055,10 +1074,11 @@ and [] ExternalReplyInfo = Game = game Dice = dice Contact = contact + Checklist = checklist HasMediaSpoiler = hasMediaSpoiler Voice = voice + Poll = poll VideoNote = videoNote - Video = video Story = story Sticker = sticker Photo = photo @@ -1069,7 +1089,7 @@ and [] ExternalReplyInfo = LinkPreviewOptions = linkPreviewOptions MessageId = messageId Chat = chat - Poll = poll + Video = video Venue = venue } @@ -1734,6 +1754,154 @@ and [] Poll = CloseDate = closeDate } +/// Describes a task in a checklist. +and [] ChecklistTask = + { + /// Unique identifier of the task + [] + Id: int64 + /// Text of the task + [] + Text: string + /// Special entities that appear in the task text + [] + TextEntities: MessageEntity[] option + /// User that completed the task; omitted if the task wasn't completed + [] + CompletedByUser: User option + /// Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed + [] + CompletionDate: int64 option + } + static member Create(id: int64, text: string, ?textEntities: MessageEntity[], ?completedByUser: User, ?completionDate: int64) = + { + Id = id + Text = text + TextEntities = textEntities + CompletedByUser = completedByUser + CompletionDate = completionDate + } + +/// Describes a checklist. +and [] Checklist = + { + /// Title of the checklist + [] + Title: string + /// Special entities that appear in the checklist title + [] + TitleEntities: MessageEntity[] option + /// List of tasks in the checklist + [] + Tasks: ChecklistTask[] + /// True, if users other than the creator of the list can add tasks to the list + [] + OthersCanAddTasks: bool option + /// True, if users other than the creator of the list can mark tasks as done or not done + [] + OthersCanMarkTasksAsDone: bool option + } + static member Create(title: string, tasks: ChecklistTask[], ?titleEntities: MessageEntity[], ?othersCanAddTasks: bool, ?othersCanMarkTasksAsDone: bool) = + { + Title = title + Tasks = tasks + TitleEntities = titleEntities + OthersCanAddTasks = othersCanAddTasks + OthersCanMarkTasksAsDone = othersCanMarkTasksAsDone + } + +/// Describes a task to add to a checklist. +and [] InputChecklistTask = + { + /// Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist + [] + Id: int64 + /// Text of the task; 1-100 characters after entities parsing + [] + Text: string + /// Mode for parsing entities in the text. See formatting options for more details. + [] + ParseMode: ParseMode option + /// List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed. + [] + TextEntities: MessageEntity[] option + } + static member Create(id: int64, text: string, ?parseMode: ParseMode, ?textEntities: MessageEntity[]) = + { + Id = id + Text = text + ParseMode = parseMode + TextEntities = textEntities + } + +/// Describes a checklist to create. +and [] InputChecklist = + { + /// Title of the checklist; 1-255 characters after entities parsing + [] + Title: string + /// Mode for parsing entities in the title. See formatting options for more details. + [] + ParseMode: ParseMode option + /// List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, and custom_emoji entities are allowed. + [] + TitleEntities: MessageEntity[] option + /// List of 1-30 tasks in the checklist + [] + Tasks: InputChecklistTask[] + /// Pass True if other users can add tasks to the checklist + [] + OthersCanAddTasks: bool option + /// Pass True if other users can mark tasks as done or not done in the checklist + [] + OthersCanMarkTasksAsDone: bool option + } + static member Create(title: string, tasks: InputChecklistTask[], ?parseMode: ParseMode, ?titleEntities: MessageEntity[], ?othersCanAddTasks: bool, ?othersCanMarkTasksAsDone: bool) = + { + Title = title + Tasks = tasks + ParseMode = parseMode + TitleEntities = titleEntities + OthersCanAddTasks = othersCanAddTasks + OthersCanMarkTasksAsDone = othersCanMarkTasksAsDone + } + +/// Describes a service message about checklist tasks marked as done or not done. +and [] ChecklistTasksDone = + { + /// Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply. + [] + ChecklistMessage: Message option + /// Identifiers of the tasks that were marked as done + [] + MarkedAsDoneTaskIds: int64[] option + /// Identifiers of the tasks that were marked as not done + [] + MarkedAsNotDoneTaskIds: int64[] option + } + static member Create(?checklistMessage: Message, ?markedAsDoneTaskIds: int64[], ?markedAsNotDoneTaskIds: int64[]) = + { + ChecklistMessage = checklistMessage + MarkedAsDoneTaskIds = markedAsDoneTaskIds + MarkedAsNotDoneTaskIds = markedAsNotDoneTaskIds + } + +/// Describes a service message about tasks added to a checklist. +and [] ChecklistTasksAdded = + { + /// Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply. + [] + ChecklistMessage: Message option + /// List of tasks added to the checklist + [] + Tasks: ChecklistTask[] + } + static member Create(tasks: ChecklistTask[], ?checklistMessage: Message) = + { + Tasks = tasks + ChecklistMessage = checklistMessage + } + /// This object represents a point on the map. and [] Location = { @@ -2247,6 +2415,22 @@ and [] PaidMessagePriceChanged = PaidMessageStarCount = paidMessageStarCount } +/// Describes a service message about a change in the price of direct messages sent to a channel chat. +and [] DirectMessagePriceChanged = + { + /// True, if direct messages are enabled for the channel chat; false otherwise + [] + AreDirectMessagesEnabled: bool + /// The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0. + [] + DirectMessageStarCount: int64 option + } + static member Create(areDirectMessagesEnabled: bool, ?directMessageStarCount: int64) = + { + AreDirectMessagesEnabled = areDirectMessagesEnabled + DirectMessageStarCount = directMessageStarCount + } + /// This object represents a service message about the creation of a scheduled giveaway. and [] GiveawayCreated = { @@ -2927,7 +3111,7 @@ and [] ChatAdministratorRights = /// True, if the user's presence in the chat is hidden [] IsAnonymous: bool - /// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. + /// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. [] CanManageChat: bool /// True, if the administrator can delete messages of other users @@ -2957,7 +3141,7 @@ and [] ChatAdministratorRights = /// True, if the administrator can delete stories posted by other users [] CanDeleteStories: bool - /// True, if the administrator can post messages in the channel, or access channel statistics; for channels only + /// True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only [] CanPostMessages: bool option /// True, if the administrator can edit messages of other users and can pin messages; for channels only @@ -3081,7 +3265,7 @@ and [] ChatMemberAdministrator = /// True, if the user's presence in the chat is hidden [] IsAnonymous: bool - /// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. + /// True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. [] CanManageChat: bool /// True, if the administrator can delete messages of other users @@ -3111,7 +3295,7 @@ and [] ChatMemberAdministrator = /// True, if the administrator can delete stories posted by other users [] CanDeleteStories: bool - /// True, if the administrator can post messages in the channel, or access channel statistics; for channels only + /// True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only [] CanPostMessages: bool option /// True, if the administrator can edit messages of other users and can pin messages; for channels only @@ -3207,7 +3391,7 @@ and [] ChatMemberRestricted = /// True, if the user is allowed to send voice notes [] CanSendVoiceNotes: bool - /// True, if the user is allowed to send polls + /// True, if the user is allowed to send polls and checklists [] CanSendPolls: bool /// True, if the user is allowed to send animations, games, stickers and use inline bots @@ -3346,7 +3530,7 @@ and [] ChatPermissions = /// True, if the user is allowed to send voice notes [] CanSendVoiceNotes: bool option - /// True, if the user is allowed to send polls + /// True, if the user is allowed to send polls and checklists [] CanSendPolls: bool option /// True, if the user is allowed to send animations, games, stickers and use inline bots @@ -4030,22 +4214,30 @@ and [] UniqueGiftInfo = /// Information about the gift [] Gift: UniqueGift - /// Origin of the gift. Currently, either “upgrade” or “transfer” + /// Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, or “resale” for gifts bought from other users [] Origin: string + /// For gifts bought from other users, the price paid for the gift + [] + LastResaleStarCount: int64 option /// Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts [] OwnedGiftId: string option /// Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift [] TransferStarCount: int64 option + /// Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now + [] + NextTransferDate: int64 option } - static member Create(gift: UniqueGift, origin: string, ?ownedGiftId: string, ?transferStarCount: int64) = + static member Create(gift: UniqueGift, origin: string, ?lastResaleStarCount: int64, ?ownedGiftId: string, ?transferStarCount: int64, ?nextTransferDate: int64) = { Gift = gift Origin = origin + LastResaleStarCount = lastResaleStarCount OwnedGiftId = ownedGiftId TransferStarCount = transferStarCount + NextTransferDate = nextTransferDate } /// This object describes a gift received and owned by a user or a chat. Currently, it can be one of @@ -4140,8 +4332,11 @@ and [] OwnedGiftUnique = /// Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift [] TransferStarCount: int64 option + /// Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now + [] + NextTransferDate: int64 option } - static member Create(``type``: string, gift: UniqueGift, sendDate: int64, ?ownedGiftId: string, ?senderUser: User, ?isSaved: bool, ?canBeTransferred: bool, ?transferStarCount: int64) = + static member Create(``type``: string, gift: UniqueGift, sendDate: int64, ?ownedGiftId: string, ?senderUser: User, ?isSaved: bool, ?canBeTransferred: bool, ?transferStarCount: int64, ?nextTransferDate: int64) = { Type = ``type`` Gift = gift @@ -4151,6 +4346,7 @@ and [] OwnedGiftUnique = IsSaved = isSaved CanBeTransferred = canBeTransferred TransferStarCount = transferStarCount + NextTransferDate = nextTransferDate } /// Contains the list of gifts received and owned by a user or a chat. @@ -4578,8 +4774,8 @@ and [] BusinessBotRights = [] CanReadMessages: bool option /// True, if the bot can delete messages sent by the bot - [] - CanDeleteOutgoingMessages: bool option + [] + CanDeleteSentMessages: bool option /// True, if the bot can delete all private messages in managed chats [] CanDeleteAllMessages: bool option @@ -4614,11 +4810,11 @@ and [] BusinessBotRights = [] CanManageStories: bool option } - static member Create(?canReply: bool, ?canReadMessages: bool, ?canDeleteOutgoingMessages: bool, ?canDeleteAllMessages: bool, ?canEditName: bool, ?canEditBio: bool, ?canEditProfilePhoto: bool, ?canEditUsername: bool, ?canChangeGiftSettings: bool, ?canViewGiftsAndStars: bool, ?canConvertGiftsToStars: bool, ?canTransferAndUpgradeGifts: bool, ?canTransferStars: bool, ?canManageStories: bool) = + static member Create(?canReply: bool, ?canReadMessages: bool, ?canDeleteSentMessages: bool, ?canDeleteAllMessages: bool, ?canEditName: bool, ?canEditBio: bool, ?canEditProfilePhoto: bool, ?canEditUsername: bool, ?canChangeGiftSettings: bool, ?canViewGiftsAndStars: bool, ?canConvertGiftsToStars: bool, ?canTransferAndUpgradeGifts: bool, ?canTransferStars: bool, ?canManageStories: bool) = { CanReply = canReply CanReadMessages = canReadMessages - CanDeleteOutgoingMessages = canDeleteOutgoingMessages + CanDeleteSentMessages = canDeleteSentMessages CanDeleteAllMessages = canDeleteAllMessages CanEditName = canEditName CanEditBio = canEditBio