Skip to content

Commit c388755

Browse files
committed
Bot API 9.3
1 parent f26c4f1 commit c388755

58 files changed

Lines changed: 588 additions & 78 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# .NET Client for Telegram Bot API
22

33
[![Nuget](https://img.shields.io/nuget/vpre/Telegram.Bot.svg?label=Telegram.Bot&style=flat-square&color=d8b541)](https://www.nuget.org/packages/Telegram.Bot)
4-
[![Bot API 9.2](https://img.shields.io/badge/Bot_API-9.2-f36caf.svg?style=flat-square)](https://core.telegram.org/bots/api)
4+
[![Bot API 9.3](https://img.shields.io/badge/Bot_API-9.3-f36caf.svg?style=flat-square)](https://core.telegram.org/bots/api)
55
[![Documentations](https://img.shields.io/badge/Documentations-Book-orange.svg?style=flat-square)](https://telegrambots.github.io/book/)
66
[![Telegram Chat](https://img.shields.io/badge/Support_Chat-Telegram-blue.svg?style=flat-square)](https://t.me/joinchat/B35YY0QbLfd034CFnvCtCA)
77
[![Master build](https://img.shields.io/azure-devops/build/tgbots/14f9ab3f-313a-4339-8534-e8b96c7763cc/6?style=flat-square&label=master)](https://dev.azure.com/tgbots/Telegram.Bot/_build/latest?definitionId=6&branchName=master)

src/Telegram.Bot/Requests/Business Account/GetBusinessAccountGiftsRequest.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,22 @@ public partial class GetBusinessAccountGiftsRequest() : RequestBase<OwnedGifts>(
2222
[JsonPropertyName("exclude_unlimited")]
2323
public bool ExcludeUnlimited { get; set; }
2424

25-
/// <summary>Pass <see langword="true"/> to exclude gifts that can be purchased a limited number of times</summary>
26-
[JsonPropertyName("exclude_limited")]
27-
public bool ExcludeLimited { get; set; }
25+
/// <summary>Pass <see langword="true"/> to exclude gifts that can be purchased a limited number of times and can be upgraded to unique</summary>
26+
[JsonPropertyName("exclude_limited_upgradable")]
27+
public bool ExcludeLimitedUpgradable { get; set; }
28+
29+
/// <summary>Pass <see langword="true"/> to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique</summary>
30+
[JsonPropertyName("exclude_limited_non_upgradable")]
31+
public bool ExcludeLimitedNonUpgradable { get; set; }
2832

2933
/// <summary>Pass <see langword="true"/> to exclude unique gifts</summary>
3034
[JsonPropertyName("exclude_unique")]
3135
public bool ExcludeUnique { get; set; }
3236

37+
/// <summary>Pass <see langword="true"/> to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram</summary>
38+
[JsonPropertyName("exclude_from_blockchain")]
39+
public bool ExcludeFromBlockchain { get; set; }
40+
3341
/// <summary>Pass <see langword="true"/> to sort results by gift price instead of send date. Sorting is applied before pagination.</summary>
3442
[JsonPropertyName("sort_by_price")]
3543
public bool SortByPrice { get; set; }

src/Telegram.Bot/Requests/Other methods/GetBusinessConnectionRequest.cs renamed to src/Telegram.Bot/Requests/Business Account/GetBusinessConnectionRequest.cs

File renamed without changes.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// GENERATED FILE - DO NOT MODIFY MANUALLY
2+
namespace Telegram.Bot.Requests;
3+
4+
/// <summary>Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the <em>CanManageStories</em> business bot right for both business accounts.<para>Returns: <see cref="Story"/> on success.</para></summary>
5+
[EditorBrowsable(EditorBrowsableState.Never)]
6+
public partial class RepostStoryRequest() : RequestBase<Story>("repostStory"), IBusinessConnectable
7+
{
8+
/// <summary>Unique identifier of the business connection</summary>
9+
[JsonPropertyName("business_connection_id")]
10+
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
11+
public required string BusinessConnectionId { get; set; }
12+
13+
/// <summary>Unique identifier of the chat which posted the story that should be reposted</summary>
14+
[JsonPropertyName("from_chat_id")]
15+
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
16+
public required long FromChatId { get; set; }
17+
18+
/// <summary>Unique identifier of the story that should be reposted</summary>
19+
[JsonPropertyName("from_story_id")]
20+
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
21+
public required int FromStoryId { get; set; }
22+
23+
/// <summary>Period after which the story is moved to the archive, in seconds; must be one of <c>6 * 3600</c>, <c>12 * 3600</c>, <c>86400</c>, or <c>2 * 86400</c></summary>
24+
[JsonPropertyName("active_period")]
25+
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
26+
public required int ActivePeriod { get; set; }
27+
28+
/// <summary>Pass <see langword="true"/> to keep the story accessible after it expires</summary>
29+
[JsonPropertyName("post_to_chat_page")]
30+
public bool PostToChatPage { get; set; }
31+
32+
/// <summary>Pass <see langword="true"/> if the content of the story must be protected from forwarding and screenshotting</summary>
33+
[JsonPropertyName("protect_content")]
34+
public bool ProtectContent { get; set; }
35+
}

src/Telegram.Bot/Requests/Games/SendGameRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public partial class SendGameRequest() : RequestBase<Message>("sendGame"), IChat
1919
[JsonPropertyName("business_connection_id")]
2020
public string? BusinessConnectionId { get; set; }
2121

22-
/// <summary>Unique identifier for the target message thread (topic) of the forum; for forum supergroups only</summary>
22+
/// <summary>Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only</summary>
2323
[JsonPropertyName("message_thread_id")]
2424
public int? MessageThreadId { get; set; }
2525

src/Telegram.Bot/Requests/Business Account/ConvertGiftToStarsRequest.cs renamed to src/Telegram.Bot/Requests/Gifts/ConvertGiftToStarsRequest.cs

File renamed without changes.

src/Telegram.Bot/Requests/Stickers/GetAvailableGiftsRequest.cs renamed to src/Telegram.Bot/Requests/Gifts/GetAvailableGiftsRequest.cs

File renamed without changes.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// GENERATED FILE - DO NOT MODIFY MANUALLY
2+
namespace Telegram.Bot.Requests;
3+
4+
/// <summary>Returns the gifts owned by a chat.<para>Returns: <see cref="OwnedGifts"/> on success.</para></summary>
5+
[EditorBrowsable(EditorBrowsableState.Never)]
6+
public partial class GetChatGiftsRequest() : RequestBase<OwnedGifts>("getChatGifts"), IChatTargetable
7+
{
8+
/// <summary>Unique identifier for the target chat or username of the target channel (in the format <c>@channelusername</c>)</summary>
9+
[JsonPropertyName("chat_id")]
10+
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
11+
public required ChatId ChatId { get; set; }
12+
13+
/// <summary>Pass <see langword="true"/> to exclude gifts that aren't saved to the chat's profile page. Always <see langword="true"/>, unless the bot has the <em>CanPostMessages</em> administrator right in the channel.</summary>
14+
[JsonPropertyName("exclude_unsaved")]
15+
public bool ExcludeUnsaved { get; set; }
16+
17+
/// <summary>Pass <see langword="true"/> to exclude gifts that are saved to the chat's profile page. Always <see langword="false"/>, unless the bot has the <em>CanPostMessages</em> administrator right in the channel.</summary>
18+
[JsonPropertyName("exclude_saved")]
19+
public bool ExcludeSaved { get; set; }
20+
21+
/// <summary>Pass <see langword="true"/> to exclude gifts that can be purchased an unlimited number of times</summary>
22+
[JsonPropertyName("exclude_unlimited")]
23+
public bool ExcludeUnlimited { get; set; }
24+
25+
/// <summary>Pass <see langword="true"/> to exclude gifts that can be purchased a limited number of times and can be upgraded to unique</summary>
26+
[JsonPropertyName("exclude_limited_upgradable")]
27+
public bool ExcludeLimitedUpgradable { get; set; }
28+
29+
/// <summary>Pass <see langword="true"/> to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique</summary>
30+
[JsonPropertyName("exclude_limited_non_upgradable")]
31+
public bool ExcludeLimitedNonUpgradable { get; set; }
32+
33+
/// <summary>Pass <see langword="true"/> to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram</summary>
34+
[JsonPropertyName("exclude_from_blockchain")]
35+
public bool ExcludeFromBlockchain { get; set; }
36+
37+
/// <summary>Pass <see langword="true"/> to exclude unique gifts</summary>
38+
[JsonPropertyName("exclude_unique")]
39+
public bool ExcludeUnique { get; set; }
40+
41+
/// <summary>Pass <see langword="true"/> to sort results by gift price instead of send date. Sorting is applied before pagination.</summary>
42+
[JsonPropertyName("sort_by_price")]
43+
public bool SortByPrice { get; set; }
44+
45+
/// <summary>Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results</summary>
46+
public string? Offset { get; set; }
47+
48+
/// <summary>The maximum number of gifts to be returned; 1-100. Defaults to 100</summary>
49+
public int? Limit { get; set; }
50+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// GENERATED FILE - DO NOT MODIFY MANUALLY
2+
namespace Telegram.Bot.Requests;
3+
4+
/// <summary>Returns the gifts owned and hosted by a user.<para>Returns: <see cref="OwnedGifts"/> on success.</para></summary>
5+
[EditorBrowsable(EditorBrowsableState.Never)]
6+
public partial class GetUserGiftsRequest() : RequestBase<OwnedGifts>("getUserGifts"), IUserTargetable
7+
{
8+
/// <summary>Unique identifier of the user</summary>
9+
[JsonPropertyName("user_id")]
10+
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
11+
public required long UserId { get; set; }
12+
13+
/// <summary>Pass <see langword="true"/> to exclude gifts that can be purchased an unlimited number of times</summary>
14+
[JsonPropertyName("exclude_unlimited")]
15+
public bool ExcludeUnlimited { get; set; }
16+
17+
/// <summary>Pass <see langword="true"/> to exclude gifts that can be purchased a limited number of times and can be upgraded to unique</summary>
18+
[JsonPropertyName("exclude_limited_upgradable")]
19+
public bool ExcludeLimitedUpgradable { get; set; }
20+
21+
/// <summary>Pass <see langword="true"/> to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique</summary>
22+
[JsonPropertyName("exclude_limited_non_upgradable")]
23+
public bool ExcludeLimitedNonUpgradable { get; set; }
24+
25+
/// <summary>Pass <see langword="true"/> to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram</summary>
26+
[JsonPropertyName("exclude_from_blockchain")]
27+
public bool ExcludeFromBlockchain { get; set; }
28+
29+
/// <summary>Pass <see langword="true"/> to exclude unique gifts</summary>
30+
[JsonPropertyName("exclude_unique")]
31+
public bool ExcludeUnique { get; set; }
32+
33+
/// <summary>Pass <see langword="true"/> to sort results by gift price instead of send date. Sorting is applied before pagination.</summary>
34+
[JsonPropertyName("sort_by_price")]
35+
public bool SortByPrice { get; set; }
36+
37+
/// <summary>Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results</summary>
38+
public string? Offset { get; set; }
39+
40+
/// <summary>The maximum number of gifts to be returned; 1-100. Defaults to 100</summary>
41+
public int? Limit { get; set; }
42+
}

src/Telegram.Bot/Requests/Stickers/SendGiftRequest.cs renamed to src/Telegram.Bot/Requests/Gifts/SendGiftRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Telegram.Bot.Requests;
55
[EditorBrowsable(EditorBrowsableState.Never)]
66
public partial class SendGiftRequest() : RequestBase<bool>("sendGift")
77
{
8-
/// <summary>Identifier of the gift</summary>
8+
/// <summary>Identifier of the gift; limited gifts can't be sent to channel chats</summary>
99
[JsonPropertyName("gift_id")]
1010
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
1111
public required string GiftId { get; set; }

0 commit comments

Comments
 (0)