mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Update types.py
Sending stickers everytime have different file_id, so for detecting special stickers we need a unique parameter.
This commit is contained in:
parent
f42ec4fe0d
commit
49398f5c61
@ -2204,6 +2204,7 @@ class Sticker(JsonDeserializable):
|
|||||||
if (json_string is None): return None
|
if (json_string is None): return None
|
||||||
obj = cls.check_json(json_string)
|
obj = cls.check_json(json_string)
|
||||||
file_id = obj['file_id']
|
file_id = obj['file_id']
|
||||||
|
file_unique_id = obj['file_unique_id']
|
||||||
width = obj['width']
|
width = obj['width']
|
||||||
height = obj['height']
|
height = obj['height']
|
||||||
is_animated = obj['is_animated']
|
is_animated = obj['is_animated']
|
||||||
@ -2212,10 +2213,11 @@ class Sticker(JsonDeserializable):
|
|||||||
set_name = obj.get('set_name')
|
set_name = obj.get('set_name')
|
||||||
mask_position = MaskPosition.de_json(obj.get('mask_position'))
|
mask_position = MaskPosition.de_json(obj.get('mask_position'))
|
||||||
file_size = obj.get('file_size')
|
file_size = obj.get('file_size')
|
||||||
return cls(file_id, width, height, thumb, emoji, set_name, mask_position, file_size, is_animated)
|
return cls(file_id, file_unique_id, width, height, thumb, emoji, set_name, mask_position, file_size, is_animated)
|
||||||
|
|
||||||
def __init__(self, file_id, width, height, thumb, emoji, set_name, mask_position, file_size, is_animated):
|
def __init__(self, file_id, file_unique_id, width, height, thumb, emoji, set_name, mask_position, file_size, is_animated):
|
||||||
self.file_id = file_id
|
self.file_id = file_id
|
||||||
|
self.file_unique_id = file_unique_id
|
||||||
self.width = width
|
self.width = width
|
||||||
self.height = height
|
self.height = height
|
||||||
self.thumb = thumb
|
self.thumb = thumb
|
||||||
|
Loading…
Reference in New Issue
Block a user