Skip to content

Commit 0c2237f

Browse files
committed
feat: update to bot api 10.3
1 parent 8b43916 commit 0c2237f

87 files changed

Lines changed: 1130 additions & 892 deletions

File tree

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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
| -------------------------------------------------- | ------------------------ |
33

44
[![NuGet version (Telegram.BotAPI)](https://img.shields.io/nuget/v/Telegram.BotAPI?style=flat-square&logo=nuget)](https://www.nuget.org/packages/Telegram.BotAPI/)
5-
[![Compatible with Bot API v10.2](https://img.shields.io/badge/Bot%20API%20version-v10.2-blue?style=flat-square)](https://core.telegram.org/bots/api#july-14-2026)
5+
[![Compatible with Bot API v10.3](https://img.shields.io/badge/Bot%20API%20version-v10.3-blue?style=flat-square)](https://core.telegram.org/bots/api#august-24-2026)
66

7-
**Telegram.BotAPI** is one of the most complete libraries available to interact with the Telegram Bot API in your .NET projects. It contains all the methods and types available in the Bot API 10.2 released on July 14, 2026.
7+
**Telegram.BotAPI** is one of the most complete libraries available to interact with the Telegram Bot API in your .NET projects. It contains all the methods and types available in the Bot API 10.3 released on August 24, 2026.
88

99
[![Telegram Chat](https://img.shields.io/badge/Telegram.BotAPI%20--%20Chat-Join-blue?style=social&logo=telegram)](https://t.me/TBAPINET)
1010

1111
---
1212

1313
## Features
1414

15-
- Contains pre-defined methods for all Bot API 10.2 methods.
16-
- Contains classes for each object type used in the Bot API 10.2.
15+
- Contains pre-defined methods for all Bot API 10.3 methods.
16+
- Contains classes for each object type used in the Bot API 10.3.
1717
- Sync and async methods.
1818
- Uses [System.Text.Json](https://www.nuget.org/packages/System.Text.Json/).
1919

src/examples/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Telegram.BotAPI NET Examples
22

33
[![NuGet version (Telegram.BotAPI)](https://img.shields.io/nuget/v/Telegram.BotAPI?style=flat-square&logo=nuget)](https://www.nuget.org/packages/Telegram.BotAPI/)
4-
[![Compatible with Bot API v10.2](https://img.shields.io/badge/Bot%20API%20version-v10.2-blue?style=flat-square)](https://core.telegram.org/bots/api#july-14-2026)
4+
[![Compatible with Bot API v10.3](https://img.shields.io/badge/Bot%20API%20version-v10.3-blue?style=flat-square)](https://core.telegram.org/bots/api#august-24-2026)
55

66
## Sample list
77

src/library/Telegram.BotAPI/AvailableMethods/Args/AnswerCallbackQueryArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public AnswerCallbackQueryArgs(string callbackQueryId)
4545
public string? Url { get; set; }
4646

4747
/// <summary>
48-
/// The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.
48+
/// The maximum amount of time in seconds that the result of the callback query may be cached client-side. Defaults to 0.
4949
/// </summary>
5050
[JsonPropertyName(PropertyNames.CacheTime)]
5151
public int? CacheTime { get; set; }

src/library/Telegram.BotAPI/AvailableMethods/Args/PromoteChatMemberArgs.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,10 @@ public PromoteChatMemberArgs(string chatId, long userId)
144144
/// </summary>
145145
[JsonPropertyName(PropertyNames.CanManageTags)]
146146
public bool? CanManageTags { get; set; }
147+
148+
/// <summary>
149+
/// Pass <em>True</em> if the administrator can manage chat welcome messages or directly send them in the case of bots
150+
/// </summary>
151+
[JsonPropertyName(PropertyNames.CanSendWelcomeMessages)]
152+
public bool? CanSendWelcomeMessages { get; set; }
147153
}

src/library/Telegram.BotAPI/AvailableMethods/Args/SendAnimationArgs.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,10 @@ public SendAnimationArgs(string chatId, string animation)
8080
public int? DirectMessagesTopicId { get; set; }
8181

8282
/// <summary>
83-
/// For outgoing ephemeral messages, unique identifier of the user who will receive the message; for group and supergroup chats only. It is not guaranteed that the user will receive the message, especially if they are offline. See <a href="https://core.telegram.org/bots/api#ephemeral-messages-and-commands">ephemeral message sending</a> for more details.
83+
/// A JSON-serialized object containing the parameters of the ephemeral message to send
8484
/// </summary>
85-
[JsonPropertyName(PropertyNames.ReceiverUserId)]
86-
public long? ReceiverUserId { get; set; }
87-
88-
/// <summary>
89-
/// For outgoing ephemeral messages, identifier of the callback query which triggerred the message if any
90-
/// </summary>
91-
[JsonPropertyName(PropertyNames.CallbackQueryId)]
92-
public string? CallbackQueryId { get; set; }
85+
[JsonPropertyName(PropertyNames.EphemeralMessageParameters)]
86+
public EphemeralMessageParameters? EphemeralMessageParameters { get; set; }
9387

9488
/// <summary>
9589
/// Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. <a href="https://core.telegram.org/bots/api#sending-files">More information on Sending Files »</a>

src/library/Telegram.BotAPI/AvailableMethods/Args/SendAudioArgs.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,10 @@ public SendAudioArgs(string chatId, string audio)
8080
public int? DirectMessagesTopicId { get; set; }
8181

8282
/// <summary>
83-
/// For outgoing ephemeral messages, unique identifier of the user who will receive the message; for group and supergroup chats only. It is not guaranteed that the user will receive the message, especially if they are offline. See <a href="https://core.telegram.org/bots/api#ephemeral-messages-and-commands">ephemeral message sending</a> for more details.
83+
/// A JSON-serialized object containing the parameters of the ephemeral message to send
8484
/// </summary>
85-
[JsonPropertyName(PropertyNames.ReceiverUserId)]
86-
public long? ReceiverUserId { get; set; }
87-
88-
/// <summary>
89-
/// For outgoing ephemeral messages, identifier of the callback query which triggerred the message if any
90-
/// </summary>
91-
[JsonPropertyName(PropertyNames.CallbackQueryId)]
92-
public string? CallbackQueryId { get; set; }
85+
[JsonPropertyName(PropertyNames.EphemeralMessageParameters)]
86+
public EphemeralMessageParameters? EphemeralMessageParameters { get; set; }
9387

9488
/// <summary>
9589
/// Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. <a href="https://core.telegram.org/bots/api#sending-files">More information on Sending Files »</a>

src/library/Telegram.BotAPI/AvailableMethods/Args/SendContactArgs.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,10 @@ public SendContactArgs(string chatId, string phoneNumber, string firstName)
6262
public int? DirectMessagesTopicId { get; set; }
6363

6464
/// <summary>
65-
/// For outgoing ephemeral messages, unique identifier of the user who will receive the message; for group and supergroup chats only. It is not guaranteed that the user will receive the message, especially if they are offline. See <a href="https://core.telegram.org/bots/api#ephemeral-messages-and-commands">ephemeral message sending</a> for more details.
65+
/// A JSON-serialized object containing the parameters of the ephemeral message to send
6666
/// </summary>
67-
[JsonPropertyName(PropertyNames.ReceiverUserId)]
68-
public long? ReceiverUserId { get; set; }
69-
70-
/// <summary>
71-
/// For outgoing ephemeral messages, identifier of the callback query which triggerred the message if any
72-
/// </summary>
73-
[JsonPropertyName(PropertyNames.CallbackQueryId)]
74-
public string? CallbackQueryId { get; set; }
67+
[JsonPropertyName(PropertyNames.EphemeralMessageParameters)]
68+
public EphemeralMessageParameters? EphemeralMessageParameters { get; set; }
7569

7670
/// <summary>
7771
/// Contact's phone number

src/library/Telegram.BotAPI/AvailableMethods/Args/SendDocumentArgs.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,10 @@ public SendDocumentArgs(string chatId, string document)
8080
public int? DirectMessagesTopicId { get; set; }
8181

8282
/// <summary>
83-
/// For outgoing ephemeral messages, unique identifier of the user who will receive the message; for group and supergroup chats only. It is not guaranteed that the user will receive the message, especially if they are offline. See <a href="https://core.telegram.org/bots/api#ephemeral-messages-and-commands">ephemeral message sending</a> for more details.
83+
/// A JSON-serialized object containing the parameters of the ephemeral message to send
8484
/// </summary>
85-
[JsonPropertyName(PropertyNames.ReceiverUserId)]
86-
public long? ReceiverUserId { get; set; }
87-
88-
/// <summary>
89-
/// For outgoing ephemeral messages, identifier of the callback query which triggerred the message if any
90-
/// </summary>
91-
[JsonPropertyName(PropertyNames.CallbackQueryId)]
92-
public string? CallbackQueryId { get; set; }
85+
[JsonPropertyName(PropertyNames.EphemeralMessageParameters)]
86+
public EphemeralMessageParameters? EphemeralMessageParameters { get; set; }
9387

9488
/// <summary>
9589
/// File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. <a href="https://core.telegram.org/bots/api#sending-files">More information on Sending Files »</a>

src/library/Telegram.BotAPI/AvailableMethods/Args/SendLivePhotoArgs.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,10 @@ public SendLivePhotoArgs(string chatId, string livePhoto, string photo)
140140
public int? DirectMessagesTopicId { get; set; }
141141

142142
/// <summary>
143-
/// For outgoing ephemeral messages, unique identifier of the user who will receive the message; for group and supergroup chats only. It is not guaranteed that the user will receive the message, especially if they are offline. See <a href="https://core.telegram.org/bots/api#ephemeral-messages-and-commands">ephemeral message sending</a> for more details.
143+
/// A JSON-serialized object containing the parameters of the ephemeral message to send
144144
/// </summary>
145-
[JsonPropertyName(PropertyNames.ReceiverUserId)]
146-
public long? ReceiverUserId { get; set; }
147-
148-
/// <summary>
149-
/// For outgoing ephemeral messages, identifier of the callback query which triggerred the message if any
150-
/// </summary>
151-
[JsonPropertyName(PropertyNames.CallbackQueryId)]
152-
public string? CallbackQueryId { get; set; }
145+
[JsonPropertyName(PropertyNames.EphemeralMessageParameters)]
146+
public EphemeralMessageParameters? EphemeralMessageParameters { get; set; }
153147

154148
/// <summary>
155149
/// Live photo video to send. The video must be no longer than 10 seconds and must not exceed 10 MB in size. Pass a file_id as String to send a video that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. <a href="https://core.telegram.org/bots/api#sending-files">More information on Sending Files »</a>. Sending live photos by a URL is currently unsupported.

src/library/Telegram.BotAPI/AvailableMethods/Args/SendLocationArgs.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,10 @@ public SendLocationArgs(string chatId, float latitude, float longitude)
6262
public int? DirectMessagesTopicId { get; set; }
6363

6464
/// <summary>
65-
/// For outgoing ephemeral messages, unique identifier of the user who will receive the message; for group and supergroup chats only. It is not guaranteed that the user will receive the message, especially if they are offline. See <a href="https://core.telegram.org/bots/api#ephemeral-messages-and-commands">ephemeral message sending</a> for more details.
65+
/// A JSON-serialized object containing the parameters of the ephemeral message to send
6666
/// </summary>
67-
[JsonPropertyName(PropertyNames.ReceiverUserId)]
68-
public long? ReceiverUserId { get; set; }
69-
70-
/// <summary>
71-
/// For outgoing ephemeral messages, identifier of the callback query which triggerred the message if any
72-
/// </summary>
73-
[JsonPropertyName(PropertyNames.CallbackQueryId)]
74-
public string? CallbackQueryId { get; set; }
67+
[JsonPropertyName(PropertyNames.EphemeralMessageParameters)]
68+
public EphemeralMessageParameters? EphemeralMessageParameters { get; set; }
7569

7670
/// <summary>
7771
/// Latitude of the location

0 commit comments

Comments
 (0)