Skip to content

Commit 0aab36f

Browse files
authored
Update Bot API to 9.1 (#88)
1 parent 536b2b6 commit 0aab36f

File tree

7 files changed

+784
-51
lines changed

7 files changed

+784
-51
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![.NET Core](https://github.com/Dolfik1/Funogram/workflows/.NET/badge.svg)
22
[![NuGet](https://img.shields.io/nuget/v/Funogram.svg)](https://www.nuget.org/packages/Funogram/)
33
[![NuGet](https://img.shields.io/nuget/v/Funogram.Telegram.svg)](https://www.nuget.org/packages/Funogram.Telegram/)
4-
[![NuGet](https://img.shields.io/badge/Bot%20API-9.0-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/)
4+
[![NuGet](https://img.shields.io/badge/Bot%20API-9.1-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/)
55

66
<img src="https://github.com/Dolfik1/Funogram/raw/master/docs/files/img/logo.png" alt="Funogram Logo" width="200" align="right" />
77

src/Funogram.Generator/Helpers.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ let typeMap =
2525
"Float number", "float"
2626
"InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply", "Markup"
2727
"array of Messages", "Message[]"
28+
"array of Message", "Message[]"
2829
"array of MessageId", "MessageId[]"
2930
"InputMediaAudio, InputMediaDocument, InputMediaPhoto and InputMediaVideo", "InputMedia"
3031
"Message or True", "EditMessageResult"

src/Funogram.Generator/out/methods.json

Lines changed: 136 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,7 @@
16821682
{
16831683
"OriginalName": "sendMediaGroup",
16841684
"ConvertedName": "SendMediaGroup",
1685-
"Description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.",
1685+
"Description": "Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Message objects that were sent is returned.",
16861686
"Fields": [
16871687
{
16881688
"OriginalName": "business_connection_id",
@@ -1757,7 +1757,7 @@
17571757
"Optional": true
17581758
}
17591759
],
1760-
"OriginalReturnType": "array of Messages",
1760+
"OriginalReturnType": "array of Message",
17611761
"ConvertedReturnType": "Message[]"
17621762
},
17631763
{
@@ -2203,7 +2203,7 @@
22032203
{
22042204
"OriginalName": "options",
22052205
"ConvertedName": "Options",
2206-
"Description": "A JSON-serialized list of 2-10 answer options",
2206+
"Description": "A JSON-serialized list of 2-12 answer options",
22072207
"OriginalFieldType": "Array of InputPollOption",
22082208
"ConvertedFieldType": "InputPollOption[]",
22092209
"Optional": false
@@ -2340,6 +2340,79 @@
23402340
"OriginalReturnType": "Message",
23412341
"ConvertedReturnType": "Message"
23422342
},
2343+
{
2344+
"OriginalName": "sendChecklist",
2345+
"ConvertedName": "SendChecklist",
2346+
"Description": "Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.",
2347+
"Fields": [
2348+
{
2349+
"OriginalName": "business_connection_id",
2350+
"ConvertedName": "BusinessConnectionId",
2351+
"Description": "Unique identifier of the business connection on behalf of which the message will be sent",
2352+
"OriginalFieldType": "String",
2353+
"ConvertedFieldType": "string",
2354+
"Optional": false
2355+
},
2356+
{
2357+
"OriginalName": "chat_id",
2358+
"ConvertedName": "ChatId",
2359+
"Description": "Unique identifier for the target chat",
2360+
"OriginalFieldType": "Integer",
2361+
"ConvertedFieldType": "int64",
2362+
"Optional": false
2363+
},
2364+
{
2365+
"OriginalName": "checklist",
2366+
"ConvertedName": "Checklist",
2367+
"Description": "A JSON-serialized object for the checklist to send",
2368+
"OriginalFieldType": "InputChecklist",
2369+
"ConvertedFieldType": "InputChecklist",
2370+
"Optional": false
2371+
},
2372+
{
2373+
"OriginalName": "disable_notification",
2374+
"ConvertedName": "DisableNotification",
2375+
"Description": "Sends the message silently. Users will receive a notification with no sound.",
2376+
"OriginalFieldType": "Boolean",
2377+
"ConvertedFieldType": "bool",
2378+
"Optional": true
2379+
},
2380+
{
2381+
"OriginalName": "protect_content",
2382+
"ConvertedName": "ProtectContent",
2383+
"Description": "Protects the contents of the sent message from forwarding and saving",
2384+
"OriginalFieldType": "Boolean",
2385+
"ConvertedFieldType": "bool",
2386+
"Optional": true
2387+
},
2388+
{
2389+
"OriginalName": "message_effect_id",
2390+
"ConvertedName": "MessageEffectId",
2391+
"Description": "Unique identifier of the message effect to be added to the message",
2392+
"OriginalFieldType": "String",
2393+
"ConvertedFieldType": "string",
2394+
"Optional": true
2395+
},
2396+
{
2397+
"OriginalName": "reply_parameters",
2398+
"ConvertedName": "ReplyParameters",
2399+
"Description": "A JSON-serialized object for description of the message to reply to",
2400+
"OriginalFieldType": "ReplyParameters",
2401+
"ConvertedFieldType": "ReplyParameters",
2402+
"Optional": true
2403+
},
2404+
{
2405+
"OriginalName": "reply_markup",
2406+
"ConvertedName": "ReplyMarkup",
2407+
"Description": "A JSON-serialized object for an inline keyboard",
2408+
"OriginalFieldType": "InlineKeyboardMarkup",
2409+
"ConvertedFieldType": "InlineKeyboardMarkup",
2410+
"Optional": true
2411+
}
2412+
],
2413+
"OriginalReturnType": "Message",
2414+
"ConvertedReturnType": "Message"
2415+
},
23432416
{
23442417
"OriginalName": "sendDice",
23452418
"ConvertedName": "SendDice",
@@ -2749,7 +2822,7 @@
27492822
{
27502823
"OriginalName": "can_manage_chat",
27512824
"ConvertedName": "CanManageChat",
2752-
"Description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.",
2825+
"Description": "Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.",
27532826
"OriginalFieldType": "Boolean",
27542827
"ConvertedFieldType": "bool",
27552828
"Optional": true
@@ -2829,7 +2902,7 @@
28292902
{
28302903
"OriginalName": "can_post_messages",
28312904
"ConvertedName": "CanPostMessages",
2832-
"Description": "Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only",
2905+
"Description": "Pass True if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only",
28332906
"OriginalFieldType": "Boolean",
28342907
"ConvertedFieldType": "bool",
28352908
"Optional": true
@@ -4617,6 +4690,55 @@
46174690
"OriginalReturnType": "Message or True",
46184691
"ConvertedReturnType": "EditMessageResult"
46194692
},
4693+
{
4694+
"OriginalName": "editMessageChecklist",
4695+
"ConvertedName": "EditMessageChecklist",
4696+
"Description": "Use this method to edit a checklist on behalf of a connected business account. On success, the edited Message is returned.",
4697+
"Fields": [
4698+
{
4699+
"OriginalName": "business_connection_id",
4700+
"ConvertedName": "BusinessConnectionId",
4701+
"Description": "Unique identifier of the business connection on behalf of which the message will be sent",
4702+
"OriginalFieldType": "String",
4703+
"ConvertedFieldType": "string",
4704+
"Optional": false
4705+
},
4706+
{
4707+
"OriginalName": "chat_id",
4708+
"ConvertedName": "ChatId",
4709+
"Description": "Unique identifier for the target chat",
4710+
"OriginalFieldType": "Integer",
4711+
"ConvertedFieldType": "int64",
4712+
"Optional": false
4713+
},
4714+
{
4715+
"OriginalName": "message_id",
4716+
"ConvertedName": "MessageId",
4717+
"Description": "Unique identifier for the target message",
4718+
"OriginalFieldType": "Integer",
4719+
"ConvertedFieldType": "int64",
4720+
"Optional": false
4721+
},
4722+
{
4723+
"OriginalName": "checklist",
4724+
"ConvertedName": "Checklist",
4725+
"Description": "A JSON-serialized object for the new checklist",
4726+
"OriginalFieldType": "InputChecklist",
4727+
"ConvertedFieldType": "InputChecklist",
4728+
"Optional": false
4729+
},
4730+
{
4731+
"OriginalName": "reply_markup",
4732+
"ConvertedName": "ReplyMarkup",
4733+
"Description": "A JSON-serialized object for the new inline keyboard for the message",
4734+
"OriginalFieldType": "InlineKeyboardMarkup",
4735+
"ConvertedFieldType": "InlineKeyboardMarkup",
4736+
"Optional": true
4737+
}
4738+
],
4739+
"OriginalReturnType": "Message",
4740+
"ConvertedReturnType": "Message"
4741+
},
46204742
{
46214743
"OriginalName": "editMessageReplyMarkup",
46224744
"ConvertedName": "EditMessageReplyMarkup",
@@ -5007,7 +5129,7 @@
50075129
{
50085130
"OriginalName": "deleteBusinessMessages",
50095131
"ConvertedName": "DeleteBusinessMessages",
5010-
"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.",
5132+
"Description": "Delete messages on behalf of a business account. Requires the can_delete_sent_messages business bot right to delete messages sent by the bot itself, or the can_delete_all_messages business bot right to delete any message. Returns True on success.",
50115133
"Fields": [
50125134
{
50135135
"OriginalName": "business_connection_id",
@@ -6763,6 +6885,14 @@
67636885
"OriginalReturnType": "True",
67646886
"ConvertedReturnType": "bool"
67656887
},
6888+
{
6889+
"OriginalName": "getMyStarBalance",
6890+
"ConvertedName": "GetMyStarBalance",
6891+
"Description": "A method to get the current Telegram Stars balance of the bot. Requires no parameters. On success, returns a StarAmount object.",
6892+
"Fields": [],
6893+
"OriginalReturnType": "StarAmount",
6894+
"ConvertedReturnType": "StarAmount"
6895+
},
67666896
{
67676897
"OriginalName": "getStarTransactions",
67686898
"ConvertedName": "GetStarTransactions",

0 commit comments

Comments
 (0)