Skip to content

Conversation

niklasweimann
Copy link
Member

Fixes #79

@r-ising r-ising requested a review from Copilot September 26, 2025 14:37
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the RxTelegram.Bot library to support Telegram Bot API version 9.0, adding new business account management features, story functionality, and gift-related operations.

  • Updates the package version from 8.3.0 to 9.0.0
  • Adds comprehensive business bot rights and account management capabilities
  • Implements story posting, editing, and deletion features with clickable areas

Reviewed Changes

Copilot reviewed 52 out of 52 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/RxTelegram.Bot/RxTelegram.Bot.csproj Updates package version to 9.0.0
src/RxTelegram.Bot/TelegramBot.cs Adds new API methods for business account management, gifts, and stories
src/RxTelegram.Bot/Validation/ValidationResultFactory.cs Adds validation methods for new business and story request types
src/RxTelegram.Bot/Interface/Business/ New business account management request classes and rights structure
src/RxTelegram.Bot/Interface/Story/ New story-related classes including areas, content types, and requests
src/RxTelegram.Bot/Interface/BaseTypes/ New base types for stars, gifts, and input media for stories and profiles
src/RxTelegram.Bot/Interface/Payments/ Updates to payment-related classes for new features
README.md Updates supported API version reference from 8.3 to 9.0

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

new ValidationResult<SetBusinessAccountGiftSettings>(value)
.ValidateRequired(x => x.BusinessConnectionId)
.ValidateRequired(x => x.ShowGiftButton)
.ValidateRequired(x => x.AccpetedGiftTypes);
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property name 'AccpetedGiftTypes' contains a typo. It should be 'AcceptedGiftTypes' (missing 'c').

Suggested change
.ValidateRequired(x => x.AccpetedGiftTypes);
.ValidateRequired(x => x.AcceptedGiftTypes);

Copilot uses AI. Check for mistakes.

/// <summary>
/// Unique identifier of the story to delete
/// </summary>
public long StoryId { get; set; }
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent data type for StoryId. In EditStory.cs it's defined as 'int' but here it's 'long'. This should be consistent across all story-related classes.

Suggested change
public long StoryId { get; set; }
public int StoryId { get; set; }

Copilot uses AI. Check for mistakes.

/// <summary>
/// This object describes the types of gifts that can be gifted to a user or a chat.
/// </summary>
public class AccpetedGiftTypes
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class name 'AccpetedGiftTypes' contains a typo. It should be 'AcceptedGiftTypes' (missing 'c').

Suggested change
public class AccpetedGiftTypes
public class AcceptedGiftTypes

Copilot uses AI. Check for mistakes.

/// <summary>
/// Types of gifts accepted by the business account
/// </summary>
public AccpetedGiftTypes AccpetedGiftTypes { get; set; }
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both the property name and type 'AccpetedGiftTypes' contain a typo. They should be 'AcceptedGiftTypes' (missing 'c').

Suggested change
public AccpetedGiftTypes AccpetedGiftTypes { get; set; }
public AcceptedGiftTypes AcceptedGiftTypes { get; set; }

Copilot uses AI. Check for mistakes.

///
/// Requires the can_change_name business bot right.
/// </summary>
/// <param name="setBusinessAccountUsername">New first and last name for the business account</param>
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter documentation is incorrect. The method is for setting username, not first and last name. It should reference username instead.

Suggested change
/// <param name="setBusinessAccountUsername">New first and last name for the business account</param>
/// <param name="setBusinessAccountUsername">New username for the business account</param>

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v9 API support

1 participant