Skip to content

Commit

Permalink
Update Bot API to 8.3 (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolfik1 authored Feb 16, 2025
1 parent cb3b475 commit 854fa5d
Show file tree
Hide file tree
Showing 7 changed files with 248 additions and 53 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![.NET Core](https://github.com/Dolfik1/Funogram/workflows/.NET/badge.svg)
[![NuGet](https://img.shields.io/nuget/v/Funogram.svg)](https://www.nuget.org/packages/Funogram/)
[![NuGet](https://img.shields.io/nuget/v/Funogram.Telegram.svg)](https://www.nuget.org/packages/Funogram.Telegram/)
[![NuGet](https://img.shields.io/badge/Bot%20API-8.2-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/)
[![NuGet](https://img.shields.io/badge/Bot%20API-8.3-blue?logo=telegram)](https://www.nuget.org/packages/Funogram.Telegram/)

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

Expand Down
52 changes: 46 additions & 6 deletions src/Funogram.Generator/out/methods.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,14 @@
"ConvertedFieldType": "ChatId",
"Optional": false
},
{
"OriginalName": "video_start_timestamp",
"ConvertedName": "VideoStartTimestamp",
"Description": "New start timestamp for the forwarded video in the message",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": true
},
{
"OriginalName": "disable_notification",
"ConvertedName": "DisableNotification",
Expand Down Expand Up @@ -418,6 +426,14 @@
"ConvertedFieldType": "int64",
"Optional": false
},
{
"OriginalName": "video_start_timestamp",
"ConvertedName": "VideoStartTimestamp",
"Description": "New start timestamp for the copied video in the message",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": true
},
{
"OriginalName": "caption",
"ConvertedName": "Caption",
Expand Down Expand Up @@ -1031,6 +1047,22 @@
"ConvertedFieldType": "InputFile",
"Optional": true
},
{
"OriginalName": "cover",
"ConvertedName": "Cover",
"Description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D to upload a new one using multipart/form-data under \u003Cfile_attach_name\u003E name. More information on Sending Files \u00BB",
"OriginalFieldType": "InputFile or String",
"ConvertedFieldType": "InputFile",
"Optional": true
},
{
"OriginalName": "start_timestamp",
"ConvertedName": "StartTimestamp",
"Description": "Start timestamp for the video in the message",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": true
},
{
"OriginalName": "caption",
"ConvertedName": "Caption",
Expand Down Expand Up @@ -2441,7 +2473,7 @@
{
"OriginalName": "setMessageReaction",
"ConvertedName": "SetMessageReaction",
"Description": "Use this method to change the chosen reactions on a message. Service messages can\u0027t be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can\u0027t use paid reactions. Returns True on success.",
"Description": "Use this method to change the chosen reactions on a message. Service messages of some types can\u0027t be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can\u0027t use paid reactions. Returns True on success.",
"Fields": [
{
"OriginalName": "chat_id",
Expand Down Expand Up @@ -5248,23 +5280,31 @@
{
"OriginalName": "getAvailableGifts",
"ConvertedName": "GetAvailableGifts",
"Description": "Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object.",
"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. The gift can\u0027t be converted to Telegram Stars by the user. Returns True on success.",
"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": "Unique identifier of the target user that will receive the gift",
"Description": "Required if chat_id is not specified. Unique identifier of the target user who will receive the gift.",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": false
"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",
Expand All @@ -5285,7 +5325,7 @@
{
"OriginalName": "text",
"ConvertedName": "Text",
"Description": "Text that will be shown along with the gift; 0-255 characters",
"Description": "Text that will be shown along with the gift; 0-128 characters",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": true
Expand Down
115 changes: 105 additions & 10 deletions src/Funogram.Generator/out/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,14 @@
"ConvertedFieldType": "ChatPermissions",
"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": "can_send_paid_media",
"ConvertedName": "CanSendPaidMedia",
Expand Down Expand Up @@ -2523,6 +2531,22 @@
"ConvertedFieldType": "PhotoSize",
"Optional": true
},
{
"OriginalName": "cover",
"ConvertedName": "Cover",
"Description": "Available sizes of the cover of the video in the message",
"OriginalFieldType": "Array of PhotoSize",
"ConvertedFieldType": "PhotoSize[]",
"Optional": true
},
{
"OriginalName": "start_timestamp",
"ConvertedName": "StartTimestamp",
"Description": "Timestamp in seconds from which the video will play in the message",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": true
},
{
"OriginalName": "file_name",
"ConvertedName": "FileName",
Expand Down Expand Up @@ -7450,8 +7474,24 @@
"OriginalName": "thumbnail",
"ConvertedName": "Thumbnail",
"Description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail\u0027s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can\u0027t be reused and can be only uploaded as a new file, so you can pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D if the thumbnail was uploaded using multipart/form-data under \u003Cfile_attach_name\u003E. More information on Sending Files \u00BB",
"OriginalFieldType": "InputFile or String",
"ConvertedFieldType": "InputFile",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": true
},
{
"OriginalName": "cover",
"ConvertedName": "Cover",
"Description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D to upload a new one using multipart/form-data under \u003Cfile_attach_name\u003E name. More information on Sending Files \u00BB",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": true
},
{
"OriginalName": "start_timestamp",
"ConvertedName": "StartTimestamp",
"Description": "Start timestamp for the video in the message",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": true
},
{
Expand Down Expand Up @@ -7557,8 +7597,8 @@
"OriginalName": "thumbnail",
"ConvertedName": "Thumbnail",
"Description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail\u0027s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can\u0027t be reused and can be only uploaded as a new file, so you can pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D if the thumbnail was uploaded using multipart/form-data under \u003Cfile_attach_name\u003E. More information on Sending Files \u00BB",
"OriginalFieldType": "InputFile or String",
"ConvertedFieldType": "InputFile",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": true
},
{
Expand Down Expand Up @@ -7656,8 +7696,8 @@
"OriginalName": "thumbnail",
"ConvertedName": "Thumbnail",
"Description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail\u0027s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can\u0027t be reused and can be only uploaded as a new file, so you can pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D if the thumbnail was uploaded using multipart/form-data under \u003Cfile_attach_name\u003E. More information on Sending Files \u00BB",
"OriginalFieldType": "InputFile or String",
"ConvertedFieldType": "InputFile",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": true
},
{
Expand Down Expand Up @@ -7739,8 +7779,8 @@
"OriginalName": "thumbnail",
"ConvertedName": "Thumbnail",
"Description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail\u0027s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can\u0027t be reused and can be only uploaded as a new file, so you can pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D if the thumbnail was uploaded using multipart/form-data under \u003Cfile_attach_name\u003E. More information on Sending Files \u00BB",
"OriginalFieldType": "InputFile or String",
"ConvertedFieldType": "InputFile",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": true
},
{
Expand Down Expand Up @@ -7859,8 +7899,24 @@
"OriginalName": "thumbnail",
"ConvertedName": "Thumbnail",
"Description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail\u0027s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can\u0027t be reused and can be only uploaded as a new file, so you can pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D if the thumbnail was uploaded using multipart/form-data under \u003Cfile_attach_name\u003E. More information on Sending Files \u00BB",
"OriginalFieldType": "InputFile or String",
"ConvertedFieldType": "InputFile",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": true
},
{
"OriginalName": "cover",
"ConvertedName": "Cover",
"Description": "Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass \u201Cattach://\u003Cfile_attach_name\u003E\u201D to upload a new one using multipart/form-data under \u003Cfile_attach_name\u003E name. More information on Sending Files \u00BB",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": true
},
{
"OriginalName": "start_timestamp",
"ConvertedName": "StartTimestamp",
"Description": "Start timestamp for the video in the message",
"OriginalFieldType": "Integer",
"ConvertedFieldType": "int64",
"Optional": true
},
{
Expand Down Expand Up @@ -11613,6 +11669,10 @@
"Name": "User",
"CaseType": "TransactionPartnerUser"
},
{
"Name": "Chat",
"CaseType": "TransactionPartnerChat"
},
{
"Name": "AffiliateProgram",
"CaseType": "TransactionPartnerAffiliateProgram"
Expand Down Expand Up @@ -11712,6 +11772,41 @@
]
}
},
{
"Name": "TransactionPartnerChat",
"Description": "Describes a transaction with a chat.",
"Kind": {
"Case": "Fields",
"Fields": [
[
{
"OriginalName": "type",
"ConvertedName": "Type",
"Description": "Type of the transaction partner, always \u201Cchat\u201D",
"OriginalFieldType": "String",
"ConvertedFieldType": "string",
"Optional": false
},
{
"OriginalName": "chat",
"ConvertedName": "Chat",
"Description": "Information about the chat",
"OriginalFieldType": "Chat",
"ConvertedFieldType": "Chat",
"Optional": false
},
{
"OriginalName": "gift",
"ConvertedName": "Gift",
"Description": "The gift sent to the chat by the bot",
"OriginalFieldType": "Gift",
"ConvertedFieldType": "Gift",
"Optional": true
}
]
]
}
},
{
"Name": "TransactionPartnerAffiliateProgram",
"Description": "Describes the affiliate program that issued the affiliate commission received via this transaction.",
Expand Down
2 changes: 1 addition & 1 deletion src/Funogram.Telegram/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Version>8.2.0.0</Version>
<Version>8.3.0.0</Version>
<Authors>Nikolay Matyushin</Authors>
<Product>Funogram.Telegram</Product>
<Title>Funogram.Telegram</Title>
Expand Down
Loading

0 comments on commit 854fa5d

Please sign in to comment.