Skip to content

Commit 9d72040

Browse files
Added the field rarity to the class UniqueGiftModel. Added the field is_burned to the class UniqueGift.
1 parent 0249aef commit 9d72040

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

telebot/types.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12032,6 +12032,9 @@ class UniqueGift(JsonDeserializable):
1203212032
:param is_premium: Optional. True, if the gift can only be purchased by Telegram Premium subscribers
1203312033
:type is_premium: :obj:`bool`
1203412034

12035+
:param is_burned: Optional. True, if the gift was used to craft another gift and isn't available anymore
12036+
:type is_burned: :obj:`bool`
12037+
1203512038
:param colors: Optional. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only
1203612039
:type colors: :class:`UniqueGiftColors`
1203712040
:param publisher_chat: Optional. Information about the chat that published the gift
@@ -12040,7 +12043,8 @@ class UniqueGift(JsonDeserializable):
1204012043
:return: Instance of the class
1204112044
:rtype: :class:`UniqueGift`
1204212045
"""
12043-
def __init__(self, base_name, name, number, model, symbol, backdrop, gift_id, publisher_chat=None, is_from_blockchain=None, is_premium=None, colors=None, **kwargs):
12046+
def __init__(self, base_name, name, number, model, symbol, backdrop, gift_id, publisher_chat=None, is_from_blockchain=None, is_premium=None, colors=None,
12047+
is_burned=None, **kwargs):
1204412048
self.base_name: str = base_name
1204512049
self.name: str = name
1204612050
self.number: int = number
@@ -12052,6 +12056,7 @@ def __init__(self, base_name, name, number, model, symbol, backdrop, gift_id, pu
1205212056
self.is_premium: Optional[bool] = is_premium
1205312057
self.colors: Optional[UniqueGiftColors] = colors
1205412058
self.publisher_chat: Optional[Chat] = publisher_chat
12059+
self.is_burned: Optional[bool] = is_burned
1205512060

1205612061
@classmethod
1205712062
def de_json(cls, json_string):
@@ -12082,14 +12087,18 @@ class UniqueGiftModel(JsonDeserializable):
1208212087
:param rarity_per_mille: The number of unique gifts that receive this model for every 1000 gifts upgraded
1208312088
:type rarity_per_mille: :obj:`int`
1208412089

12090+
:param rarity: Optional. Rarity of the model if it is a crafted model. Currently, can be “uncommon”, “rare”, “epic”, or “legendary”.
12091+
:type rarity: :obj:`str`
12092+
1208512093
:return: Instance of the class
1208612094
:rtype: :class:`UniqueGiftModel`
1208712095

1208812096
"""
12089-
def __init__(self, name, sticker, rarity_per_mille, **kwargs):
12097+
def __init__(self, name, sticker, rarity_per_mille, rarity=None, **kwargs):
1209012098
self.name: str = name
1209112099
self.sticker: Sticker = sticker
1209212100
self.rarity_per_mille: int = rarity_per_mille
12101+
self.rarity: Optional[str] = rarity
1209312102

1209412103
@classmethod
1209512104
def de_json(cls, json_string):

0 commit comments

Comments
 (0)