-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Bot API 9.3 #2539
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 9.3 #2539
Conversation
…ed to determine whether forum topic mode is enabled for the bot in private chats.
…reamed to a user while being generated.
…ass Message for messages in private chats with forum topic mode enabled.
…s in some methods
…_currency and last_resale_amount in the class UniqueGiftInfo.
…mited_upgradable and exclude_limited_non_upgradable in the method getBusinessAccountGifts.
…o.origin for messages about the upgrade of a gift that was purchased after it was sent. Added the value “offer” as a possible value of UniqueGiftInfo.origin for messages about the purchase of a gift through a purchase offer.
…AccountGifts, to filter out gifts that were assigned from the TON blockchain.
…a user's name, replies to messages and link previews based on a unique gift.
…e field unique_gift_number to the classes GiftInfo and OwnedGiftRegular.
…different business accounts they manage.
|
@Badiboy happy new year |
|
Got it... Will work on, but bot so fast. |
| :type message_id: :obj:`int` | ||
|
|
||
| :param message_thread_id: Optional. Unique identifier of a message thread to which the message belongs; for supergroups only | ||
| :param message_thread_id: Optional. Unique identifier of a message thread to which the message belongs; for supergroups and private chats only |
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.
Need to process this parameter manually in de_json.
| :type forward_origin: :class:`telebot.types.MessageOrigin` | ||
|
|
||
| :param is_topic_message: Optional. True, if the message is sent to a forum topic | ||
| :param is_topic_message: Optional. True, if the message is sent to a topic in a forum supergroup or a private chat with the bot |
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.
Need to process this parameter manually in de_json.
telebot/apihelper.py
Outdated
| payload['exclude_unique'] = exclude_unique | ||
| if sort_by_price is not None: | ||
| payload['sort_by_price'] = sort_by_price | ||
| if offset is not None: |
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.
use an empty string to get the first chunk of results
I do not know how TG will process absence of this parameter. May be pass "" is offset is None?
| payload['exclude_unique'] = exclude_unique | ||
| if sort_by_price is not None: | ||
| payload['sort_by_price'] = sort_by_price | ||
| if offset is not None: |
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.
use an empty string to get the first chunk of results
I do not know how TG will process absence of this parameter. May be pass "" is offset is None?
| if sort_by_price is not None: | ||
| payload['sort_by_price'] = sort_by_price | ||
| if offset is not None: | ||
| payload['offset'] = offset |
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.
use an empty string to get the first chunk of results
I do not know how TG will process absence of this parameter. May be pass "" is offset is None?
telebot/types.py
Outdated
| obj['symbol'] = UniqueGiftSymbol.de_json(obj['symbol']) | ||
| obj['backdrop'] = UniqueGiftBackdrop.de_json(obj['backdrop']) | ||
| obj['gift_id'] = obj['gift_id'] | ||
| if 'is_from_blockchain' in obj: |
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.
if 'is_from_blockchain' in obj: obj['is_from_blockchain'] = obj['is_from_blockchain']
Don't need this.
telebot/types.py
Outdated
| if json_string is None: return None | ||
| obj = cls.check_json(json_string) | ||
| obj['sticker'] = Sticker.de_json(obj['sticker']) | ||
| if 'personal_total_count' in obj: |
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.
if 'personal_total_count' in obj: obj['personal_total_count'] = obj['personal_total_count'] if 'personal_remaining_count' in obj: obj['personal_remaining_count'] = obj['personal_remaining_count']
Don't need this.
telebot/types.py
Outdated
| if 'personal_remaining_count' in obj: | ||
| obj['personal_remaining_count'] = obj['personal_remaining_count'] | ||
|
|
||
| if 'is_premium' in obj: |
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.
if 'is_premium' in obj:
obj['is_premium'] = obj['is_premium']
Don't need this.
telebot/types.py
Outdated
| obj['gift_id'] = obj['gift_id'] | ||
| if 'is_from_blockchain' in obj: | ||
| obj['is_from_blockchain'] = obj['is_from_blockchain'] | ||
| if 'is_premium' in obj: |
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.
if 'is_premium' in obj: obj['is_premium'] = obj['is_premium']
Don't need this.
| self.limited_gifts: bool = limited_gifts | ||
| self.unique_gifts: bool = unique_gifts | ||
| self.premium_subscription: bool = premium_subscription | ||
| def __init__(self, unlimited_gifts: Optional[bool]=None, limited_gifts: Optional[bool]=None, |
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.
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.
I haven't had an opportunity to test, but was cautious

December 31, 2025
Bot API 9.3
Topics in private chats
Gifts
Miscellaneous