Conversation
…th the field rights of the type BusinessBotRights in the class BusinessConnection
…messages as read on behalf of a business account.
…ages on behalf of a business account.
…first and last name of a managed business account.
…the username of a managed business account.
…io of a managed business account.
…countProfilePhoto, allowing bots to change the profile photo of a managed business account.
…ftSettings, allowing bots to change the privacy settings pertaining to incoming gifts in a managed business account.
…ce, allowing bots to check the current Telegram Star balance of a managed business account.
…fer Telegram Stars from the balance of a managed business account to their own balance for withdrawal.
…he method getBusinessAccountGifts, allowing bots to fetch the list of gifts owned by a managed business account.
…eceived by a managed business account to Telegram Stars.
…received by a managed business account to unique gifts.
… owned by a managed business account.
…epresenting the content of a story to post.
…yAreaTypeLocation, StoryAreaTypeSuggestedReaction, StoryAreaTypeLink, StoryAreaTypeWeather and StoryAreaTypeUniqueGift, describing clickable active areas on stories.
…f a managed business account.
…eviously posted on behalf of a managed business account.
…d previously posted on behalf of a managed business account.
…opColors, and UniqueGiftBackdrop to describe the properties of a unique gift.
…f the type AcceptedGiftTypes in the class ChatFullInfo.
…cribing a service message about a regular gift that was sent or received.
… Message, describing a service message about a unique gift that was sent or received.
…r a Telegram Premium subscription paid in Telegram Stars.
… the class TransactionPartnerUser
…ice_changed to the class Message, describing a service message about a price change for paid messages sent to the chat.
…number of Telegram Stars that were paid to send the message.
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the Java/Kotlin client to Telegram BOT API v9.0 by adding new business-account endpoints, gift/star models, story components, and mini-app storage fields, along with updating core message/chat classes, bumping the library version, and refreshing docs.
- Introduce new data models and methods for business accounts, gifts (regular & unique), stars, and stories
- Extend
MessageandChatFullInfoto handle gift-related service messages and accepted gift types - Bump version to 9.0.0 and update README for both English and Russian docs
Reviewed Changes
Copilot reviewed 62 out of 62 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| UniqueGiftModel.kt | Add model for unique gift metadata |
| UniqueGiftInfo.kt | Add service info wrapper for a unique gift |
| UniqueGiftBackdropColors.kt | Add unique gift backdrop color palette |
| UniqueGiftBackdrop.kt | Add unique gift backdrop model |
| UniqueGift.kt | Add top-level unique gift model |
| OwnedGifts.kt | Add container for a user’s owned gifts |
| OwnedGiftUnique.kt | Add class for a unique owned gift |
| OwnedGiftRegular.kt | Add builder-style class for a regular owned gift |
| OwnedGift.kt | Add base class for owned gifts |
| GiftInfo.kt | Add service info wrapper for a regular gift |
| AcceptedGiftTypes.kt | Add model describing which gift types a chat accepts |
| BusinessConnection.java | Replace deprecated can_reply with new rights field |
| BusinessBotRights.kt | Add rights model for business bots |
| PaidMessagePriceChanged.kt | Add model for paid message price-change service messages |
| Message.java | Extend with gift, unique_gift, paid_message_price_changed, paid_star_count |
| LocationAddress.kt | Add builder for address components in story areas |
| ChatFullInfo.java | Replace deprecated can_send_gift with acceptedGiftTypes |
| gradle.properties | Bump library version to 9.0.0 |
| README_RU.md | Update Russian README to v9.0 |
| README.md | Update English README to v9.0 |
Comments suppressed due to low confidence (1)
library/src/main/java/com/pengrad/telegrambot/model/gift/owned/OwnedGiftRegular.kt:7
- There are no unit tests covering the builder methods and JSON serialization of
OwnedGiftRegular. Consider adding tests to validate that eachapply-style setter and the overall serialization/deserialization behave as expected.
class OwnedGiftRegular private constructor(
library/src/main/java/com/pengrad/telegrambot/model/gift/owned/OwnedGiftRegular.kt
Outdated
Show resolved
Hide resolved
pengrad
approved these changes
Jun 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
This draft PR introduces support for the latest BOT API version (v9.0).
There are quite a few changes, so I'm working on implementing them incrementally.
I'm doing this in Kotlin, which I’m not very experienced with...any suggestions / corrections / explanations are very welcome (thanks!).
Business Accounts
Mini Apps
Gifts
Telegram Premium
General