Skip to content

Commit

Permalink
Merge pull request #36 from RxTelegram/v7.1.0
Browse files Browse the repository at this point in the history
Add support for v7.1
  • Loading branch information
niklasweimann authored Feb 24, 2024
2 parents e7a6bc2 + 3fe1668 commit 0e6464e
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=RxTelegram_RxTelegram.Bot&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=RxTelegram_RxTelegram.Bot)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=RxTelegram_RxTelegram.Bot&metric=coverage)](https://sonarcloud.io/summary/new_code?id=RxTelegram_RxTelegram.Bot)

RxTelegram.Bot supports Telegram Bot API 7.0 (as at December 29, 2023).
RxTelegram.Bot supports Telegram Bot API 7.1 (as at February 16, 2024).

This is a reactive designed .NET Library for the Telegram Bot API. It works with the official [Reactive Extentions](https://github.com/dotnet/reactive).

Expand Down
16 changes: 15 additions & 1 deletion src/RxTelegram.Bot/Interface/BaseTypes/Chat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ public class Chat
/// </summary>
public int? SlowModeDelay { get; set; }

/// <summary>
/// Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore
/// slow mode and chat permissions. Returned only in <see cref="ITelegramBot.GetChat(GetChat,CancellationToken)"/>.
/// </summary>
public int? UnrestrictBoostCount { get; set; }

/// <summary>
/// Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds.
/// Returned only in getChat.
Expand Down Expand Up @@ -199,10 +205,18 @@ public class Chat
public string StickerSetName { get; set; }

/// <summary>
/// Optional. True, if the bot can change the group sticker set. Returned only in getChat.
/// Optional. True, if the bot can change the group sticker set.
/// Returned only in <see cref="ITelegramBot.GetChat(GetChat,CancellationToken)"/>.
/// </summary>
public bool? CanSetStickerSet { get; set; }

/// <summary>
/// Optional. For supergroups, the name of the group's custom emoji sticker set.
/// Custom emoji from this set can be used by all users and bots in the group.
/// Returned only in <see cref="ITelegramBot.GetChat(GetChat,CancellationToken)"/>.
/// </summary>
public string CustomEmojiStickerSetName { get; set; }

/// <summary>
/// Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa;
/// for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages
Expand Down
12 changes: 12 additions & 0 deletions src/RxTelegram.Bot/Interface/BaseTypes/ChatBoostAdded.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace RxTelegram.Bot.Interface.BaseTypes;

/// <summary>
/// This object represents a service message about a user boosting a chat.
/// </summary>
public class ChatBoostAdded
{
/// <summary>
/// Number of boosts added by the user
/// </summary>
public int BoostCount { get; set; }
}
15 changes: 15 additions & 0 deletions src/RxTelegram.Bot/Interface/BaseTypes/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ public class Message
/// </summary>
public Chat SenderChat { get; set; }

/// <summary>
/// Optional. If the sender of the message boosted the chat, the number of boosts added by the user
/// </summary>
public int? SenderBoostCount { get; set; }

/// <summary>
/// Optional. If the sender of the message boosted the chat, the number of boosts added by the user
/// </summary>
public ChatBoostAdded BoostAdded { get; set; }

/// <summary>
/// Date the message was sent
/// </summary>
Expand Down Expand Up @@ -76,6 +86,11 @@ public class Message
/// </summary>
public TextQuote Quote { get; set; }

/// <summary>
/// Optional. For replies to a story, the original story
/// </summary>
public Story ReplyToStory { get; set; }

/// <summary>
/// Optional. Bot through which the message was sent
/// </summary>
Expand Down
11 changes: 10 additions & 1 deletion src/RxTelegram.Bot/Interface/BaseTypes/Story.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
namespace RxTelegram.Bot.Interface.BaseTypes;

/// <summary>
/// This object represents a message about a forwarded story in the chat. Currently holds no information.
/// This object represents a message about a forwarded story in the chat.
/// </summary>
public class Story
{
/// <summary>
/// Unique identifier for the story in the chat
/// </summary>
public int Id { get; set; }

/// <summary>
/// Chat that posted the story
/// </summary>
public Chat Chat { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ namespace RxTelegram.Bot.Interface.BaseTypes;

/// <summary>
/// This object represents a service message about a user allowing a bot added to the attachment menu to write messages.
/// Currently holds no information.
/// </summary>
public class WriteAccessAllowed
{
Expand Down
2 changes: 1 addition & 1 deletion src/RxTelegram.Bot/RxTelegram.Bot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<RepositoryUrl>https://github.com/RxTelegram/RxTelegram.Bot</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Telegram;Bot;Api;Rx;Reactive;Observable;RxTelegram;RxTelegram.Bot</PackageTags>
<PackageVersion>7.0.0</PackageVersion>
<PackageVersion>7.1.0</PackageVersion>
<PackageIcon>icon.png</PackageIcon>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
Expand Down

0 comments on commit 0e6464e

Please sign in to comment.