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
|
||||
obj = cls.check_json(json_string)
|
||||
file_id = obj['file_id']
|
||||
file_unique_id = obj['file_unique_id']
|
||||
width = obj['width']
|
||||
height = obj['height']
|
||||
is_animated = obj['is_animated']
|
||||
@ -2212,10 +2213,11 @@ class Sticker(JsonDeserializable):
|
||||
set_name = obj.get('set_name')
|
||||
mask_position = MaskPosition.de_json(obj.get('mask_position'))
|
||||
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_unique_id = file_unique_id
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.thumb = thumb
|
||||
|
Loading…
Reference in New Issue
Block a user