-
-
Notifications
You must be signed in to change notification settings - Fork 382
BOT API v9.0 #424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
BOT API v9.0 #424
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.
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 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
Message
andChatFullInfo
to 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(
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