Skip to content

Commit

Permalink
feat: Update to Bot API 7.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Eptagone committed Nov 3, 2024
1 parent 9468af6 commit f4573df
Show file tree
Hide file tree
Showing 53 changed files with 687 additions and 193 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
| -------------------------------------------------- | -------------------------------- |

[![NuGet version (Telegram.BotAPI)](https://img.shields.io/nuget/v/Telegram.BotAPI?style=flat-square&logo=nuget)](https://www.nuget.org/packages/Telegram.BotAPI/)
[![Compatible with Bot API v7.10](https://img.shields.io/badge/Bot%20API%20version-v7.10-blue?style=flat-square)](https://core.telegram.org/bots/api#september-6-2024)
[![Compatible with Bot API v7.11](https://img.shields.io/badge/Bot%20API%20version-v7.11-blue?style=flat-square)](https://core.telegram.org/bots/api#october-31-2024)

**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 7.10 released on September 6, 2024.
**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 7.11 released on October 31, 2024.

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

---

## Features

- Contains pre-defined methods for all Bot API 7.10 methods.
- Contains classes for each object type used in the Bot API 7.10.
- Contains pre-defined methods for all Bot API 7.11 methods.
- Contains classes for each object type used in the Bot API 7.11.
- Sync and async methods.
- Uses [System.Text.Json](https://www.nuget.org/packages/System.Text.Json/).

Expand Down
2 changes: 1 addition & 1 deletion src/examples/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Telegram.BotAPI NET Examples

[![NuGet version (Telegram.BotAPI)](https://img.shields.io/nuget/v/Telegram.BotAPI?style=flat-square&logo=nuget)](https://www.nuget.org/packages/Telegram.BotAPI/)
[![Compatible with Bot API v7.10](https://img.shields.io/badge/Bot%20API%20version-v7.10-blue?style=flat-square)](https://core.telegram.org/bots/api#september-6-2024)
[![Compatible with Bot API v7.11](https://img.shields.io/badge/Bot%20API%20version-v7.11-blue?style=flat-square)](https://core.telegram.org/bots/api#october-31-2024)

## Sample list

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ public CopyMessageArgs(string chatId, string fromChatId, int messageId)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Description of the message to reply to
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ public SendAnimationArgs(string chatId, string animation)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ public SendAudioArgs(string chatId, string audio)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ public SendContactArgs(string chatId, string phoneNumber, string firstName)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ public SendDiceArgs(string chatId)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ public SendDocumentArgs(string chatId, string document)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ public SendLocationArgs(string chatId, float latitude, float longitude)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ public SendMediaGroupArgs(string chatId, IEnumerable<InputMediaVideo> media)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ public SendMessageArgs(string chatId, string text)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ public SendPaidMediaArgs(string chatId, int starCount, IEnumerable<InputPaidMedi
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Description of the message to reply to
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ public SendPhotoArgs(string chatId, string photo)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ public SendPollArgs(string chatId, string question, IEnumerable<InputPollOption>
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ public SendVenueArgs(string chatId, float latitude, float longitude, string titl
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ public SendVideoArgs(string chatId, string video)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ public SendVideoNoteArgs(string chatId, string videoNote)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ public SendVoiceArgs(string chatId, string voice)
[JsonPropertyName(PropertyNames.ProtectContent)]
public bool? ProtectContent { get; set; }

/// <summary>
/// Pass <em>True</em> to allow up to 1000 messages per second, ignoring <a href="https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once">broadcasting limits</a> for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
/// </summary>
[JsonPropertyName(PropertyNames.AllowPaidBroadcast)]
public bool? AllowPaidBroadcast { get; set; }

/// <summary>
/// Unique identifier of the message effect to be added to the message; for private chats only
/// </summary>
Expand Down
Loading

0 comments on commit f4573df

Please sign in to comment.