diff --git a/README.md b/README.md
index 819fbb1..a3f4c1a 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@

[](https://www.nuget.org/packages/Funogram/)
[](https://www.nuget.org/packages/Funogram.Telegram/)
-[](https://www.nuget.org/packages/Funogram.Telegram/)
+[](https://www.nuget.org/packages/Funogram.Telegram/)
diff --git a/src/Funogram.Generator/Methods/MethodsParser.fs b/src/Funogram.Generator/Methods/MethodsParser.fs
index 6c1d621..5add2f7 100644
--- a/src/Funogram.Generator/Methods/MethodsParser.fs
+++ b/src/Funogram.Generator/Methods/MethodsParser.fs
@@ -43,33 +43,40 @@ let loadRemapData remapPath config =
config
let private returnTypeRegexes =
- [|
- // Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object
-
- // invite links
- Regex("Returns the new invite link as a ([A|a]rray of \w+|\w+)\s")
- Regex("Returns the new invite link as ([A|a]rray of \w+|\w+)\s")
- Regex("Returns the edited invite link as a ([A|a]rray of \w+|\w+)\s")
- Regex("Returns the revoked invite link as ([A|a]rray of \w+|\w+)\s")
- Regex("Returns the created invoice link as ([A|a]rray of \w+|\w+)\s.")
-
- Regex("On success, a ([A|a]rray of \w+|\w+)\s")
- Regex("On success, an ([A|a]rray of \w+|\w+)\s")
- Regex("An ([A|a]rray of \w+|\w+) objects is returned")
- Regex("[R|r]eturns basic information about the bot in form of a ([A|a]rray of \w+|\w+)")
- Regex("[R|r]eturns information about the created topic as a ([A|a]rray of \w+|\w+)")
-
- Regex("([A|a]rray of \w+|\w+) is returned, otherwise ([A|a]rray of \w+|\w+)")
-
- Regex("[R|r]eturns a ([A|a]rray of \w+|\w+)\s")
- Regex("[R|r]eturns the uploaded (\w+)\s")
- Regex("[R|r]eturns the ([A|a]rray of \w+|\w+)\s")
- Regex("[R|r]eturns an ([A|a]rray of \w+|\w+)\s")
- Regex("[R|r]eturns ([A|a]rray of \w+|\w+)\s")
-
-
- Regex("\s([A|a]rray of \w+|\w+)\sis returned")
- |]
+ let rxs =
+ [|
+ // Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object
+
+ // invite links
+ Regex("Returns the new invite link as a ([A|a]rray of \w+|\w+)\s")
+ Regex("Returns the new invite link as ([A|a]rray of \w+|\w+)\s")
+ Regex("Returns the edited invite link as a ([A|a]rray of \w+|\w+)\s")
+ Regex("Returns the revoked invite link as ([A|a]rray of \w+|\w+)\s")
+ Regex("Returns the created invoice link as ([A|a]rray of \w+|\w+)\s.")
+
+ Regex("On success, a ([A|a]rray of \w+|\w+)\s")
+ Regex("On success, an ([A|a]rray of \w+|\w+)\s")
+ Regex("An ([A|a]rray of \w+|\w+) objects is returned")
+ Regex("[R|r]eturns basic information about the bot in form of a ([A|a]rray of \w+|\w+)")
+ Regex("[R|r]eturns information about the created topic as a ([A|a]rray of \w+|\w+)")
+
+ Regex("([A|a]rray of \w+|\w+) is returned, otherwise ([A|a]rray of \w+|\w+)")
+
+ Regex("[R|r]eturns a ([A|a]rray of \w+|\w+)\s")
+ Regex("[R|r]eturns the uploaded (\w+)\s")
+ Regex("[R|r]eturns the ([A|a]rray of \w+|\w+)\s")
+ Regex("[R|r]eturns an ([A|a]rray of \w+|\w+)\s")
+ Regex("[R|r]eturns ([A|a]rray of \w+|\w+)\s")
+
+
+ Regex("\s([A|a]rray of \w+|\w+)\sis returned")
+ |]
+
+ // Sometimes they have the following format in documentation:
+ // Returns the list of gifts blablabla. Returns a Gifts object.
+ // so, let's pass first "Returns" if any
+ let prefixedRxs = rxs |> Array.map(fun r -> Regex($"Returns the .+\. {r}"))
+ Array.append prefixedRxs rxs
let private parseReturnType (str: string) =
let m =
diff --git a/src/Funogram.Generator/out/methods.json b/src/Funogram.Generator/out/methods.json
index 20d32cd..927fc36 100644
--- a/src/Funogram.Generator/out/methods.json
+++ b/src/Funogram.Generator/out/methods.json
@@ -1582,7 +1582,7 @@
{
"OriginalName": "star_count",
"ConvertedName": "StarCount",
- "Description": "The number of Telegram Stars that must be paid to buy access to the media; 1-2500",
+ "Description": "The number of Telegram Stars that must be paid to buy access to the media; 1-10000",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": false
@@ -3133,7 +3133,7 @@
{
"OriginalName": "subscription_price",
"ConvertedName": "SubscriptionPrice",
- "Description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500",
+ "Description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": false
@@ -4757,6 +4757,853 @@
"OriginalReturnType": "True",
"ConvertedReturnType": "bool"
},
+ {
+ "OriginalName": "getAvailableGifts",
+ "ConvertedName": "GetAvailableGifts",
+ "Description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.",
+ "Fields": [],
+ "OriginalReturnType": "Gifts",
+ "ConvertedReturnType": "Gifts"
+ },
+ {
+ "OriginalName": "sendGift",
+ "ConvertedName": "SendGift",
+ "Description": "Sends a gift to the given user or channel chat. The gift can\u0027t be converted to Telegram Stars by the receiver. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "user_id",
+ "ConvertedName": "UserId",
+ "Description": "Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ },
+ {
+ "OriginalName": "chat_id",
+ "ConvertedName": "ChatId",
+ "Description": "Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.",
+ "OriginalFieldType": "Integer or String",
+ "ConvertedFieldType": "ChatId",
+ "Optional": true
+ },
+ {
+ "OriginalName": "gift_id",
+ "ConvertedName": "GiftId",
+ "Description": "Identifier of the gift",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "pay_for_upgrade",
+ "ConvertedName": "PayForUpgrade",
+ "Description": "Pass True to pay for the gift upgrade from the bot\u0027s balance, thereby making the upgrade free for the receiver",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "text",
+ "ConvertedName": "Text",
+ "Description": "Text that will be shown along with the gift; 0-128 characters",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "text_parse_mode",
+ "ConvertedName": "TextParseMode",
+ "Description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than \u201Cbold\u201D, \u201Citalic\u201D, \u201Cunderline\u201D, \u201Cstrikethrough\u201D, \u201Cspoiler\u201D, and \u201Ccustom_emoji\u201D are ignored.",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "text_entities",
+ "ConvertedName": "TextEntities",
+ "Description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than \u201Cbold\u201D, \u201Citalic\u201D, \u201Cunderline\u201D, \u201Cstrikethrough\u201D, \u201Cspoiler\u201D, and \u201Ccustom_emoji\u201D are ignored.",
+ "OriginalFieldType": "Array of MessageEntity",
+ "ConvertedFieldType": "MessageEntity[]",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "giftPremiumSubscription",
+ "ConvertedName": "GiftPremiumSubscription",
+ "Description": "Gifts a Telegram Premium subscription to the given user. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "user_id",
+ "ConvertedName": "UserId",
+ "Description": "Unique identifier of the target user who will receive a Telegram Premium subscription",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "month_count",
+ "ConvertedName": "MonthCount",
+ "Description": "Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "star_count",
+ "ConvertedName": "StarCount",
+ "Description": "Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "text",
+ "ConvertedName": "Text",
+ "Description": "Text that will be shown along with the service message about the subscription; 0-128 characters",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "text_parse_mode",
+ "ConvertedName": "TextParseMode",
+ "Description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than \u201Cbold\u201D, \u201Citalic\u201D, \u201Cunderline\u201D, \u201Cstrikethrough\u201D, \u201Cspoiler\u201D, and \u201Ccustom_emoji\u201D are ignored.",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "text_entities",
+ "ConvertedName": "TextEntities",
+ "Description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than \u201Cbold\u201D, \u201Citalic\u201D, \u201Cunderline\u201D, \u201Cstrikethrough\u201D, \u201Cspoiler\u201D, and \u201Ccustom_emoji\u201D are ignored.",
+ "OriginalFieldType": "Array of MessageEntity",
+ "ConvertedFieldType": "MessageEntity[]",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "verifyUser",
+ "ConvertedName": "VerifyUser",
+ "Description": "Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "user_id",
+ "ConvertedName": "UserId",
+ "Description": "Unique identifier of the target user",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "custom_description",
+ "ConvertedName": "CustomDescription",
+ "Description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn\u0027t allowed to provide a custom verification description.",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "verifyChat",
+ "ConvertedName": "VerifyChat",
+ "Description": "Verifies a chat on behalf of the organization which is represented by the bot. 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": "custom_description",
+ "ConvertedName": "CustomDescription",
+ "Description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn\u0027t allowed to provide a custom verification description.",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "removeUserVerification",
+ "ConvertedName": "RemoveUserVerification",
+ "Description": "Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "user_id",
+ "ConvertedName": "UserId",
+ "Description": "Unique identifier of the target user",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "removeChatVerification",
+ "ConvertedName": "RemoveChatVerification",
+ "Description": "Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. 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
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "readBusinessMessage",
+ "ConvertedName": "ReadBusinessMessage",
+ "Description": "Marks incoming message as read on behalf of a business account. Requires the can_read_messages business bot right. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection on behalf of which to read the message",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "chat_id",
+ "ConvertedName": "ChatId",
+ "Description": "Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours.",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "message_id",
+ "ConvertedName": "MessageId",
+ "Description": "Unique identifier of the message to mark as read",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "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.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection on behalf of which to delete the messages",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "message_ids",
+ "ConvertedName": "MessageIds",
+ "Description": "A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted",
+ "OriginalFieldType": "Array of Integer",
+ "ConvertedFieldType": "int64[]",
+ "Optional": false
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "setBusinessAccountName",
+ "ConvertedName": "SetBusinessAccountName",
+ "Description": "Changes the first and last name of a managed business account. Requires the can_change_name business bot right. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "first_name",
+ "ConvertedName": "FirstName",
+ "Description": "The new value of the first name for the business account; 1-64 characters",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "last_name",
+ "ConvertedName": "LastName",
+ "Description": "The new value of the last name for the business account; 0-64 characters",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "setBusinessAccountUsername",
+ "ConvertedName": "SetBusinessAccountUsername",
+ "Description": "Changes the username of a managed business account. Requires the can_change_username business bot right. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "username",
+ "ConvertedName": "Username",
+ "Description": "The new value of the username for the business account; 0-32 characters",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "setBusinessAccountBio",
+ "ConvertedName": "SetBusinessAccountBio",
+ "Description": "Changes the bio of a managed business account. Requires the can_change_bio business bot right. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "bio",
+ "ConvertedName": "Bio",
+ "Description": "The new value of the bio for the business account; 0-140 characters",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "setBusinessAccountProfilePhoto",
+ "ConvertedName": "SetBusinessAccountProfilePhoto",
+ "Description": "Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "photo",
+ "ConvertedName": "Photo",
+ "Description": "The new profile photo to set",
+ "OriginalFieldType": "InputProfilePhoto",
+ "ConvertedFieldType": "InputProfilePhoto",
+ "Optional": false
+ },
+ {
+ "OriginalName": "is_public",
+ "ConvertedName": "IsPublic",
+ "Description": "Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account\u0027s privacy settings. An account can have only one public photo.",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "removeBusinessAccountProfilePhoto",
+ "ConvertedName": "RemoveBusinessAccountProfilePhoto",
+ "Description": "Removes the current profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "is_public",
+ "ConvertedName": "IsPublic",
+ "Description": "Pass True to remove the public photo, which is visible even if the main photo is hidden by the business account\u0027s privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo.",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "setBusinessAccountGiftSettings",
+ "ConvertedName": "SetBusinessAccountGiftSettings",
+ "Description": "Changes the privacy settings pertaining to incoming gifts in a managed business account. Requires the can_change_gift_settings business bot right. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "show_gift_button",
+ "ConvertedName": "ShowGiftButton",
+ "Description": "Pass True, if a button for sending a gift to the user or by the business account must always be shown in the input field",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": false
+ },
+ {
+ "OriginalName": "accepted_gift_types",
+ "ConvertedName": "AcceptedGiftTypes",
+ "Description": "Types of gifts accepted by the business account",
+ "OriginalFieldType": "AcceptedGiftTypes",
+ "ConvertedFieldType": "AcceptedGiftTypes",
+ "Optional": false
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "getBusinessAccountStarBalance",
+ "ConvertedName": "GetBusinessAccountStarBalance",
+ "Description": "Returns the amount of Telegram Stars owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns StarAmount on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ }
+ ],
+ "OriginalReturnType": "StarAmount",
+ "ConvertedReturnType": "StarAmount"
+ },
+ {
+ "OriginalName": "transferBusinessAccountStars",
+ "ConvertedName": "TransferBusinessAccountStars",
+ "Description": "Transfers Telegram Stars from the business account balance to the bot\u0027s balance. Requires the can_transfer_stars business bot right. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "star_count",
+ "ConvertedName": "StarCount",
+ "Description": "Number of Telegram Stars to transfer; 1-10000",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "getBusinessAccountGifts",
+ "ConvertedName": "GetBusinessAccountGifts",
+ "Description": "Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns OwnedGifts on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "exclude_unsaved",
+ "ConvertedName": "ExcludeUnsaved",
+ "Description": "Pass True to exclude gifts that aren\u0027t saved to the account\u0027s profile page",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "exclude_saved",
+ "ConvertedName": "ExcludeSaved",
+ "Description": "Pass True to exclude gifts that are saved to the account\u0027s profile page",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "exclude_unlimited",
+ "ConvertedName": "ExcludeUnlimited",
+ "Description": "Pass True to exclude gifts that can be purchased an unlimited number of times",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "exclude_limited",
+ "ConvertedName": "ExcludeLimited",
+ "Description": "Pass True to exclude gifts that can be purchased a limited number of times",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "exclude_unique",
+ "ConvertedName": "ExcludeUnique",
+ "Description": "Pass True to exclude unique gifts",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "sort_by_price",
+ "ConvertedName": "SortByPrice",
+ "Description": "Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "offset",
+ "ConvertedName": "Offset",
+ "Description": "Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "limit",
+ "ConvertedName": "Limit",
+ "Description": "The maximum number of gifts to be returned; 1-100. Defaults to 100",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "OwnedGifts",
+ "ConvertedReturnType": "OwnedGifts"
+ },
+ {
+ "OriginalName": "convertGiftToStars",
+ "ConvertedName": "ConvertGiftToStars",
+ "Description": "Converts a given regular gift to Telegram Stars. Requires the can_convert_gifts_to_stars business bot right. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "owned_gift_id",
+ "ConvertedName": "OwnedGiftId",
+ "Description": "Unique identifier of the regular gift that should be converted to Telegram Stars",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "upgradeGift",
+ "ConvertedName": "UpgradeGift",
+ "Description": "Upgrades a given regular gift to a unique gift. Requires the can_transfer_and_upgrade_gifts business bot right. Additionally requires the can_transfer_stars business bot right if the upgrade is paid. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "owned_gift_id",
+ "ConvertedName": "OwnedGiftId",
+ "Description": "Unique identifier of the regular gift that should be upgraded to a unique one",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "keep_original_details",
+ "ConvertedName": "KeepOriginalDetails",
+ "Description": "Pass True to keep the original gift text, sender and receiver in the upgraded gift",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "star_count",
+ "ConvertedName": "StarCount",
+ "Description": "The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If gift.prepaid_upgrade_star_count \u003E 0, then pass 0, otherwise, the can_transfer_stars business bot right is required and gift.upgrade_star_count must be passed.",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "transferGift",
+ "ConvertedName": "TransferGift",
+ "Description": "Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business bot right. Requires can_transfer_stars business bot right if the transfer is paid. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "owned_gift_id",
+ "ConvertedName": "OwnedGiftId",
+ "Description": "Unique identifier of the regular gift that should be transferred",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "new_owner_chat_id",
+ "ConvertedName": "NewOwnerChatId",
+ "Description": "Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours.",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "star_count",
+ "ConvertedName": "StarCount",
+ "Description": "The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the can_transfer_stars business bot right is required.",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
+ {
+ "OriginalName": "postStory",
+ "ConvertedName": "PostStory",
+ "Description": "Posts a story on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "content",
+ "ConvertedName": "Content",
+ "Description": "Content of the story",
+ "OriginalFieldType": "InputStoryContent",
+ "ConvertedFieldType": "InputStoryContent",
+ "Optional": false
+ },
+ {
+ "OriginalName": "active_period",
+ "ConvertedName": "ActivePeriod",
+ "Description": "Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "caption",
+ "ConvertedName": "Caption",
+ "Description": "Caption of the story, 0-2048 characters after entities parsing",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "parse_mode",
+ "ConvertedName": "ParseMode",
+ "Description": "Mode for parsing entities in the story caption. See formatting options for more details.",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "ParseMode",
+ "Optional": true
+ },
+ {
+ "OriginalName": "caption_entities",
+ "ConvertedName": "CaptionEntities",
+ "Description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode",
+ "OriginalFieldType": "Array of MessageEntity",
+ "ConvertedFieldType": "MessageEntity[]",
+ "Optional": true
+ },
+ {
+ "OriginalName": "areas",
+ "ConvertedName": "Areas",
+ "Description": "A JSON-serialized list of clickable areas to be shown on the story",
+ "OriginalFieldType": "Array of StoryArea",
+ "ConvertedFieldType": "StoryArea[]",
+ "Optional": true
+ },
+ {
+ "OriginalName": "post_to_chat_page",
+ "ConvertedName": "PostToChatPage",
+ "Description": "Pass True to keep the story accessible after it expires",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "protect_content",
+ "ConvertedName": "ProtectContent",
+ "Description": "Pass True if the content of the story must be protected from forwarding and screenshotting",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "Story",
+ "ConvertedReturnType": "Story"
+ },
+ {
+ "OriginalName": "editStory",
+ "ConvertedName": "EditStory",
+ "Description": "Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "story_id",
+ "ConvertedName": "StoryId",
+ "Description": "Unique identifier of the story to edit",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "content",
+ "ConvertedName": "Content",
+ "Description": "Content of the story",
+ "OriginalFieldType": "InputStoryContent",
+ "ConvertedFieldType": "InputStoryContent",
+ "Optional": false
+ },
+ {
+ "OriginalName": "caption",
+ "ConvertedName": "Caption",
+ "Description": "Caption of the story, 0-2048 characters after entities parsing",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "parse_mode",
+ "ConvertedName": "ParseMode",
+ "Description": "Mode for parsing entities in the story caption. See formatting options for more details.",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "ParseMode",
+ "Optional": true
+ },
+ {
+ "OriginalName": "caption_entities",
+ "ConvertedName": "CaptionEntities",
+ "Description": "A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode",
+ "OriginalFieldType": "Array of MessageEntity",
+ "ConvertedFieldType": "MessageEntity[]",
+ "Optional": true
+ },
+ {
+ "OriginalName": "areas",
+ "ConvertedName": "Areas",
+ "Description": "A JSON-serialized list of clickable areas to be shown on the story",
+ "OriginalFieldType": "Array of StoryArea",
+ "ConvertedFieldType": "StoryArea[]",
+ "Optional": true
+ }
+ ],
+ "OriginalReturnType": "Story",
+ "ConvertedReturnType": "Story"
+ },
+ {
+ "OriginalName": "deleteStory",
+ "ConvertedName": "DeleteStory",
+ "Description": "Deletes a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns True on success.",
+ "Fields": [
+ {
+ "OriginalName": "business_connection_id",
+ "ConvertedName": "BusinessConnectionId",
+ "Description": "Unique identifier of the business connection",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "story_id",
+ "ConvertedName": "StoryId",
+ "Description": "Unique identifier of the story to delete",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ }
+ ],
+ "OriginalReturnType": "True",
+ "ConvertedReturnType": "bool"
+ },
{
"OriginalName": "sendSticker",
"ConvertedName": "SendSticker",
@@ -5277,163 +6124,6 @@
"OriginalReturnType": "True",
"ConvertedReturnType": "bool"
},
- {
- "OriginalName": "getAvailableGifts",
- "ConvertedName": "GetAvailableGifts",
- "Description": "Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.",
- "Fields": [],
- "OriginalReturnType": "Gifts",
- "ConvertedReturnType": "Gifts"
- },
- {
- "OriginalName": "sendGift",
- "ConvertedName": "SendGift",
- "Description": "Sends a gift to the given user or channel chat. The gift can\u0027t be converted to Telegram Stars by the receiver. Returns True on success.",
- "Fields": [
- {
- "OriginalName": "user_id",
- "ConvertedName": "UserId",
- "Description": "Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.",
- "OriginalFieldType": "Integer",
- "ConvertedFieldType": "int64",
- "Optional": true
- },
- {
- "OriginalName": "chat_id",
- "ConvertedName": "ChatId",
- "Description": "Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift.",
- "OriginalFieldType": "Integer or String",
- "ConvertedFieldType": "ChatId",
- "Optional": true
- },
- {
- "OriginalName": "gift_id",
- "ConvertedName": "GiftId",
- "Description": "Identifier of the gift",
- "OriginalFieldType": "String",
- "ConvertedFieldType": "string",
- "Optional": false
- },
- {
- "OriginalName": "pay_for_upgrade",
- "ConvertedName": "PayForUpgrade",
- "Description": "Pass True to pay for the gift upgrade from the bot\u0027s balance, thereby making the upgrade free for the receiver",
- "OriginalFieldType": "Boolean",
- "ConvertedFieldType": "bool",
- "Optional": true
- },
- {
- "OriginalName": "text",
- "ConvertedName": "Text",
- "Description": "Text that will be shown along with the gift; 0-128 characters",
- "OriginalFieldType": "String",
- "ConvertedFieldType": "string",
- "Optional": true
- },
- {
- "OriginalName": "text_parse_mode",
- "ConvertedName": "TextParseMode",
- "Description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than \u201Cbold\u201D, \u201Citalic\u201D, \u201Cunderline\u201D, \u201Cstrikethrough\u201D, \u201Cspoiler\u201D, and \u201Ccustom_emoji\u201D are ignored.",
- "OriginalFieldType": "String",
- "ConvertedFieldType": "string",
- "Optional": true
- },
- {
- "OriginalName": "text_entities",
- "ConvertedName": "TextEntities",
- "Description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than \u201Cbold\u201D, \u201Citalic\u201D, \u201Cunderline\u201D, \u201Cstrikethrough\u201D, \u201Cspoiler\u201D, and \u201Ccustom_emoji\u201D are ignored.",
- "OriginalFieldType": "Array of MessageEntity",
- "ConvertedFieldType": "MessageEntity[]",
- "Optional": true
- }
- ],
- "OriginalReturnType": "True",
- "ConvertedReturnType": "bool"
- },
- {
- "OriginalName": "verifyUser",
- "ConvertedName": "VerifyUser",
- "Description": "Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.",
- "Fields": [
- {
- "OriginalName": "user_id",
- "ConvertedName": "UserId",
- "Description": "Unique identifier of the target user",
- "OriginalFieldType": "Integer",
- "ConvertedFieldType": "int64",
- "Optional": false
- },
- {
- "OriginalName": "custom_description",
- "ConvertedName": "CustomDescription",
- "Description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn\u0027t allowed to provide a custom verification description.",
- "OriginalFieldType": "String",
- "ConvertedFieldType": "string",
- "Optional": true
- }
- ],
- "OriginalReturnType": "True",
- "ConvertedReturnType": "bool"
- },
- {
- "OriginalName": "verifyChat",
- "ConvertedName": "VerifyChat",
- "Description": "Verifies a chat on behalf of the organization which is represented by the bot. 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": "custom_description",
- "ConvertedName": "CustomDescription",
- "Description": "Custom description for the verification; 0-70 characters. Must be empty if the organization isn\u0027t allowed to provide a custom verification description.",
- "OriginalFieldType": "String",
- "ConvertedFieldType": "string",
- "Optional": true
- }
- ],
- "OriginalReturnType": "True",
- "ConvertedReturnType": "bool"
- },
- {
- "OriginalName": "removeUserVerification",
- "ConvertedName": "RemoveUserVerification",
- "Description": "Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.",
- "Fields": [
- {
- "OriginalName": "user_id",
- "ConvertedName": "UserId",
- "Description": "Unique identifier of the target user",
- "OriginalFieldType": "Integer",
- "ConvertedFieldType": "int64",
- "Optional": false
- }
- ],
- "OriginalReturnType": "True",
- "ConvertedReturnType": "bool"
- },
- {
- "OriginalName": "removeChatVerification",
- "ConvertedName": "RemoveChatVerification",
- "Description": "Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. 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
- }
- ],
- "OriginalReturnType": "True",
- "ConvertedReturnType": "bool"
- },
{
"OriginalName": "answerInlineQuery",
"ConvertedName": "AnswerInlineQuery",
@@ -5878,7 +6568,7 @@
{
"OriginalName": "subscription_period",
"ConvertedName": "SubscriptionPeriod",
- "Description": "The number of seconds the subscription will be active for before the next payment. The currency must be set to \u201CXTR\u201D (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 2500 Telegram Stars.",
+ "Description": "The number of seconds the subscription will be active for before the next payment. The currency must be set to \u201CXTR\u201D (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars.",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": true
diff --git a/src/Funogram.Generator/out/types.json b/src/Funogram.Generator/out/types.json
index e1e7907..d820697 100644
--- a/src/Funogram.Generator/out/types.json
+++ b/src/Funogram.Generator/out/types.json
@@ -723,12 +723,12 @@
"Optional": true
},
{
- "OriginalName": "can_send_gift",
- "ConvertedName": "CanSendGift",
- "Description": "True, if gifts can be sent to the chat",
- "OriginalFieldType": "True",
- "ConvertedFieldType": "bool",
- "Optional": true
+ "OriginalName": "accepted_gift_types",
+ "ConvertedName": "AcceptedGiftTypes",
+ "Description": "Information about types of gifts that are accepted by the chat or by the corresponding user for private chats",
+ "OriginalFieldType": "AcceptedGiftTypes",
+ "ConvertedFieldType": "AcceptedGiftTypes",
+ "Optional": false
},
{
"OriginalName": "can_send_paid_media",
@@ -1021,6 +1021,14 @@
"ConvertedFieldType": "string",
"Optional": true
},
+ {
+ "OriginalName": "paid_star_count",
+ "ConvertedName": "PaidStarCount",
+ "Description": "The number of Telegram Stars that were paid by the sender of the message to send it",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ },
{
"OriginalName": "text",
"ConvertedName": "Text",
@@ -1349,6 +1357,22 @@
"ConvertedFieldType": "ChatShared",
"Optional": true
},
+ {
+ "OriginalName": "gift",
+ "ConvertedName": "Gift",
+ "Description": "Service message: a regular gift was sent or received",
+ "OriginalFieldType": "GiftInfo",
+ "ConvertedFieldType": "GiftInfo",
+ "Optional": true
+ },
+ {
+ "OriginalName": "unique_gift",
+ "ConvertedName": "UniqueGift",
+ "Description": "Service message: a unique gift was sent or received",
+ "OriginalFieldType": "UniqueGiftInfo",
+ "ConvertedFieldType": "UniqueGiftInfo",
+ "Optional": true
+ },
{
"OriginalName": "connected_website",
"ConvertedName": "ConnectedWebsite",
@@ -1477,6 +1501,14 @@
"ConvertedFieldType": "GiveawayCompleted",
"Optional": true
},
+ {
+ "OriginalName": "paid_message_price_changed",
+ "ConvertedName": "PaidMessagePriceChanged",
+ "Description": "Service message: the price for paid messages has changed in the chat",
+ "OriginalFieldType": "PaidMessagePriceChanged",
+ "ConvertedFieldType": "PaidMessagePriceChanged",
+ "Optional": true
+ },
{
"OriginalName": "video_chat_scheduled",
"ConvertedName": "VideoChatScheduled",
@@ -4028,6 +4060,25 @@
]
}
},
+ {
+ "Name": "PaidMessagePriceChanged",
+ "Description": "Describes a service message about a change in the price of paid messages within a chat.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "paid_message_star_count",
+ "ConvertedName": "PaidMessageStarCount",
+ "Description": "The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
{
"Name": "GiveawayCreated",
"Description": "This object represents a service message about the creation of a scheduled giveaway.",
@@ -6282,26 +6333,58 @@
}
},
{
- "Name": "ChatLocation",
- "Description": "Represents a location to which a chat is connected.",
+ "Name": "StoryAreaPosition",
+ "Description": "Describes the position of a clickable area within a story.",
"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": "x_percentage",
+ "ConvertedName": "XPercentage",
+ "Description": "The abscissa of the area\u0027s center, as a percentage of the media width",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
"Optional": false
},
{
- "OriginalName": "address",
- "ConvertedName": "Address",
- "Description": "Location address; 1-64 characters, as defined by the chat owner",
- "OriginalFieldType": "String",
- "ConvertedFieldType": "string",
+ "OriginalName": "y_percentage",
+ "ConvertedName": "YPercentage",
+ "Description": "The ordinate of the area\u0027s center, as a percentage of the media height",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
+ "Optional": false
+ },
+ {
+ "OriginalName": "width_percentage",
+ "ConvertedName": "WidthPercentage",
+ "Description": "The width of the area\u0027s rectangle, as a percentage of the media width",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
+ "Optional": false
+ },
+ {
+ "OriginalName": "height_percentage",
+ "ConvertedName": "HeightPercentage",
+ "Description": "The height of the area\u0027s rectangle, as a percentage of the media height",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
+ "Optional": false
+ },
+ {
+ "OriginalName": "rotation_angle",
+ "ConvertedName": "RotationAngle",
+ "Description": "The clockwise rotation angle of the rectangle, in degrees; 0-360",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
+ "Optional": false
+ },
+ {
+ "OriginalName": "corner_radius_percentage",
+ "ConvertedName": "CornerRadiusPercentage",
+ "Description": "The radius of the rectangle corner rounding, as a percentage of the media width",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
"Optional": false
}
]
@@ -6309,58 +6392,82 @@
}
},
{
- "Name": "ReactionType",
- "Description": "This object describes the type of a reaction. Currently, it can be one of",
+ "Name": "LocationAddress",
+ "Description": "Describes the physical address of a location.",
"Kind": {
- "Case": "Cases",
+ "Case": "Fields",
"Fields": [
[
{
- "Name": "Emoji",
- "CaseType": "ReactionTypeEmoji"
+ "OriginalName": "country_code",
+ "ConvertedName": "CountryCode",
+ "Description": "The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
},
{
- "Name": "CustomEmoji",
- "CaseType": "ReactionTypeCustomEmoji"
+ "OriginalName": "state",
+ "ConvertedName": "State",
+ "Description": "State of the location",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
},
{
- "Name": "Paid",
- "CaseType": "ReactionTypePaid"
+ "OriginalName": "city",
+ "ConvertedName": "City",
+ "Description": "City of the location",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "street",
+ "ConvertedName": "Street",
+ "Description": "Street address of the location",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
}
]
]
}
},
{
- "Name": "ReactionTypeEmoji",
- "Description": "The reaction is based on an emoji.",
+ "Name": "StoryAreaType",
+ "Description": "Describes the type of a clickable area on a story. Currently, it can be one of",
"Kind": {
- "Case": "Fields",
+ "Case": "Cases",
"Fields": [
[
{
- "OriginalName": "type",
- "ConvertedName": "Type",
- "Description": "Type of the reaction, always \u201Cemoji\u201D",
- "OriginalFieldType": "String",
- "ConvertedFieldType": "string",
- "Optional": false
+ "Name": "Location",
+ "CaseType": "StoryAreaTypeLocation"
},
{
- "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": "SuggestedReaction",
+ "CaseType": "StoryAreaTypeSuggestedReaction"
+ },
+ {
+ "Name": "Link",
+ "CaseType": "StoryAreaTypeLink"
+ },
+ {
+ "Name": "Weather",
+ "CaseType": "StoryAreaTypeWeather"
+ },
+ {
+ "Name": "UniqueGift",
+ "CaseType": "StoryAreaTypeUniqueGift"
}
]
]
}
},
{
- "Name": "ReactionTypeCustomEmoji",
- "Description": "The reaction is based on a custom emoji.",
+ "Name": "StoryAreaTypeLocation",
+ "Description": "Describes a story area pointing to a location. Currently, a story can have up to 10 location areas.",
"Kind": {
"Case": "Fields",
"Fields": [
@@ -6368,26 +6475,42 @@
{
"OriginalName": "type",
"ConvertedName": "Type",
- "Description": "Type of the reaction, always \u201Ccustom_emoji\u201D",
+ "Description": "Type of the area, always \u201Clocation\u201D",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": false
},
{
- "OriginalName": "custom_emoji_id",
- "ConvertedName": "CustomEmojiId",
- "Description": "Custom emoji identifier",
- "OriginalFieldType": "String",
- "ConvertedFieldType": "string",
+ "OriginalName": "latitude",
+ "ConvertedName": "Latitude",
+ "Description": "Location latitude in degrees",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
+ "Optional": false
+ },
+ {
+ "OriginalName": "longitude",
+ "ConvertedName": "Longitude",
+ "Description": "Location longitude in degrees",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
"Optional": false
+ },
+ {
+ "OriginalName": "address",
+ "ConvertedName": "Address",
+ "Description": "Address of the location",
+ "OriginalFieldType": "LocationAddress",
+ "ConvertedFieldType": "LocationAddress",
+ "Optional": true
}
]
]
}
},
{
- "Name": "ReactionTypePaid",
- "Description": "The reaction is paid.",
+ "Name": "StoryAreaTypeSuggestedReaction",
+ "Description": "Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas.",
"Kind": {
"Case": "Fields",
"Fields": [
@@ -6395,18 +6518,42 @@
{
"OriginalName": "type",
"ConvertedName": "Type",
- "Description": "Type of the reaction, always \u201Cpaid\u201D",
+ "Description": "Type of the area, always \u201Csuggested_reaction\u201D",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": false
+ },
+ {
+ "OriginalName": "reaction_type",
+ "ConvertedName": "ReactionType",
+ "Description": "Type of the reaction",
+ "OriginalFieldType": "ReactionType",
+ "ConvertedFieldType": "ReactionType",
+ "Optional": false
+ },
+ {
+ "OriginalName": "is_dark",
+ "ConvertedName": "IsDark",
+ "Description": "Pass True if the reaction area has a dark background",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "is_flipped",
+ "ConvertedName": "IsFlipped",
+ "Description": "Pass True if reaction area corner is flipped",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
}
]
]
}
},
{
- "Name": "ReactionCount",
- "Description": "Represents a reaction added to a message along with the number of times it was added.",
+ "Name": "StoryAreaTypeLink",
+ "Description": "Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas.",
"Kind": {
"Case": "Fields",
"Fields": [
@@ -6414,17 +6561,17 @@
{
"OriginalName": "type",
"ConvertedName": "Type",
- "Description": "Type of the reaction",
- "OriginalFieldType": "ReactionType",
- "ConvertedFieldType": "ReactionType",
+ "Description": "Type of the area, always \u201Clink\u201D",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
"Optional": false
},
{
- "OriginalName": "total_count",
- "ConvertedName": "TotalCount",
- "Description": "Number of times the reaction was added",
- "OriginalFieldType": "Integer",
- "ConvertedFieldType": "int64",
+ "OriginalName": "url",
+ "ConvertedName": "Url",
+ "Description": "HTTP or tg:// URL to be opened when the area is clicked",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
"Optional": false
}
]
@@ -6432,66 +6579,42 @@
}
},
{
- "Name": "MessageReactionUpdated",
- "Description": "This object represents a change of a reaction on a message performed by a user.",
+ "Name": "StoryAreaTypeWeather",
+ "Description": "Describes a story area containing weather information. Currently, a story can have up to 3 weather areas.",
"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",
+ "OriginalName": "type",
+ "ConvertedName": "Type",
+ "Description": "Type of the area, always \u201Cweather\u201D",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
"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": "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": "date",
- "ConvertedName": "Date",
- "Description": "Date of the change in Unix time",
- "OriginalFieldType": "Integer",
- "ConvertedFieldType": "DateTime",
+ "OriginalName": "temperature",
+ "ConvertedName": "Temperature",
+ "Description": "Temperature, in degree Celsius",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
"Optional": false
},
{
- "OriginalName": "old_reaction",
- "ConvertedName": "OldReaction",
- "Description": "Previous list of reaction types that were set by the user",
- "OriginalFieldType": "Array of ReactionType",
- "ConvertedFieldType": "ReactionType[]",
+ "OriginalName": "emoji",
+ "ConvertedName": "Emoji",
+ "Description": "Emoji representing the weather",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
"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[]",
+ "OriginalName": "background_color",
+ "ConvertedName": "BackgroundColor",
+ "Description": "A color of the area background in the ARGB format",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
"Optional": false
}
]
@@ -6499,85 +6622,1073 @@
}
},
{
- "Name": "MessageReactionCountUpdated",
- "Description": "This object represents reaction changes on a message with anonymous reactions.",
+ "Name": "StoryAreaTypeUniqueGift",
+ "Description": "Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area.",
"Kind": {
"Case": "Fields",
"Fields": [
[
{
- "OriginalName": "chat",
- "ConvertedName": "Chat",
- "Description": "The chat containing the message",
- "OriginalFieldType": "Chat",
- "ConvertedFieldType": "Chat",
+ "OriginalName": "type",
+ "ConvertedName": "Type",
+ "Description": "Type of the area, always \u201Cunique_gift\u201D",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
"Optional": false
},
{
- "OriginalName": "message_id",
+ "OriginalName": "name",
+ "ConvertedName": "Name",
+ "Description": "Unique name of the gift",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "StoryArea",
+ "Description": "Describes a clickable area on a story media.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "position",
+ "ConvertedName": "Position",
+ "Description": "Position of the area",
+ "OriginalFieldType": "StoryAreaPosition",
+ "ConvertedFieldType": "StoryAreaPosition",
+ "Optional": false
+ },
+ {
+ "OriginalName": "type",
+ "ConvertedName": "Type",
+ "Description": "Type of the area",
+ "OriginalFieldType": "StoryAreaType",
+ "ConvertedFieldType": "StoryAreaType",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "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": "Paid",
+ "CaseType": "ReactionTypePaid"
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "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": "ReactionTypePaid",
+ "Description": "The reaction is paid.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "type",
+ "ConvertedName": "Type",
+ "Description": "Type of the reaction, always \u201Cpaid\u201D",
+ "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 message identifier inside the chat",
+ "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": "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": "date",
+ "ConvertedName": "Date",
+ "Description": "Date of the change in Unix time",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "DateTime",
+ "Optional": false
+ },
+ {
+ "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": "MessageReactionCountUpdated",
+ "Description": "This object represents reaction changes on a message with anonymous reactions.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "chat",
+ "ConvertedName": "Chat",
+ "Description": "The chat containing the message",
+ "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": "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
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "ForumTopic",
+ "Description": "This object represents a forum topic.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "message_thread_id",
+ "ConvertedName": "MessageThreadId",
+ "Description": "Unique identifier of the forum topic",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "name",
+ "ConvertedName": "Name",
+ "Description": "Name of the topic",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "icon_color",
+ "ConvertedName": "IconColor",
+ "Description": "Color of the topic icon in RGB format",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "icon_custom_emoji_id",
+ "ConvertedName": "IconCustomEmojiId",
+ "Description": "Unique identifier of the custom emoji shown as the topic icon",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "Gift",
+ "Description": "This object represents a gift that can be sent by the bot.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "id",
+ "ConvertedName": "Id",
+ "Description": "Unique identifier of the gift",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "sticker",
+ "ConvertedName": "Sticker",
+ "Description": "The sticker that represents the gift",
+ "OriginalFieldType": "Sticker",
+ "ConvertedFieldType": "Sticker",
+ "Optional": false
+ },
+ {
+ "OriginalName": "star_count",
+ "ConvertedName": "StarCount",
+ "Description": "The number of Telegram Stars that must be paid to send the sticker",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "upgrade_star_count",
+ "ConvertedName": "UpgradeStarCount",
+ "Description": "The number of Telegram Stars that must be paid to upgrade the gift to a unique one",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ },
+ {
+ "OriginalName": "total_count",
+ "ConvertedName": "TotalCount",
+ "Description": "The total number of the gifts of this type that can be sent; for limited gifts only",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ },
+ {
+ "OriginalName": "remaining_count",
+ "ConvertedName": "RemainingCount",
+ "Description": "The number of remaining gifts of this type that can be sent; for limited gifts only",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "Gifts",
+ "Description": "This object represent a list of gifts.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "gifts",
+ "ConvertedName": "Gifts",
+ "Description": "The list of gifts",
+ "OriginalFieldType": "Array of Gift",
+ "ConvertedFieldType": "Gift[]",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "UniqueGiftModel",
+ "Description": "This object describes the model of a unique gift.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "name",
+ "ConvertedName": "Name",
+ "Description": "Name of the model",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "sticker",
+ "ConvertedName": "Sticker",
+ "Description": "The sticker that represents the unique gift",
+ "OriginalFieldType": "Sticker",
+ "ConvertedFieldType": "Sticker",
+ "Optional": false
+ },
+ {
+ "OriginalName": "rarity_per_mille",
+ "ConvertedName": "RarityPerMille",
+ "Description": "The number of unique gifts that receive this model for every 1000 gifts upgraded",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "UniqueGiftSymbol",
+ "Description": "This object describes the symbol shown on the pattern of a unique gift.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "name",
+ "ConvertedName": "Name",
+ "Description": "Name of the symbol",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "sticker",
+ "ConvertedName": "Sticker",
+ "Description": "The sticker that represents the unique gift",
+ "OriginalFieldType": "Sticker",
+ "ConvertedFieldType": "Sticker",
+ "Optional": false
+ },
+ {
+ "OriginalName": "rarity_per_mille",
+ "ConvertedName": "RarityPerMille",
+ "Description": "The number of unique gifts that receive this model for every 1000 gifts upgraded",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "UniqueGiftBackdropColors",
+ "Description": "This object describes the colors of the backdrop of a unique gift.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "center_color",
+ "ConvertedName": "CenterColor",
+ "Description": "The color in the center of the backdrop in RGB format",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "edge_color",
+ "ConvertedName": "EdgeColor",
+ "Description": "The color on the edges of the backdrop in RGB format",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "symbol_color",
+ "ConvertedName": "SymbolColor",
+ "Description": "The color to be applied to the symbol in RGB format",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "text_color",
+ "ConvertedName": "TextColor",
+ "Description": "The color for the text on the backdrop in RGB format",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "UniqueGiftBackdrop",
+ "Description": "This object describes the backdrop of a unique gift.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "name",
+ "ConvertedName": "Name",
+ "Description": "Name of the backdrop",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "colors",
+ "ConvertedName": "Colors",
+ "Description": "Colors of the backdrop",
+ "OriginalFieldType": "UniqueGiftBackdropColors",
+ "ConvertedFieldType": "UniqueGiftBackdropColors",
+ "Optional": false
+ },
+ {
+ "OriginalName": "rarity_per_mille",
+ "ConvertedName": "RarityPerMille",
+ "Description": "The number of unique gifts that receive this backdrop for every 1000 gifts upgraded",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "UniqueGift",
+ "Description": "This object describes a unique gift that was upgraded from a regular gift.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "base_name",
+ "ConvertedName": "BaseName",
+ "Description": "Human-readable name of the regular gift from which this unique gift was upgraded",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "name",
+ "ConvertedName": "Name",
+ "Description": "Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "number",
+ "ConvertedName": "Number",
+ "Description": "Unique number of the upgraded gift among gifts upgraded from the same regular gift",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": false
+ },
+ {
+ "OriginalName": "model",
+ "ConvertedName": "Model",
+ "Description": "Model of the gift",
+ "OriginalFieldType": "UniqueGiftModel",
+ "ConvertedFieldType": "UniqueGiftModel",
+ "Optional": false
+ },
+ {
+ "OriginalName": "symbol",
+ "ConvertedName": "Symbol",
+ "Description": "Symbol of the gift",
+ "OriginalFieldType": "UniqueGiftSymbol",
+ "ConvertedFieldType": "UniqueGiftSymbol",
+ "Optional": false
+ },
+ {
+ "OriginalName": "backdrop",
+ "ConvertedName": "Backdrop",
+ "Description": "Backdrop of the gift",
+ "OriginalFieldType": "UniqueGiftBackdrop",
+ "ConvertedFieldType": "UniqueGiftBackdrop",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "GiftInfo",
+ "Description": "Describes a service message about a regular gift that was sent or received.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "gift",
+ "ConvertedName": "Gift",
+ "Description": "Information about the gift",
+ "OriginalFieldType": "Gift",
+ "ConvertedFieldType": "Gift",
+ "Optional": false
+ },
+ {
+ "OriginalName": "owned_gift_id",
+ "ConvertedName": "OwnedGiftId",
+ "Description": "Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "convert_star_count",
+ "ConvertedName": "ConvertStarCount",
+ "Description": "Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ },
+ {
+ "OriginalName": "prepaid_upgrade_star_count",
+ "ConvertedName": "PrepaidUpgradeStarCount",
+ "Description": "Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_be_upgraded",
+ "ConvertedName": "CanBeUpgraded",
+ "Description": "True, if the gift can be upgraded to a unique gift",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "text",
+ "ConvertedName": "Text",
+ "Description": "Text of the message that was added to the gift",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "entities",
+ "ConvertedName": "Entities",
+ "Description": "Special entities that appear in the text",
+ "OriginalFieldType": "Array of MessageEntity",
+ "ConvertedFieldType": "MessageEntity[]",
+ "Optional": true
+ },
+ {
+ "OriginalName": "is_private",
+ "ConvertedName": "IsPrivate",
+ "Description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "UniqueGiftInfo",
+ "Description": "Describes a service message about a unique gift that was sent or received.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "gift",
+ "ConvertedName": "Gift",
+ "Description": "Information about the gift",
+ "OriginalFieldType": "UniqueGift",
+ "ConvertedFieldType": "UniqueGift",
+ "Optional": false
+ },
+ {
+ "OriginalName": "origin",
+ "ConvertedName": "Origin",
+ "Description": "Origin of the gift. Currently, either \u201Cupgrade\u201D or \u201Ctransfer\u201D",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "owned_gift_id",
+ "ConvertedName": "OwnedGiftId",
+ "Description": "Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "transfer_star_count",
+ "ConvertedName": "TransferStarCount",
+ "Description": "Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "OwnedGift",
+ "Description": "This object describes a gift received and owned by a user or a chat. Currently, it can be one of",
+ "Kind": {
+ "Case": "Cases",
+ "Fields": [
+ [
+ {
+ "Name": "Regular",
+ "CaseType": "OwnedGiftRegular"
+ },
+ {
+ "Name": "Unique",
+ "CaseType": "OwnedGiftUnique"
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "OwnedGiftRegular",
+ "Description": "Describes a regular gift owned by a user or a chat.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "type",
+ "ConvertedName": "Type",
+ "Description": "Type of the gift, always \u201Cregular\u201D",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "gift",
+ "ConvertedName": "Gift",
+ "Description": "Information about the regular gift",
+ "OriginalFieldType": "Gift",
+ "ConvertedFieldType": "Gift",
+ "Optional": false
+ },
+ {
+ "OriginalName": "owned_gift_id",
+ "ConvertedName": "OwnedGiftId",
+ "Description": "Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "sender_user",
+ "ConvertedName": "SenderUser",
+ "Description": "Sender of the gift if it is a known user",
+ "OriginalFieldType": "User",
+ "ConvertedFieldType": "User",
+ "Optional": true
+ },
+ {
+ "OriginalName": "send_date",
+ "ConvertedName": "SendDate",
+ "Description": "Date the gift was sent in Unix time",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": false
},
{
- "OriginalName": "date",
- "ConvertedName": "Date",
- "Description": "Date of the change in Unix time",
+ "OriginalName": "text",
+ "ConvertedName": "Text",
+ "Description": "Text of the message that was added to the gift",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "entities",
+ "ConvertedName": "Entities",
+ "Description": "Special entities that appear in the text",
+ "OriginalFieldType": "Array of MessageEntity",
+ "ConvertedFieldType": "MessageEntity[]",
+ "Optional": true
+ },
+ {
+ "OriginalName": "is_private",
+ "ConvertedName": "IsPrivate",
+ "Description": "True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "is_saved",
+ "ConvertedName": "IsSaved",
+ "Description": "True, if the gift is displayed on the account\u0027s profile page; for gifts received on behalf of business accounts only",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_be_upgraded",
+ "ConvertedName": "CanBeUpgraded",
+ "Description": "True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "was_refunded",
+ "ConvertedName": "WasRefunded",
+ "Description": "True, if the gift was refunded and isn\u0027t available anymore",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "convert_star_count",
+ "ConvertedName": "ConvertStarCount",
+ "Description": "Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars",
"OriginalFieldType": "Integer",
- "ConvertedFieldType": "DateTime",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ },
+ {
+ "OriginalName": "prepaid_upgrade_star_count",
+ "ConvertedName": "PrepaidUpgradeStarCount",
+ "Description": "Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "OwnedGiftUnique",
+ "Description": "Describes a unique gift received and owned by a user or a chat.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "type",
+ "ConvertedName": "Type",
+ "Description": "Type of the gift, always \u201Cunique\u201D",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
"Optional": false
},
{
- "OriginalName": "reactions",
- "ConvertedName": "Reactions",
- "Description": "List of reactions that are present on the message",
- "OriginalFieldType": "Array of ReactionCount",
- "ConvertedFieldType": "ReactionCount[]",
+ "OriginalName": "gift",
+ "ConvertedName": "Gift",
+ "Description": "Information about the unique gift",
+ "OriginalFieldType": "UniqueGift",
+ "ConvertedFieldType": "UniqueGift",
+ "Optional": false
+ },
+ {
+ "OriginalName": "owned_gift_id",
+ "ConvertedName": "OwnedGiftId",
+ "Description": "Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": true
+ },
+ {
+ "OriginalName": "sender_user",
+ "ConvertedName": "SenderUser",
+ "Description": "Sender of the gift if it is a known user",
+ "OriginalFieldType": "User",
+ "ConvertedFieldType": "User",
+ "Optional": true
+ },
+ {
+ "OriginalName": "send_date",
+ "ConvertedName": "SendDate",
+ "Description": "Date the gift was sent in Unix time",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
"Optional": false
+ },
+ {
+ "OriginalName": "is_saved",
+ "ConvertedName": "IsSaved",
+ "Description": "True, if the gift is displayed on the account\u0027s profile page; for gifts received on behalf of business accounts only",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_be_transferred",
+ "ConvertedName": "CanBeTransferred",
+ "Description": "True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "transfer_star_count",
+ "ConvertedName": "TransferStarCount",
+ "Description": "Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
}
]
]
}
},
{
- "Name": "ForumTopic",
- "Description": "This object represents a forum topic.",
+ "Name": "OwnedGifts",
+ "Description": "Contains the list of gifts received and owned by a user or a chat.",
"Kind": {
"Case": "Fields",
"Fields": [
[
{
- "OriginalName": "message_thread_id",
- "ConvertedName": "MessageThreadId",
- "Description": "Unique identifier of the forum topic",
+ "OriginalName": "total_count",
+ "ConvertedName": "TotalCount",
+ "Description": "The total number of gifts owned by the user or the chat",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": false
},
{
- "OriginalName": "name",
- "ConvertedName": "Name",
- "Description": "Name of the topic",
+ "OriginalName": "gifts",
+ "ConvertedName": "Gifts",
+ "Description": "The list of gifts",
+ "OriginalFieldType": "Array of OwnedGift",
+ "ConvertedFieldType": "OwnedGift[]",
+ "Optional": false
+ },
+ {
+ "OriginalName": "next_offset",
+ "ConvertedName": "NextOffset",
+ "Description": "Offset for the next request. If empty, then there are no more results",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
+ "Optional": true
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "AcceptedGiftTypes",
+ "Description": "This object describes the types of gifts that can be gifted to a user or a chat.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "unlimited_gifts",
+ "ConvertedName": "UnlimitedGifts",
+ "Description": "True, if unlimited regular gifts are accepted",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
"Optional": false
},
{
- "OriginalName": "icon_color",
- "ConvertedName": "IconColor",
- "Description": "Color of the topic icon in RGB format",
+ "OriginalName": "limited_gifts",
+ "ConvertedName": "LimitedGifts",
+ "Description": "True, if limited regular gifts are accepted",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": false
+ },
+ {
+ "OriginalName": "unique_gifts",
+ "ConvertedName": "UniqueGifts",
+ "Description": "True, if unique gifts or gifts that can be upgraded to unique for free are accepted",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": false
+ },
+ {
+ "OriginalName": "premium_subscription",
+ "ConvertedName": "PremiumSubscription",
+ "Description": "True, if a Telegram Premium subscription is accepted",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "StarAmount",
+ "Description": "Describes an amount of Telegram Stars.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "amount",
+ "ConvertedName": "Amount",
+ "Description": "Integer amount of Telegram Stars, rounded to 0; can be negative",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": false
},
{
- "OriginalName": "icon_custom_emoji_id",
- "ConvertedName": "IconCustomEmojiId",
- "Description": "Unique identifier of the custom emoji shown as the topic icon",
- "OriginalFieldType": "String",
- "ConvertedFieldType": "string",
+ "OriginalName": "nanostar_amount",
+ "ConvertedName": "NanostarAmount",
+ "Description": "The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
"Optional": true
}
]
@@ -7217,12 +8328,135 @@
"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
+ "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": "BusinessBotRights",
+ "Description": "Represents the rights of a business bot.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "can_reply",
+ "ConvertedName": "CanReply",
+ "Description": "True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_read_messages",
+ "ConvertedName": "CanReadMessages",
+ "Description": "True, if the bot can mark incoming private messages as read",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_delete_outgoing_messages",
+ "ConvertedName": "CanDeleteOutgoingMessages",
+ "Description": "True, if the bot can delete messages sent by the bot",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_delete_all_messages",
+ "ConvertedName": "CanDeleteAllMessages",
+ "Description": "True, if the bot can delete all private messages in managed chats",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_edit_name",
+ "ConvertedName": "CanEditName",
+ "Description": "True, if the bot can edit the first and last name of the business account",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_edit_bio",
+ "ConvertedName": "CanEditBio",
+ "Description": "True, if the bot can edit the bio of the business account",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_edit_profile_photo",
+ "ConvertedName": "CanEditProfilePhoto",
+ "Description": "True, if the bot can edit the profile photo of the business account",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_edit_username",
+ "ConvertedName": "CanEditUsername",
+ "Description": "True, if the bot can edit the username of the business account",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_change_gift_settings",
+ "ConvertedName": "CanChangeGiftSettings",
+ "Description": "True, if the bot can change the privacy settings pertaining to gifts for the business account",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_view_gifts_and_stars",
+ "ConvertedName": "CanViewGiftsAndStars",
+ "Description": "True, if the bot can view gifts and the amount of Telegram Stars owned by the business account",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_convert_gifts_to_stars",
+ "ConvertedName": "CanConvertGiftsToStars",
+ "Description": "True, if the bot can convert regular gifts owned by the business account to Telegram Stars",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_transfer_and_upgrade_gifts",
+ "ConvertedName": "CanTransferAndUpgradeGifts",
+ "Description": "True, if the bot can transfer and upgrade gifts owned by the business account",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_transfer_stars",
+ "ConvertedName": "CanTransferStars",
+ "Description": "True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ },
+ {
+ "OriginalName": "can_manage_stories",
+ "ConvertedName": "CanManageStories",
+ "Description": "True, if the bot can post, edit and delete stories on behalf of the business account",
+ "OriginalFieldType": "True",
+ "ConvertedFieldType": "bool",
+ "Optional": true
}
]
]
@@ -7268,12 +8502,12 @@
"Optional": false
},
{
- "OriginalName": "can_reply",
- "ConvertedName": "CanReply",
- "Description": "True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours",
- "OriginalFieldType": "Boolean",
- "ConvertedFieldType": "bool",
- "Optional": false
+ "OriginalName": "rights",
+ "ConvertedName": "Rights",
+ "Description": "Rights of the business bot",
+ "OriginalFieldType": "BusinessBotRights",
+ "ConvertedFieldType": "BusinessBotRights",
+ "Optional": true
},
{
"OriginalName": "is_enabled",
@@ -7955,6 +9189,184 @@
]
}
},
+ {
+ "Name": "InputProfilePhoto",
+ "Description": "This object describes a profile photo to set. Currently, it can be one of",
+ "Kind": {
+ "Case": "Cases",
+ "Fields": [
+ [
+ {
+ "Name": "Static",
+ "CaseType": "InputProfilePhotoStatic"
+ },
+ {
+ "Name": "Animated",
+ "CaseType": "InputProfilePhotoAnimated"
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "InputProfilePhotoStatic",
+ "Description": "A static profile photo in the .JPG format.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "type",
+ "ConvertedName": "Type",
+ "Description": "Type of the profile photo, must be static",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "photo",
+ "ConvertedName": "Photo",
+ "Description": "The static profile photo. Profile photos can\u0027t be reused and can only be uploaded as a new file, so you can pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D if the photo was uploaded using multipart/form-data under \u003Cfile_attach_name\u003E. More information on Sending Files \u00BB",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "InputProfilePhotoAnimated",
+ "Description": "An animated profile photo in the MPEG4 format.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "type",
+ "ConvertedName": "Type",
+ "Description": "Type of the profile photo, must be animated",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "animation",
+ "ConvertedName": "Animation",
+ "Description": "The animated profile photo. Profile photos can\u0027t be reused and can only be uploaded as a new file, so you can pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D if the photo was uploaded using multipart/form-data under \u003Cfile_attach_name\u003E. More information on Sending Files \u00BB",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "main_frame_timestamp",
+ "ConvertedName": "MainFrameTimestamp",
+ "Description": "Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
+ "Optional": true
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "InputStoryContent",
+ "Description": "This object describes the content of a story to post. Currently, it can be one of",
+ "Kind": {
+ "Case": "Cases",
+ "Fields": [
+ [
+ {
+ "Name": "Photo",
+ "CaseType": "InputStoryContentPhoto"
+ },
+ {
+ "Name": "Video",
+ "CaseType": "InputStoryContentVideo"
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "InputStoryContentPhoto",
+ "Description": "Describes a photo to post as a story.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "type",
+ "ConvertedName": "Type",
+ "Description": "Type of the content, must be photo",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "photo",
+ "ConvertedName": "Photo",
+ "Description": "The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can\u0027t be reused and can only be uploaded as a new file, so you can pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D if the photo was uploaded using multipart/form-data under \u003Cfile_attach_name\u003E. More information on Sending Files \u00BB",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ }
+ ]
+ ]
+ }
+ },
+ {
+ "Name": "InputStoryContentVideo",
+ "Description": "Describes a video to post as a story.",
+ "Kind": {
+ "Case": "Fields",
+ "Fields": [
+ [
+ {
+ "OriginalName": "type",
+ "ConvertedName": "Type",
+ "Description": "Type of the content, must be video",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "video",
+ "ConvertedName": "Video",
+ "Description": "The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can\u0027t be reused and can only be uploaded as a new file, so you can pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D if the video was uploaded using multipart/form-data under \u003Cfile_attach_name\u003E. More information on Sending Files \u00BB",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
+ {
+ "OriginalName": "duration",
+ "ConvertedName": "Duration",
+ "Description": "Precise duration of the video in seconds; 0-60",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
+ "Optional": true
+ },
+ {
+ "OriginalName": "cover_frame_timestamp",
+ "ConvertedName": "CoverFrameTimestamp",
+ "Description": "Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.",
+ "OriginalFieldType": "Float",
+ "ConvertedFieldType": "float",
+ "Optional": true
+ },
+ {
+ "OriginalName": "is_animation",
+ "ConvertedName": "IsAnimation",
+ "Description": "Pass True if the video has no sound",
+ "OriginalFieldType": "Boolean",
+ "ConvertedFieldType": "bool",
+ "Optional": true
+ }
+ ]
+ ]
+ }
+ },
{
"Name": "Sticker",
"Description": "This object represents a sticker.",
@@ -8190,9 +9602,9 @@
{
"OriginalName": "sticker",
"ConvertedName": "Sticker",
- "Description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D to upload a new one using multipart/form-data under \u003Cfile_attach_name\u003E name. Animated and video stickers can\u0027t be uploaded via HTTP URL. More information on Sending Files \u00BB",
- "OriginalFieldType": "InputFile or String",
- "ConvertedFieldType": "InputFile",
+ "Description": "The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D to upload a new file using multipart/form-data under \u003Cfile_attach_name\u003E name. Animated and video stickers can\u0027t be uploaded via HTTP URL. More information on Sending Files \u00BB",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
"Optional": false
},
{
@@ -8231,84 +9643,6 @@
]
}
},
- {
- "Name": "Gift",
- "Description": "This object represents a gift that can be sent by the bot.",
- "Kind": {
- "Case": "Fields",
- "Fields": [
- [
- {
- "OriginalName": "id",
- "ConvertedName": "Id",
- "Description": "Unique identifier of the gift",
- "OriginalFieldType": "String",
- "ConvertedFieldType": "string",
- "Optional": false
- },
- {
- "OriginalName": "sticker",
- "ConvertedName": "Sticker",
- "Description": "The sticker that represents the gift",
- "OriginalFieldType": "Sticker",
- "ConvertedFieldType": "Sticker",
- "Optional": false
- },
- {
- "OriginalName": "star_count",
- "ConvertedName": "StarCount",
- "Description": "The number of Telegram Stars that must be paid to send the sticker",
- "OriginalFieldType": "Integer",
- "ConvertedFieldType": "int64",
- "Optional": false
- },
- {
- "OriginalName": "upgrade_star_count",
- "ConvertedName": "UpgradeStarCount",
- "Description": "The number of Telegram Stars that must be paid to upgrade the gift to a unique one",
- "OriginalFieldType": "Integer",
- "ConvertedFieldType": "int64",
- "Optional": true
- },
- {
- "OriginalName": "total_count",
- "ConvertedName": "TotalCount",
- "Description": "The total number of the gifts of this type that can be sent; for limited gifts only",
- "OriginalFieldType": "Integer",
- "ConvertedFieldType": "int64",
- "Optional": true
- },
- {
- "OriginalName": "remaining_count",
- "ConvertedName": "RemainingCount",
- "Description": "The number of remaining gifts of this type that can be sent; for limited gifts only",
- "OriginalFieldType": "Integer",
- "ConvertedFieldType": "int64",
- "Optional": true
- }
- ]
- ]
- }
- },
- {
- "Name": "Gifts",
- "Description": "This object represent a list of gifts.",
- "Kind": {
- "Case": "Fields",
- "Fields": [
- [
- {
- "OriginalName": "gifts",
- "ConvertedName": "Gifts",
- "Description": "The list of gifts",
- "OriginalFieldType": "Array of Gift",
- "ConvertedFieldType": "Gift[]",
- "Optional": false
- }
- ]
- ]
- }
- },
{
"Name": "InlineQuery",
"Description": "This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.",
@@ -11712,6 +13046,14 @@
"ConvertedFieldType": "string",
"Optional": false
},
+ {
+ "OriginalName": "transaction_type",
+ "ConvertedName": "TransactionType",
+ "Description": "Type of the transaction, currently one of \u201Cinvoice_payment\u201D for payments via invoices, \u201Cpaid_media_payment\u201D for payments for paid media, \u201Cgift_purchase\u201D for gifts sent by the bot, \u201Cpremium_purchase\u201D for Telegram Premium subscriptions gifted by the bot, \u201Cbusiness_account_transfer\u201D for direct transfers from managed business accounts",
+ "OriginalFieldType": "String",
+ "ConvertedFieldType": "string",
+ "Optional": false
+ },
{
"OriginalName": "user",
"ConvertedName": "User",
@@ -11723,7 +13065,7 @@
{
"OriginalName": "affiliate",
"ConvertedName": "Affiliate",
- "Description": "Information about the affiliate that received a commission via this transaction",
+ "Description": "Information about the affiliate that received a commission via this transaction. Can be available only for \u201Cinvoice_payment\u201D and \u201Cpaid_media_payment\u201D transactions.",
"OriginalFieldType": "AffiliateInfo",
"ConvertedFieldType": "AffiliateInfo",
"Optional": true
@@ -11731,7 +13073,7 @@
{
"OriginalName": "invoice_payload",
"ConvertedName": "InvoicePayload",
- "Description": "Bot-specified invoice payload",
+ "Description": "Bot-specified invoice payload. Can be available only for \u201Cinvoice_payment\u201D transactions.",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": true
@@ -11739,7 +13081,7 @@
{
"OriginalName": "subscription_period",
"ConvertedName": "SubscriptionPeriod",
- "Description": "The duration of the paid subscription",
+ "Description": "The duration of the paid subscription. Can be available only for \u201Cinvoice_payment\u201D transactions.",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": true
@@ -11747,7 +13089,7 @@
{
"OriginalName": "paid_media",
"ConvertedName": "PaidMedia",
- "Description": "Information about the paid media bought by the user",
+ "Description": "Information about the paid media bought by the user; for \u201Cpaid_media_payment\u201D transactions only",
"OriginalFieldType": "Array of PaidMedia",
"ConvertedFieldType": "PaidMedia[]",
"Optional": true
@@ -11755,7 +13097,7 @@
{
"OriginalName": "paid_media_payload",
"ConvertedName": "PaidMediaPayload",
- "Description": "Bot-specified paid media payload",
+ "Description": "Bot-specified paid media payload. Can be available only for \u201Cpaid_media_payment\u201D transactions.",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": true
@@ -11763,10 +13105,18 @@
{
"OriginalName": "gift",
"ConvertedName": "Gift",
- "Description": "The gift sent to the user by the bot",
+ "Description": "The gift sent to the user by the bot; for \u201Cgift_purchase\u201D transactions only",
"OriginalFieldType": "Gift",
"ConvertedFieldType": "Gift",
"Optional": true
+ },
+ {
+ "OriginalName": "premium_subscription_duration",
+ "ConvertedName": "PremiumSubscriptionDuration",
+ "Description": "Number of months the gifted Telegram Premium subscription will be active for; for \u201Cpremium_purchase\u201D transactions only",
+ "OriginalFieldType": "Integer",
+ "ConvertedFieldType": "int64",
+ "Optional": true
}
]
]
diff --git a/src/Funogram.Telegram/Directory.Build.props b/src/Funogram.Telegram/Directory.Build.props
index 449c97a..87d7d60 100644
--- a/src/Funogram.Telegram/Directory.Build.props
+++ b/src/Funogram.Telegram/Directory.Build.props
@@ -1,7 +1,7 @@
- 8.3.0.0
+ 9.0.0.0
Nikolay Matyushin
Funogram.Telegram
Funogram.Telegram
diff --git a/src/Funogram.Telegram/RequestsTypes.fs b/src/Funogram.Telegram/RequestsTypes.fs
index d844f18..569894a 100644
--- a/src/Funogram.Telegram/RequestsTypes.fs
+++ b/src/Funogram.Telegram/RequestsTypes.fs
@@ -2112,6 +2112,384 @@ type DeleteMessages =
interface IRequestBase with
member _.MethodName = "deleteMessages"
+type GetAvailableGifts() =
+ static member Make() = GetAvailableGifts()
+ interface IRequestBase with
+ member _.MethodName = "getAvailableGifts"
+
+type SendGift =
+ {
+ UserId: int64 option
+ ChatId: ChatId option
+ GiftId: string
+ PayForUpgrade: bool option
+ Text: string option
+ TextParseMode: string option
+ TextEntities: MessageEntity[] option
+ }
+ static member Make(giftId: string, ?userId: int64, ?chatId: ChatId, ?payForUpgrade: bool, ?text: string, ?textParseMode: string, ?textEntities: MessageEntity[]) =
+ {
+ UserId = userId
+ ChatId = chatId
+ GiftId = giftId
+ PayForUpgrade = payForUpgrade
+ Text = text
+ TextParseMode = textParseMode
+ TextEntities = textEntities
+ }
+ interface IRequestBase with
+ member _.MethodName = "sendGift"
+
+type GiftPremiumSubscription =
+ {
+ UserId: int64
+ MonthCount: int64
+ StarCount: int64
+ Text: string option
+ TextParseMode: string option
+ TextEntities: MessageEntity[] option
+ }
+ static member Make(userId: int64, monthCount: int64, starCount: int64, ?text: string, ?textParseMode: string, ?textEntities: MessageEntity[]) =
+ {
+ UserId = userId
+ MonthCount = monthCount
+ StarCount = starCount
+ Text = text
+ TextParseMode = textParseMode
+ TextEntities = textEntities
+ }
+ interface IRequestBase with
+ member _.MethodName = "giftPremiumSubscription"
+
+type VerifyUser =
+ {
+ UserId: int64
+ CustomDescription: string option
+ }
+ static member Make(userId: int64, ?customDescription: string) =
+ {
+ UserId = userId
+ CustomDescription = customDescription
+ }
+ interface IRequestBase with
+ member _.MethodName = "verifyUser"
+
+type VerifyChat =
+ {
+ ChatId: ChatId
+ CustomDescription: string option
+ }
+ static member Make(chatId: ChatId, ?customDescription: string) =
+ {
+ ChatId = chatId
+ CustomDescription = customDescription
+ }
+ static member Make(chatId: int64, ?customDescription: string) =
+ VerifyChat.Make(ChatId.Int chatId, ?customDescription = customDescription)
+ static member Make(chatId: string, ?customDescription: string) =
+ VerifyChat.Make(ChatId.String chatId, ?customDescription = customDescription)
+ interface IRequestBase with
+ member _.MethodName = "verifyChat"
+
+type RemoveUserVerification =
+ {
+ UserId: int64
+ }
+ static member Make(userId: int64) =
+ {
+ UserId = userId
+ }
+ interface IRequestBase with
+ member _.MethodName = "removeUserVerification"
+
+type RemoveChatVerification =
+ {
+ ChatId: ChatId
+ }
+ static member Make(chatId: ChatId) =
+ {
+ ChatId = chatId
+ }
+ static member Make(chatId: int64) =
+ RemoveChatVerification.Make(ChatId.Int chatId)
+ static member Make(chatId: string) =
+ RemoveChatVerification.Make(ChatId.String chatId)
+ interface IRequestBase with
+ member _.MethodName = "removeChatVerification"
+
+type ReadBusinessMessage =
+ {
+ BusinessConnectionId: string
+ ChatId: int64
+ MessageId: int64
+ }
+ static member Make(businessConnectionId: string, chatId: int64, messageId: int64) =
+ {
+ BusinessConnectionId = businessConnectionId
+ ChatId = chatId
+ MessageId = messageId
+ }
+ interface IRequestBase with
+ member _.MethodName = "readBusinessMessage"
+
+type DeleteBusinessMessages =
+ {
+ BusinessConnectionId: string
+ MessageIds: int64[]
+ }
+ static member Make(businessConnectionId: string, messageIds: int64[]) =
+ {
+ BusinessConnectionId = businessConnectionId
+ MessageIds = messageIds
+ }
+ interface IRequestBase with
+ member _.MethodName = "deleteBusinessMessages"
+
+type SetBusinessAccountName =
+ {
+ BusinessConnectionId: string
+ FirstName: string
+ LastName: string option
+ }
+ static member Make(businessConnectionId: string, firstName: string, ?lastName: string) =
+ {
+ BusinessConnectionId = businessConnectionId
+ FirstName = firstName
+ LastName = lastName
+ }
+ interface IRequestBase with
+ member _.MethodName = "setBusinessAccountName"
+
+type SetBusinessAccountUsername =
+ {
+ BusinessConnectionId: string
+ Username: string option
+ }
+ static member Make(businessConnectionId: string, ?username: string) =
+ {
+ BusinessConnectionId = businessConnectionId
+ Username = username
+ }
+ interface IRequestBase with
+ member _.MethodName = "setBusinessAccountUsername"
+
+type SetBusinessAccountBio =
+ {
+ BusinessConnectionId: string
+ Bio: string option
+ }
+ static member Make(businessConnectionId: string, ?bio: string) =
+ {
+ BusinessConnectionId = businessConnectionId
+ Bio = bio
+ }
+ interface IRequestBase with
+ member _.MethodName = "setBusinessAccountBio"
+
+type SetBusinessAccountProfilePhoto =
+ {
+ BusinessConnectionId: string
+ Photo: InputProfilePhoto
+ IsPublic: bool option
+ }
+ static member Make(businessConnectionId: string, photo: InputProfilePhoto, ?isPublic: bool) =
+ {
+ BusinessConnectionId = businessConnectionId
+ Photo = photo
+ IsPublic = isPublic
+ }
+ interface IRequestBase with
+ member _.MethodName = "setBusinessAccountProfilePhoto"
+
+type RemoveBusinessAccountProfilePhoto =
+ {
+ BusinessConnectionId: string
+ IsPublic: bool option
+ }
+ static member Make(businessConnectionId: string, ?isPublic: bool) =
+ {
+ BusinessConnectionId = businessConnectionId
+ IsPublic = isPublic
+ }
+ interface IRequestBase with
+ member _.MethodName = "removeBusinessAccountProfilePhoto"
+
+type SetBusinessAccountGiftSettings =
+ {
+ BusinessConnectionId: string
+ ShowGiftButton: bool
+ AcceptedGiftTypes: AcceptedGiftTypes
+ }
+ static member Make(businessConnectionId: string, showGiftButton: bool, acceptedGiftTypes: AcceptedGiftTypes) =
+ {
+ BusinessConnectionId = businessConnectionId
+ ShowGiftButton = showGiftButton
+ AcceptedGiftTypes = acceptedGiftTypes
+ }
+ interface IRequestBase with
+ member _.MethodName = "setBusinessAccountGiftSettings"
+
+type GetBusinessAccountStarBalance =
+ {
+ BusinessConnectionId: string
+ }
+ static member Make(businessConnectionId: string) =
+ {
+ BusinessConnectionId = businessConnectionId
+ }
+ interface IRequestBase with
+ member _.MethodName = "getBusinessAccountStarBalance"
+
+type TransferBusinessAccountStars =
+ {
+ BusinessConnectionId: string
+ StarCount: int64
+ }
+ static member Make(businessConnectionId: string, starCount: int64) =
+ {
+ BusinessConnectionId = businessConnectionId
+ StarCount = starCount
+ }
+ interface IRequestBase with
+ member _.MethodName = "transferBusinessAccountStars"
+
+type GetBusinessAccountGifts =
+ {
+ BusinessConnectionId: string
+ ExcludeUnsaved: bool option
+ ExcludeSaved: bool option
+ ExcludeUnlimited: bool option
+ ExcludeLimited: bool option
+ ExcludeUnique: bool option
+ SortByPrice: bool option
+ Offset: string option
+ Limit: int64 option
+ }
+ static member Make(businessConnectionId: string, ?excludeUnsaved: bool, ?excludeSaved: bool, ?excludeUnlimited: bool, ?excludeLimited: bool, ?excludeUnique: bool, ?sortByPrice: bool, ?offset: string, ?limit: int64) =
+ {
+ BusinessConnectionId = businessConnectionId
+ ExcludeUnsaved = excludeUnsaved
+ ExcludeSaved = excludeSaved
+ ExcludeUnlimited = excludeUnlimited
+ ExcludeLimited = excludeLimited
+ ExcludeUnique = excludeUnique
+ SortByPrice = sortByPrice
+ Offset = offset
+ Limit = limit
+ }
+ interface IRequestBase with
+ member _.MethodName = "getBusinessAccountGifts"
+
+type ConvertGiftToStars =
+ {
+ BusinessConnectionId: string
+ OwnedGiftId: string
+ }
+ static member Make(businessConnectionId: string, ownedGiftId: string) =
+ {
+ BusinessConnectionId = businessConnectionId
+ OwnedGiftId = ownedGiftId
+ }
+ interface IRequestBase with
+ member _.MethodName = "convertGiftToStars"
+
+type UpgradeGift =
+ {
+ BusinessConnectionId: string
+ OwnedGiftId: string
+ KeepOriginalDetails: bool option
+ StarCount: int64 option
+ }
+ static member Make(businessConnectionId: string, ownedGiftId: string, ?keepOriginalDetails: bool, ?starCount: int64) =
+ {
+ BusinessConnectionId = businessConnectionId
+ OwnedGiftId = ownedGiftId
+ KeepOriginalDetails = keepOriginalDetails
+ StarCount = starCount
+ }
+ interface IRequestBase with
+ member _.MethodName = "upgradeGift"
+
+type TransferGift =
+ {
+ BusinessConnectionId: string
+ OwnedGiftId: string
+ NewOwnerChatId: int64
+ StarCount: int64 option
+ }
+ static member Make(businessConnectionId: string, ownedGiftId: string, newOwnerChatId: int64, ?starCount: int64) =
+ {
+ BusinessConnectionId = businessConnectionId
+ OwnedGiftId = ownedGiftId
+ NewOwnerChatId = newOwnerChatId
+ StarCount = starCount
+ }
+ interface IRequestBase with
+ member _.MethodName = "transferGift"
+
+type PostStory =
+ {
+ BusinessConnectionId: string
+ Content: InputStoryContent
+ ActivePeriod: int64
+ Caption: string option
+ ParseMode: ParseMode option
+ CaptionEntities: MessageEntity[] option
+ Areas: StoryArea[] option
+ PostToChatPage: bool option
+ ProtectContent: bool option
+ }
+ static member Make(businessConnectionId: string, content: InputStoryContent, activePeriod: int64, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?areas: StoryArea[], ?postToChatPage: bool, ?protectContent: bool) =
+ {
+ BusinessConnectionId = businessConnectionId
+ Content = content
+ ActivePeriod = activePeriod
+ Caption = caption
+ ParseMode = parseMode
+ CaptionEntities = captionEntities
+ Areas = areas
+ PostToChatPage = postToChatPage
+ ProtectContent = protectContent
+ }
+ interface IRequestBase with
+ member _.MethodName = "postStory"
+
+type EditStory =
+ {
+ BusinessConnectionId: string
+ StoryId: int64
+ Content: InputStoryContent
+ Caption: string option
+ ParseMode: ParseMode option
+ CaptionEntities: MessageEntity[] option
+ Areas: StoryArea[] option
+ }
+ static member Make(businessConnectionId: string, storyId: int64, content: InputStoryContent, ?caption: string, ?parseMode: ParseMode, ?captionEntities: MessageEntity[], ?areas: StoryArea[]) =
+ {
+ BusinessConnectionId = businessConnectionId
+ StoryId = storyId
+ Content = content
+ Caption = caption
+ ParseMode = parseMode
+ CaptionEntities = captionEntities
+ Areas = areas
+ }
+ interface IRequestBase with
+ member _.MethodName = "editStory"
+
+type DeleteStory =
+ {
+ BusinessConnectionId: string
+ StoryId: int64
+ }
+ static member Make(businessConnectionId: string, storyId: int64) =
+ {
+ BusinessConnectionId = businessConnectionId
+ StoryId = storyId
+ }
+ interface IRequestBase with
+ member _.MethodName = "deleteStory"
+
type SendSticker =
{
BusinessConnectionId: string option
@@ -2354,90 +2732,6 @@ type DeleteStickerSet =
interface IRequestBase with
member _.MethodName = "deleteStickerSet"
-type GetAvailableGifts() =
- static member Make() = GetAvailableGifts()
- interface IRequestBase with
- member _.MethodName = "getAvailableGifts"
-
-type SendGift =
- {
- UserId: int64 option
- ChatId: ChatId option
- GiftId: string
- PayForUpgrade: bool option
- Text: string option
- TextParseMode: string option
- TextEntities: MessageEntity[] option
- }
- static member Make(giftId: string, ?userId: int64, ?chatId: ChatId, ?payForUpgrade: bool, ?text: string, ?textParseMode: string, ?textEntities: MessageEntity[]) =
- {
- UserId = userId
- ChatId = chatId
- GiftId = giftId
- PayForUpgrade = payForUpgrade
- Text = text
- TextParseMode = textParseMode
- TextEntities = textEntities
- }
- interface IRequestBase with
- member _.MethodName = "sendGift"
-
-type VerifyUser =
- {
- UserId: int64
- CustomDescription: string option
- }
- static member Make(userId: int64, ?customDescription: string) =
- {
- UserId = userId
- CustomDescription = customDescription
- }
- interface IRequestBase with
- member _.MethodName = "verifyUser"
-
-type VerifyChat =
- {
- ChatId: ChatId
- CustomDescription: string option
- }
- static member Make(chatId: ChatId, ?customDescription: string) =
- {
- ChatId = chatId
- CustomDescription = customDescription
- }
- static member Make(chatId: int64, ?customDescription: string) =
- VerifyChat.Make(ChatId.Int chatId, ?customDescription = customDescription)
- static member Make(chatId: string, ?customDescription: string) =
- VerifyChat.Make(ChatId.String chatId, ?customDescription = customDescription)
- interface IRequestBase with
- member _.MethodName = "verifyChat"
-
-type RemoveUserVerification =
- {
- UserId: int64
- }
- static member Make(userId: int64) =
- {
- UserId = userId
- }
- interface IRequestBase with
- member _.MethodName = "removeUserVerification"
-
-type RemoveChatVerification =
- {
- ChatId: ChatId
- }
- static member Make(chatId: ChatId) =
- {
- ChatId = chatId
- }
- static member Make(chatId: int64) =
- RemoveChatVerification.Make(ChatId.Int chatId)
- static member Make(chatId: string) =
- RemoveChatVerification.Make(ChatId.String chatId)
- interface IRequestBase with
- member _.MethodName = "removeChatVerification"
-
type AnswerInlineQuery =
{
InlineQueryId: string
diff --git a/src/Funogram.Telegram/Types.fs b/src/Funogram.Telegram/Types.fs
index 57cade4..72852ba 100644
--- a/src/Funogram.Telegram/Types.fs
+++ b/src/Funogram.Telegram/Types.fs
@@ -416,9 +416,9 @@ and [] ChatFullInfo =
/// Default chat member permissions, for groups and supergroups
[]
Permissions: ChatPermissions option
- /// True, if gifts can be sent to the chat
- []
- CanSendGift: bool option
+ /// Information about types of gifts that are accepted by the chat or by the corresponding user for private chats
+ []
+ AcceptedGiftTypes: AcceptedGiftTypes
/// True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.
[]
CanSendPaidMedia: bool option
@@ -459,18 +459,18 @@ and [] ChatFullInfo =
[]
Location: ChatLocation option
}
- static member Create(id: int64, ``type``: string, accentColorId: int64, maxReactionCount: int64, ?joinByRequest: bool, ?description: string, ?inviteLink: string, ?pinnedMessage: Message, ?permissions: ChatPermissions, ?canSendGift: bool, ?canSendPaidMedia: bool, ?slowModeDelay: int64, ?messageAutoDeleteTime: int64, ?joinToSendMessages: bool, ?hasAggressiveAntiSpamEnabled: bool, ?hasHiddenMembers: bool, ?hasProtectedContent: bool, ?hasVisibleHistory: bool, ?stickerSetName: string, ?canSetStickerSet: bool, ?customEmojiStickerSetName: string, ?unrestrictBoostCount: int64, ?hasRestrictedVoiceAndVideoMessages: bool, ?bio: string, ?linkedChatId: int64, ?title: string, ?username: string, ?firstName: string, ?lastName: string, ?isForum: bool, ?photo: ChatPhoto, ?activeUsernames: string[], ?birthdate: Birthdate, ?hasPrivateForwards: bool, ?businessIntro: BusinessIntro, ?businessOpeningHours: BusinessOpeningHours, ?personalChat: Chat, ?availableReactions: ReactionType[], ?backgroundCustomEmojiId: string, ?profileAccentColorId: int64, ?profileBackgroundCustomEmojiId: string, ?emojiStatusCustomEmojiId: string, ?emojiStatusExpirationDate: int64, ?businessLocation: BusinessLocation, ?location: ChatLocation) =
+ static member Create(id: int64, ``type``: string, accentColorId: int64, maxReactionCount: int64, acceptedGiftTypes: AcceptedGiftTypes, ?joinByRequest: bool, ?description: string, ?inviteLink: string, ?pinnedMessage: Message, ?permissions: ChatPermissions, ?canSendPaidMedia: bool, ?slowModeDelay: int64, ?messageAutoDeleteTime: int64, ?joinToSendMessages: bool, ?hasAggressiveAntiSpamEnabled: bool, ?hasHiddenMembers: bool, ?hasProtectedContent: bool, ?hasVisibleHistory: bool, ?stickerSetName: string, ?canSetStickerSet: bool, ?customEmojiStickerSetName: string, ?unrestrictBoostCount: int64, ?hasRestrictedVoiceAndVideoMessages: bool, ?bio: string, ?linkedChatId: int64, ?title: string, ?username: string, ?firstName: string, ?lastName: string, ?isForum: bool, ?photo: ChatPhoto, ?activeUsernames: string[], ?birthdate: Birthdate, ?hasPrivateForwards: bool, ?businessIntro: BusinessIntro, ?businessOpeningHours: BusinessOpeningHours, ?personalChat: Chat, ?availableReactions: ReactionType[], ?backgroundCustomEmojiId: string, ?profileAccentColorId: int64, ?profileBackgroundCustomEmojiId: string, ?emojiStatusCustomEmojiId: string, ?emojiStatusExpirationDate: int64, ?businessLocation: BusinessLocation, ?location: ChatLocation) =
{
Id = id
Type = ``type``
AccentColorId = accentColorId
MaxReactionCount = maxReactionCount
+ AcceptedGiftTypes = acceptedGiftTypes
JoinByRequest = joinByRequest
Description = description
InviteLink = inviteLink
PinnedMessage = pinnedMessage
Permissions = permissions
- CanSendGift = canSendGift
CanSendPaidMedia = canSendPaidMedia
SlowModeDelay = slowModeDelay
MessageAutoDeleteTime = messageAutoDeleteTime
@@ -577,6 +577,9 @@ and [] Message =
/// Signature of the post author for messages in channels, or the custom title of an anonymous group administrator
[]
AuthorSignature: string option
+ /// The number of Telegram Stars that were paid by the sender of the message to send it
+ []
+ PaidStarCount: int64 option
/// For text messages, the actual UTF-8 text of the message
[]
Text: string option
@@ -700,6 +703,12 @@ and [] Message =
/// Service message: a chat was shared with the bot
[]
ChatShared: ChatShared option
+ /// Service message: a regular gift was sent or received
+ []
+ Gift: GiftInfo option
+ /// Service message: a unique gift was sent or received
+ []
+ UniqueGift: UniqueGiftInfo option
/// The domain name of the website on which the user has logged in. More about Telegram Login »
[]
ConnectedWebsite: string option
@@ -748,6 +757,9 @@ and [] Message =
/// Service message: a giveaway without public winners was completed
[]
GiveawayCompleted: GiveawayCompleted option
+ /// Service message: the price for paid messages has changed in the chat
+ []
+ PaidMessagePriceChanged: PaidMessagePriceChanged option
/// Service message: video chat scheduled
[]
VideoChatScheduled: VideoChatScheduled option
@@ -767,11 +779,13 @@ and [] Message =
[]
ReplyMarkup: InlineKeyboardMarkup option
}
- static member Create(messageId: int64, date: DateTime, chat: Chat, ?usersShared: UsersShared, ?refundedPayment: RefundedPayment, ?successfulPayment: SuccessfulPayment, ?invoice: Invoice, ?pinnedMessage: MaybeInaccessibleMessage, ?migrateFromChatId: int64, ?migrateToChatId: int64, ?messageAutoDeleteTimerChanged: MessageAutoDeleteTimerChanged, ?supergroupChatCreated: bool, ?chatShared: ChatShared, ?groupChatCreated: bool, ?deleteChatPhoto: bool, ?newChatPhoto: PhotoSize[], ?newChatTitle: string, ?leftChatMember: User, ?newChatMembers: User[], ?location: Location, ?channelChatCreated: bool, ?connectedWebsite: string, ?writeAccessAllowed: WriteAccessAllowed, ?passportData: PassportData, ?videoChatParticipantsInvited: VideoChatParticipantsInvited, ?videoChatEnded: VideoChatEnded, ?videoChatStarted: VideoChatStarted, ?videoChatScheduled: VideoChatScheduled, ?giveawayCompleted: GiveawayCompleted, ?giveawayWinners: GiveawayWinners, ?giveaway: Giveaway, ?giveawayCreated: GiveawayCreated, ?generalForumTopicUnhidden: GeneralForumTopicUnhidden, ?generalForumTopicHidden: GeneralForumTopicHidden, ?forumTopicReopened: ForumTopicReopened, ?forumTopicClosed: ForumTopicClosed, ?forumTopicEdited: ForumTopicEdited, ?forumTopicCreated: ForumTopicCreated, ?chatBackgroundSet: ChatBackground, ?boostAdded: ChatBoostAdded, ?proximityAlertTriggered: ProximityAlertTriggered, ?venue: Venue, ?poll: Poll, ?game: Game, ?dice: Dice, ?isFromOffline: bool, ?hasProtectedContent: bool, ?editDate: int64, ?viaBot: User, ?replyToStory: Story, ?quote: TextQuote, ?externalReply: ExternalReplyInfo, ?replyToMessage: Message, ?isAutomaticForward: bool, ?isTopicMessage: bool, ?forwardOrigin: MessageOrigin, ?businessConnectionId: string, ?senderBusinessBot: User, ?senderBoostCount: int64, ?senderChat: Chat, ?from: User, ?messageThreadId: int64, ?mediaGroupId: string, ?webAppData: WebAppData, ?authorSignature: string, ?entities: MessageEntity[], ?contact: Contact, ?hasMediaSpoiler: bool, ?showCaptionAboveMedia: bool, ?captionEntities: MessageEntity[], ?caption: string, ?voice: Voice, ?videoNote: VideoNote, ?video: Video, ?story: Story, ?sticker: Sticker, ?photo: PhotoSize[], ?paidMedia: PaidMediaInfo, ?document: Document, ?audio: Audio, ?animation: Animation, ?effectId: string, ?linkPreviewOptions: LinkPreviewOptions, ?text: string, ?replyMarkup: InlineKeyboardMarkup) =
+ 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) =
{
MessageId = messageId
Date = date
Chat = chat
+ Gift = gift
+ ChatShared = chatShared
UsersShared = usersShared
RefundedPayment = refundedPayment
SuccessfulPayment = successfulPayment
@@ -780,16 +794,15 @@ and [] Message =
MigrateFromChatId = migrateFromChatId
MigrateToChatId = migrateToChatId
MessageAutoDeleteTimerChanged = messageAutoDeleteTimerChanged
+ ChannelChatCreated = channelChatCreated
SupergroupChatCreated = supergroupChatCreated
- ChatShared = chatShared
GroupChatCreated = groupChatCreated
DeleteChatPhoto = deleteChatPhoto
NewChatPhoto = newChatPhoto
NewChatTitle = newChatTitle
LeftChatMember = leftChatMember
NewChatMembers = newChatMembers
- Location = location
- ChannelChatCreated = channelChatCreated
+ UniqueGift = uniqueGift
ConnectedWebsite = connectedWebsite
WriteAccessAllowed = writeAccessAllowed
PassportData = passportData
@@ -797,11 +810,12 @@ and [] Message =
VideoChatEnded = videoChatEnded
VideoChatStarted = videoChatStarted
VideoChatScheduled = videoChatScheduled
+ PaidMessagePriceChanged = paidMessagePriceChanged
GiveawayCompleted = giveawayCompleted
GiveawayWinners = giveawayWinners
Giveaway = giveaway
+ Location = location
GiveawayCreated = giveawayCreated
- GeneralForumTopicUnhidden = generalForumTopicUnhidden
GeneralForumTopicHidden = generalForumTopicHidden
ForumTopicReopened = forumTopicReopened
ForumTopicClosed = forumTopicClosed
@@ -810,10 +824,11 @@ and [] Message =
ChatBackgroundSet = chatBackgroundSet
BoostAdded = boostAdded
ProximityAlertTriggered = proximityAlertTriggered
+ GeneralForumTopicUnhidden = generalForumTopicUnhidden
Venue = venue
Poll = poll
Game = game
- Dice = dice
+ MediaGroupId = mediaGroupId
IsFromOffline = isFromOffline
HasProtectedContent = hasProtectedContent
EditDate = editDate
@@ -821,8 +836,8 @@ and [] Message =
ReplyToStory = replyToStory
Quote = quote
ExternalReply = externalReply
+ AuthorSignature = authorSignature
ReplyToMessage = replyToMessage
- IsAutomaticForward = isAutomaticForward
IsTopicMessage = isTopicMessage
ForwardOrigin = forwardOrigin
BusinessConnectionId = businessConnectionId
@@ -831,10 +846,11 @@ and [] Message =
SenderChat = senderChat
From = from
MessageThreadId = messageThreadId
- MediaGroupId = mediaGroupId
+ IsAutomaticForward = isAutomaticForward
WebAppData = webAppData
- AuthorSignature = authorSignature
+ PaidStarCount = paidStarCount
Entities = entities
+ Dice = dice
Contact = contact
HasMediaSpoiler = hasMediaSpoiler
ShowCaptionAboveMedia = showCaptionAboveMedia
@@ -842,8 +858,8 @@ and [] Message =
Caption = caption
Voice = voice
VideoNote = videoNote
+ Text = text
Video = video
- Story = story
Sticker = sticker
Photo = photo
PaidMedia = paidMedia
@@ -852,7 +868,7 @@ and [] Message =
Animation = animation
EffectId = effectId
LinkPreviewOptions = linkPreviewOptions
- Text = text
+ Story = story
ReplyMarkup = replyMarkup
}
@@ -2219,6 +2235,18 @@ and [] VideoChatParticipantsInvited =
Users = users
}
+/// Describes a service message about a change in the price of paid messages within a chat.
+and [] PaidMessagePriceChanged =
+ {
+ /// The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message
+ []
+ PaidMessageStarCount: int64
+ }
+ static member Create(paidMessageStarCount: int64) =
+ {
+ PaidMessageStarCount = paidMessageStarCount
+ }
+
/// This object represents a service message about the creation of a scheduled giveaway.
and [] GiveawayCreated =
{
@@ -3446,6 +3474,190 @@ and [] BusinessOpeningHours =
OpeningHours = openingHours
}
+/// Describes the position of a clickable area within a story.
+and [] StoryAreaPosition =
+ {
+ /// The abscissa of the area's center, as a percentage of the media width
+ []
+ XPercentage: float
+ /// The ordinate of the area's center, as a percentage of the media height
+ []
+ YPercentage: float
+ /// The width of the area's rectangle, as a percentage of the media width
+ []
+ WidthPercentage: float
+ /// The height of the area's rectangle, as a percentage of the media height
+ []
+ HeightPercentage: float
+ /// The clockwise rotation angle of the rectangle, in degrees; 0-360
+ []
+ RotationAngle: float
+ /// The radius of the rectangle corner rounding, as a percentage of the media width
+ []
+ CornerRadiusPercentage: float
+ }
+ static member Create(xPercentage: float, yPercentage: float, widthPercentage: float, heightPercentage: float, rotationAngle: float, cornerRadiusPercentage: float) =
+ {
+ XPercentage = xPercentage
+ YPercentage = yPercentage
+ WidthPercentage = widthPercentage
+ HeightPercentage = heightPercentage
+ RotationAngle = rotationAngle
+ CornerRadiusPercentage = cornerRadiusPercentage
+ }
+
+/// Describes the physical address of a location.
+and [] LocationAddress =
+ {
+ /// The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located
+ []
+ CountryCode: string
+ /// State of the location
+ []
+ State: string option
+ /// City of the location
+ []
+ City: string option
+ /// Street address of the location
+ []
+ Street: string option
+ }
+ static member Create(countryCode: string, ?state: string, ?city: string, ?street: string) =
+ {
+ CountryCode = countryCode
+ State = state
+ City = city
+ Street = street
+ }
+
+/// Describes the type of a clickable area on a story. Currently, it can be one of
+and StoryAreaType =
+ | Location of StoryAreaTypeLocation
+ | SuggestedReaction of StoryAreaTypeSuggestedReaction
+ | Link of StoryAreaTypeLink
+ | Weather of StoryAreaTypeWeather
+ | UniqueGift of StoryAreaTypeUniqueGift
+
+/// Describes a story area pointing to a location. Currently, a story can have up to 10 location areas.
+and [] StoryAreaTypeLocation =
+ {
+ /// Type of the area, always “location”
+ []
+ Type: string
+ /// Location latitude in degrees
+ []
+ Latitude: float
+ /// Location longitude in degrees
+ []
+ Longitude: float
+ /// Address of the location
+ []
+ Address: LocationAddress option
+ }
+ static member Create(``type``: string, latitude: float, longitude: float, ?address: LocationAddress) =
+ {
+ Type = ``type``
+ Latitude = latitude
+ Longitude = longitude
+ Address = address
+ }
+
+/// Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas.
+and [] StoryAreaTypeSuggestedReaction =
+ {
+ /// Type of the area, always “suggested_reaction”
+ []
+ Type: string
+ /// Type of the reaction
+ []
+ ReactionType: ReactionType
+ /// Pass True if the reaction area has a dark background
+ []
+ IsDark: bool option
+ /// Pass True if reaction area corner is flipped
+ []
+ IsFlipped: bool option
+ }
+ static member Create(``type``: string, reactionType: ReactionType, ?isDark: bool, ?isFlipped: bool) =
+ {
+ Type = ``type``
+ ReactionType = reactionType
+ IsDark = isDark
+ IsFlipped = isFlipped
+ }
+
+/// Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas.
+and [] StoryAreaTypeLink =
+ {
+ /// Type of the area, always “link”
+ []
+ Type: string
+ /// HTTP or tg:// URL to be opened when the area is clicked
+ []
+ Url: string
+ }
+ static member Create(``type``: string, url: string) =
+ {
+ Type = ``type``
+ Url = url
+ }
+
+/// Describes a story area containing weather information. Currently, a story can have up to 3 weather areas.
+and [] StoryAreaTypeWeather =
+ {
+ /// Type of the area, always “weather”
+ []
+ Type: string
+ /// Temperature, in degree Celsius
+ []
+ Temperature: float
+ /// Emoji representing the weather
+ []
+ Emoji: string
+ /// A color of the area background in the ARGB format
+ []
+ BackgroundColor: int64
+ }
+ static member Create(``type``: string, temperature: float, emoji: string, backgroundColor: int64) =
+ {
+ Type = ``type``
+ Temperature = temperature
+ Emoji = emoji
+ BackgroundColor = backgroundColor
+ }
+
+/// Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area.
+and [] StoryAreaTypeUniqueGift =
+ {
+ /// Type of the area, always “unique_gift”
+ []
+ Type: string
+ /// Unique name of the gift
+ []
+ Name: string
+ }
+ static member Create(``type``: string, name: string) =
+ {
+ Type = ``type``
+ Name = name
+ }
+
+/// Describes a clickable area on a story media.
+and [] StoryArea =
+ {
+ /// Position of the area
+ []
+ Position: StoryAreaPosition
+ /// Type of the area
+ []
+ Type: StoryAreaType
+ }
+ static member Create(position: StoryAreaPosition, ``type``: StoryAreaType) =
+ {
+ Position = position
+ Type = ``type``
+ }
+
/// Represents a location to which a chat is connected.
and [] ChatLocation =
{
@@ -3612,6 +3824,395 @@ and [] ForumTopic =
IconCustomEmojiId = iconCustomEmojiId
}
+/// This object represents a gift that can be sent by the bot.
+and [] Gift =
+ {
+ /// Unique identifier of the gift
+ []
+ Id: string
+ /// The sticker that represents the gift
+ []
+ Sticker: Sticker
+ /// The number of Telegram Stars that must be paid to send the sticker
+ []
+ StarCount: int64
+ /// The number of Telegram Stars that must be paid to upgrade the gift to a unique one
+ []
+ UpgradeStarCount: int64 option
+ /// The total number of the gifts of this type that can be sent; for limited gifts only
+ []
+ TotalCount: int64 option
+ /// The number of remaining gifts of this type that can be sent; for limited gifts only
+ []
+ RemainingCount: int64 option
+ }
+ static member Create(id: string, sticker: Sticker, starCount: int64, ?upgradeStarCount: int64, ?totalCount: int64, ?remainingCount: int64) =
+ {
+ Id = id
+ Sticker = sticker
+ StarCount = starCount
+ UpgradeStarCount = upgradeStarCount
+ TotalCount = totalCount
+ RemainingCount = remainingCount
+ }
+
+/// This object represent a list of gifts.
+and [] Gifts =
+ {
+ /// The list of gifts
+ []
+ Gifts: Gift[]
+ }
+ static member Create(gifts: Gift[]) =
+ {
+ Gifts = gifts
+ }
+
+/// This object describes the model of a unique gift.
+and [] UniqueGiftModel =
+ {
+ /// Name of the model
+ []
+ Name: string
+ /// The sticker that represents the unique gift
+ []
+ Sticker: Sticker
+ /// The number of unique gifts that receive this model for every 1000 gifts upgraded
+ []
+ RarityPerMille: int64
+ }
+ static member Create(name: string, sticker: Sticker, rarityPerMille: int64) =
+ {
+ Name = name
+ Sticker = sticker
+ RarityPerMille = rarityPerMille
+ }
+
+/// This object describes the symbol shown on the pattern of a unique gift.
+and [] UniqueGiftSymbol =
+ {
+ /// Name of the symbol
+ []
+ Name: string
+ /// The sticker that represents the unique gift
+ []
+ Sticker: Sticker
+ /// The number of unique gifts that receive this model for every 1000 gifts upgraded
+ []
+ RarityPerMille: int64
+ }
+ static member Create(name: string, sticker: Sticker, rarityPerMille: int64) =
+ {
+ Name = name
+ Sticker = sticker
+ RarityPerMille = rarityPerMille
+ }
+
+/// This object describes the colors of the backdrop of a unique gift.
+and [] UniqueGiftBackdropColors =
+ {
+ /// The color in the center of the backdrop in RGB format
+ []
+ CenterColor: int64
+ /// The color on the edges of the backdrop in RGB format
+ []
+ EdgeColor: int64
+ /// The color to be applied to the symbol in RGB format
+ []
+ SymbolColor: int64
+ /// The color for the text on the backdrop in RGB format
+ []
+ TextColor: int64
+ }
+ static member Create(centerColor: int64, edgeColor: int64, symbolColor: int64, textColor: int64) =
+ {
+ CenterColor = centerColor
+ EdgeColor = edgeColor
+ SymbolColor = symbolColor
+ TextColor = textColor
+ }
+
+/// This object describes the backdrop of a unique gift.
+and [] UniqueGiftBackdrop =
+ {
+ /// Name of the backdrop
+ []
+ Name: string
+ /// Colors of the backdrop
+ []
+ Colors: UniqueGiftBackdropColors
+ /// The number of unique gifts that receive this backdrop for every 1000 gifts upgraded
+ []
+ RarityPerMille: int64
+ }
+ static member Create(name: string, colors: UniqueGiftBackdropColors, rarityPerMille: int64) =
+ {
+ Name = name
+ Colors = colors
+ RarityPerMille = rarityPerMille
+ }
+
+/// This object describes a unique gift that was upgraded from a regular gift.
+and [] UniqueGift =
+ {
+ /// Human-readable name of the regular gift from which this unique gift was upgraded
+ []
+ BaseName: string
+ /// Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas
+ []
+ Name: string
+ /// Unique number of the upgraded gift among gifts upgraded from the same regular gift
+ []
+ Number: int64
+ /// Model of the gift
+ []
+ Model: UniqueGiftModel
+ /// Symbol of the gift
+ []
+ Symbol: UniqueGiftSymbol
+ /// Backdrop of the gift
+ []
+ Backdrop: UniqueGiftBackdrop
+ }
+ static member Create(baseName: string, name: string, number: int64, model: UniqueGiftModel, symbol: UniqueGiftSymbol, backdrop: UniqueGiftBackdrop) =
+ {
+ BaseName = baseName
+ Name = name
+ Number = number
+ Model = model
+ Symbol = symbol
+ Backdrop = backdrop
+ }
+
+/// Describes a service message about a regular gift that was sent or received.
+and [] GiftInfo =
+ {
+ /// Information about the gift
+ []
+ Gift: Gift
+ /// 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 can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible
+ []
+ ConvertStarCount: int64 option
+ /// Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift
+ []
+ PrepaidUpgradeStarCount: int64 option
+ /// True, if the gift can be upgraded to a unique gift
+ []
+ CanBeUpgraded: bool option
+ /// Text of the message that was added to the gift
+ []
+ Text: string option
+ /// Special entities that appear in the text
+ []
+ Entities: MessageEntity[] option
+ /// True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them
+ []
+ IsPrivate: bool option
+ }
+ static member Create(gift: Gift, ?ownedGiftId: string, ?convertStarCount: int64, ?prepaidUpgradeStarCount: int64, ?canBeUpgraded: bool, ?text: string, ?entities: MessageEntity[], ?isPrivate: bool) =
+ {
+ Gift = gift
+ OwnedGiftId = ownedGiftId
+ ConvertStarCount = convertStarCount
+ PrepaidUpgradeStarCount = prepaidUpgradeStarCount
+ CanBeUpgraded = canBeUpgraded
+ Text = text
+ Entities = entities
+ IsPrivate = isPrivate
+ }
+
+/// Describes a service message about a unique gift that was sent or received.
+and [] UniqueGiftInfo =
+ {
+ /// Information about the gift
+ []
+ Gift: UniqueGift
+ /// Origin of the gift. Currently, either “upgrade” or “transfer”
+ []
+ Origin: string
+ /// 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
+ }
+ static member Create(gift: UniqueGift, origin: string, ?ownedGiftId: string, ?transferStarCount: int64) =
+ {
+ Gift = gift
+ Origin = origin
+ OwnedGiftId = ownedGiftId
+ TransferStarCount = transferStarCount
+ }
+
+/// This object describes a gift received and owned by a user or a chat. Currently, it can be one of
+and OwnedGift =
+ | Regular of OwnedGiftRegular
+ | Unique of OwnedGiftUnique
+
+/// Describes a regular gift owned by a user or a chat.
+and [] OwnedGiftRegular =
+ {
+ /// Type of the gift, always “regular”
+ []
+ Type: string
+ /// Information about the regular gift
+ []
+ Gift: Gift
+ /// Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only
+ []
+ OwnedGiftId: string option
+ /// Sender of the gift if it is a known user
+ []
+ SenderUser: User option
+ /// Date the gift was sent in Unix time
+ []
+ SendDate: int64
+ /// Text of the message that was added to the gift
+ []
+ Text: string option
+ /// Special entities that appear in the text
+ []
+ Entities: MessageEntity[] option
+ /// True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them
+ []
+ IsPrivate: bool option
+ /// True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only
+ []
+ IsSaved: bool option
+ /// True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only
+ []
+ CanBeUpgraded: bool option
+ /// True, if the gift was refunded and isn't available anymore
+ []
+ WasRefunded: bool option
+ /// Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars
+ []
+ ConvertStarCount: int64 option
+ /// Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift
+ []
+ PrepaidUpgradeStarCount: int64 option
+ }
+ static member Create(``type``: string, gift: Gift, sendDate: int64, ?ownedGiftId: string, ?senderUser: User, ?text: string, ?entities: MessageEntity[], ?isPrivate: bool, ?isSaved: bool, ?canBeUpgraded: bool, ?wasRefunded: bool, ?convertStarCount: int64, ?prepaidUpgradeStarCount: int64) =
+ {
+ Type = ``type``
+ Gift = gift
+ SendDate = sendDate
+ OwnedGiftId = ownedGiftId
+ SenderUser = senderUser
+ Text = text
+ Entities = entities
+ IsPrivate = isPrivate
+ IsSaved = isSaved
+ CanBeUpgraded = canBeUpgraded
+ WasRefunded = wasRefunded
+ ConvertStarCount = convertStarCount
+ PrepaidUpgradeStarCount = prepaidUpgradeStarCount
+ }
+
+/// Describes a unique gift received and owned by a user or a chat.
+and [] OwnedGiftUnique =
+ {
+ /// Type of the gift, always “unique”
+ []
+ Type: string
+ /// Information about the unique gift
+ []
+ Gift: UniqueGift
+ /// Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only
+ []
+ OwnedGiftId: string option
+ /// Sender of the gift if it is a known user
+ []
+ SenderUser: User option
+ /// Date the gift was sent in Unix time
+ []
+ SendDate: int64
+ /// True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only
+ []
+ IsSaved: bool option
+ /// True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only
+ []
+ CanBeTransferred: bool option
+ /// Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift
+ []
+ TransferStarCount: int64 option
+ }
+ static member Create(``type``: string, gift: UniqueGift, sendDate: int64, ?ownedGiftId: string, ?senderUser: User, ?isSaved: bool, ?canBeTransferred: bool, ?transferStarCount: int64) =
+ {
+ Type = ``type``
+ Gift = gift
+ SendDate = sendDate
+ OwnedGiftId = ownedGiftId
+ SenderUser = senderUser
+ IsSaved = isSaved
+ CanBeTransferred = canBeTransferred
+ TransferStarCount = transferStarCount
+ }
+
+/// Contains the list of gifts received and owned by a user or a chat.
+and [] OwnedGifts =
+ {
+ /// The total number of gifts owned by the user or the chat
+ []
+ TotalCount: int64
+ /// The list of gifts
+ []
+ Gifts: OwnedGift[]
+ /// Offset for the next request. If empty, then there are no more results
+ []
+ NextOffset: string option
+ }
+ static member Create(totalCount: int64, gifts: OwnedGift[], ?nextOffset: string) =
+ {
+ TotalCount = totalCount
+ Gifts = gifts
+ NextOffset = nextOffset
+ }
+
+/// This object describes the types of gifts that can be gifted to a user or a chat.
+and [] AcceptedGiftTypes =
+ {
+ /// True, if unlimited regular gifts are accepted
+ []
+ UnlimitedGifts: bool
+ /// True, if limited regular gifts are accepted
+ []
+ LimitedGifts: bool
+ /// True, if unique gifts or gifts that can be upgraded to unique for free are accepted
+ []
+ UniqueGifts: bool
+ /// True, if a Telegram Premium subscription is accepted
+ []
+ PremiumSubscription: bool
+ }
+ static member Create(unlimitedGifts: bool, limitedGifts: bool, uniqueGifts: bool, premiumSubscription: bool) =
+ {
+ UnlimitedGifts = unlimitedGifts
+ LimitedGifts = limitedGifts
+ UniqueGifts = uniqueGifts
+ PremiumSubscription = premiumSubscription
+ }
+
+/// Describes an amount of Telegram Stars.
+and [] StarAmount =
+ {
+ /// Integer amount of Telegram Stars, rounded to 0; can be negative
+ []
+ Amount: int64
+ /// The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive
+ []
+ NanostarAmount: int64 option
+ }
+ static member Create(amount: int64, ?nanostarAmount: int64) =
+ {
+ Amount = amount
+ NanostarAmount = nanostarAmount
+ }
+
/// This object represents a bot command.
and [] BotCommand =
{
@@ -3967,6 +4568,70 @@ and [] UserChatBoosts =
Boosts = boosts
}
+/// Represents the rights of a business bot.
+and [] BusinessBotRights =
+ {
+ /// True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours
+ []
+ CanReply: bool option
+ /// True, if the bot can mark incoming private messages as read
+ []
+ CanReadMessages: bool option
+ /// True, if the bot can delete messages sent by the bot
+ []
+ CanDeleteOutgoingMessages: bool option
+ /// True, if the bot can delete all private messages in managed chats
+ []
+ CanDeleteAllMessages: bool option
+ /// True, if the bot can edit the first and last name of the business account
+ []
+ CanEditName: bool option
+ /// True, if the bot can edit the bio of the business account
+ []
+ CanEditBio: bool option
+ /// True, if the bot can edit the profile photo of the business account
+ []
+ CanEditProfilePhoto: bool option
+ /// True, if the bot can edit the username of the business account
+ []
+ CanEditUsername: bool option
+ /// True, if the bot can change the privacy settings pertaining to gifts for the business account
+ []
+ CanChangeGiftSettings: bool option
+ /// True, if the bot can view gifts and the amount of Telegram Stars owned by the business account
+ []
+ CanViewGiftsAndStars: bool option
+ /// True, if the bot can convert regular gifts owned by the business account to Telegram Stars
+ []
+ CanConvertGiftsToStars: bool option
+ /// True, if the bot can transfer and upgrade gifts owned by the business account
+ []
+ CanTransferAndUpgradeGifts: bool option
+ /// True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts
+ []
+ CanTransferStars: bool option
+ /// True, if the bot can post, edit and delete stories on behalf of the business account
+ []
+ 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) =
+ {
+ CanReply = canReply
+ CanReadMessages = canReadMessages
+ CanDeleteOutgoingMessages = canDeleteOutgoingMessages
+ CanDeleteAllMessages = canDeleteAllMessages
+ CanEditName = canEditName
+ CanEditBio = canEditBio
+ CanEditProfilePhoto = canEditProfilePhoto
+ CanEditUsername = canEditUsername
+ CanChangeGiftSettings = canChangeGiftSettings
+ CanViewGiftsAndStars = canViewGiftsAndStars
+ CanConvertGiftsToStars = canConvertGiftsToStars
+ CanTransferAndUpgradeGifts = canTransferAndUpgradeGifts
+ CanTransferStars = canTransferStars
+ CanManageStories = canManageStories
+ }
+
/// Describes the connection of the bot with a business account.
and [] BusinessConnection =
{
@@ -3982,21 +4647,21 @@ and [] BusinessConnection =
/// Date the connection was established in Unix time
[]
Date: DateTime
- /// True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours
- []
- CanReply: bool
+ /// Rights of the business bot
+ []
+ Rights: BusinessBotRights option
/// True, if the connection is active
[]
IsEnabled: bool
}
- static member Create(id: string, user: User, userChatId: int64, date: DateTime, canReply: bool, isEnabled: bool) =
+ static member Create(id: string, user: User, userChatId: int64, date: DateTime, isEnabled: bool, ?rights: BusinessBotRights) =
{
Id = id
User = user
UserChatId = userChatId
Date = date
- CanReply = canReply
IsEnabled = isEnabled
+ Rights = rights
}
/// This object is received when messages are deleted from a connected business account.
@@ -4340,6 +5005,96 @@ and [] InputPaidMediaVideo =
SupportsStreaming = supportsStreaming
}
+/// This object describes a profile photo to set. Currently, it can be one of
+and InputProfilePhoto =
+ | Static of InputProfilePhotoStatic
+ | Animated of InputProfilePhotoAnimated
+
+/// A static profile photo in the .JPG format.
+and [] InputProfilePhotoStatic =
+ {
+ /// Type of the profile photo, must be static
+ []
+ Type: string
+ /// The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass “attach://” if the photo was uploaded using multipart/form-data under . More information on Sending Files »
+ []
+ Photo: string
+ }
+ static member Create(``type``: string, photo: string) =
+ {
+ Type = ``type``
+ Photo = photo
+ }
+
+/// An animated profile photo in the MPEG4 format.
+and [] InputProfilePhotoAnimated =
+ {
+ /// Type of the profile photo, must be animated
+ []
+ Type: string
+ /// The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass “attach://” if the photo was uploaded using multipart/form-data under . More information on Sending Files »
+ []
+ Animation: string
+ /// Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.
+ []
+ MainFrameTimestamp: float option
+ }
+ static member Create(``type``: string, animation: string, ?mainFrameTimestamp: float) =
+ {
+ Type = ``type``
+ Animation = animation
+ MainFrameTimestamp = mainFrameTimestamp
+ }
+
+/// This object describes the content of a story to post. Currently, it can be one of
+and InputStoryContent =
+ | Photo of InputStoryContentPhoto
+ | Video of InputStoryContentVideo
+
+/// Describes a photo to post as a story.
+and [] InputStoryContentPhoto =
+ {
+ /// Type of the content, must be photo
+ []
+ Type: string
+ /// The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass “attach://” if the photo was uploaded using multipart/form-data under . More information on Sending Files »
+ []
+ Photo: string
+ }
+ static member Create(``type``: string, photo: string) =
+ {
+ Type = ``type``
+ Photo = photo
+ }
+
+/// Describes a video to post as a story.
+and [] InputStoryContentVideo =
+ {
+ /// Type of the content, must be video
+ []
+ Type: string
+ /// The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass “attach://” if the video was uploaded using multipart/form-data under . More information on Sending Files »
+ []
+ Video: string
+ /// Precise duration of the video in seconds; 0-60
+ []
+ Duration: float option
+ /// Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0.
+ []
+ CoverFrameTimestamp: float option
+ /// Pass True if the video has no sound
+ []
+ IsAnimation: bool option
+ }
+ static member Create(``type``: string, video: string, ?duration: float, ?coverFrameTimestamp: float, ?isAnimation: bool) =
+ {
+ Type = ``type``
+ Video = video
+ Duration = duration
+ CoverFrameTimestamp = coverFrameTimestamp
+ IsAnimation = isAnimation
+ }
+
/// This object represents a sticker.
and [] Sticker =
{
@@ -4463,9 +5218,9 @@ and [] MaskPosition =
/// This object describes a sticker to be added to a sticker set.
and [] InputSticker =
{
- /// The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass “attach://” to upload a new one using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »
+ /// The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass “attach://” to upload a new file using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. More information on Sending Files »
[]
- Sticker: InputFile
+ Sticker: string
/// Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a .WEBM video
[]
Format: string
@@ -4479,7 +5234,7 @@ and [] InputSticker =
[]
Keywords: string[] option
}
- static member Create(sticker: InputFile, format: string, emojiList: string[], ?maskPosition: MaskPosition, ?keywords: string[]) =
+ static member Create(sticker: string, format: string, emojiList: string[], ?maskPosition: MaskPosition, ?keywords: string[]) =
{
Sticker = sticker
Format = format
@@ -4488,50 +5243,6 @@ and [] InputSticker =
Keywords = keywords
}
-/// This object represents a gift that can be sent by the bot.
-and [] Gift =
- {
- /// Unique identifier of the gift
- []
- Id: string
- /// The sticker that represents the gift
- []
- Sticker: Sticker
- /// The number of Telegram Stars that must be paid to send the sticker
- []
- StarCount: int64
- /// The number of Telegram Stars that must be paid to upgrade the gift to a unique one
- []
- UpgradeStarCount: int64 option
- /// The total number of the gifts of this type that can be sent; for limited gifts only
- []
- TotalCount: int64 option
- /// The number of remaining gifts of this type that can be sent; for limited gifts only
- [