Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c448bba
Update types.py
coder2020official Apr 12, 2025
805c78f
Add business account methods
coder2020official Apr 12, 2025
1d32718
Added AcceptedGiftTypes and set_business_account_gift_settings
coder2020official Apr 12, 2025
3e0f06a
Add get_business_account_star_balance
coder2020official Apr 12, 2025
af858de
Added transfer_business_account_stars
coder2020official Apr 12, 2025
c012a59
Added get_business_account_gifts, OwnedGiftRegular, OwnedGiftUnique, …
coder2020official Apr 12, 2025
3d238a4
Added convert_gift_to_stars
coder2020official Apr 12, 2025
817f2ad
Added upgrade_gift and transfer_gift methods
coder2020official Apr 12, 2025
b47c73f
Added InputStoryContent
coder2020official Apr 12, 2025
1713909
Stories
coder2020official Apr 12, 2025
1c08163
posting, editing, deleting stories(needs testing)
coder2020official Apr 12, 2025
b05d209
Replaced the field can_send_gift with the field accepted_gift_types …
coder2020official Apr 12, 2025
6fedece
Added unique_gift and gift
coder2020official Apr 12, 2025
e3d7f96
Added gift_premium_subscription
coder2020official Apr 12, 2025
f76cac8
Added premium_subscription_duration to TransactionPartnerUser
coder2020official Apr 12, 2025
0bd9133
Added transaction_type to TransactionPartnerUser
coder2020official Apr 12, 2025
950d7c6
Added paid_message_price_changed
coder2020official Apr 12, 2025
9fb4fdd
Added paid_star_count
coder2020official Apr 12, 2025
0d1e515
Added set_business_account_profile_photo and remove_business_account_…
coder2020official Apr 12, 2025
d63b07a
Fix issues with posting stories
coder2020official Apr 13, 2025
49684b5
Fix stories for async
coder2020official Apr 13, 2025
533b52c
Fix issues related with Bot api 9.0
coder2020official Apr 19, 2025
d4f5ead
Fix typehints
coder2020official Apr 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added paid_message_price_changed
  • Loading branch information
coder2020official committed Apr 12, 2025
commit 950d7c6da012cfee67db1c3651573d8e03b2340c
28 changes: 28 additions & 0 deletions telebot/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,9 @@ class Message(JsonDeserializable):
:param giveaway_completed: Optional. Service message: giveaway completed, without public winners
:type giveaway_completed: :class:`telebot.types.GiveawayCompleted`

:param paid_message_price_changed: Optional. Service message: the price for paid messages has changed in the chat
:type paid_message_price_changed: :class:`telebot.types.PaidMessagePriceChanged`

:param video_chat_scheduled: Optional. Service message: video chat scheduled
:type video_chat_scheduled: :class:`telebot.types.VideoChatScheduled`

Expand Down Expand Up @@ -1443,6 +1446,9 @@ def de_json(cls, json_string):
if 'unique_gift' in obj:
opts['unique_gift'] = UniqueGiftInfo.de_json(obj['unique_gift'])
content_type = 'unique_gift'
if 'paid_message_price_changed' in obj:
opts['paid_message_price_changed'] = PaidMessagePriceChanged.de_json(obj['paid_message_price_changed'])
content_type = 'paid_message_price_changed'

return cls(message_id, from_user, date, chat, content_type, opts, json_string)

Expand Down Expand Up @@ -1563,6 +1569,7 @@ def __init__(self, message_id, from_user, date, chat, content_type, options, jso
self.message_auto_delete_timer_changed: Optional[MessageAutoDeleteTimerChanged] = None
self.gift : Optional[GiftInfo] = None
self.unique_gift : Optional[UniqueGiftInfo] = None
self.paid_message_price_changed: Optional[PaidMessagePriceChanged] = None


for key in options:
Expand Down Expand Up @@ -12292,4 +12299,25 @@ def de_json(cls, json_string):
obj = cls.check_json(json_string)
obj['gift'] = UniqueGift.de_json(obj['gift'])
return cls(**obj)


class PaidMessagePriceChanged(JsonDeserializable):
"""
Describes a service message about a change in the price of paid messages within a chat.

Telegram documentation: https://core.telegram.org/bots/api#paidmessagepricechanged

:param paid_message_star_count: The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message
:type paid_message_star_count: :obj:`int`

:return: Instance of the class
:rtype: :class:`PaidMessagePriceChanged`
"""
def __init__(self, paid_message_star_count: int, **kwargs):
self.paid_message_star_count: int = paid_message_star_count
@classmethod
def de_json(cls, json_string):
if json_string is None: return None
obj = cls.check_json(json_string)
return cls(**obj)

3 changes: 0 additions & 3 deletions telebot/version.py

This file was deleted.