mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
add emoji field for dice
This commit is contained in:
@ -521,16 +521,19 @@ class Dice(JsonSerializable, Dictionaryable, JsonDeserializable):
|
||||
if (json_string is None): return None
|
||||
obj = cls.check_json(json_string)
|
||||
value = obj['value']
|
||||
return cls(value)
|
||||
emoji = obj['emoji']
|
||||
return cls(value, emoji)
|
||||
|
||||
def __init__(self, value):
|
||||
def __init__(self, value, emoji):
|
||||
self.value = value
|
||||
self.emoji = emoji
|
||||
|
||||
def to_json(self):
|
||||
return json.dumps(self.to_dic())
|
||||
|
||||
def to_dic(self):
|
||||
return {'value': self.value}
|
||||
return {'value': self.value,
|
||||
'emoji': self.emoji}
|
||||
|
||||
|
||||
class PhotoSize(JsonDeserializable):
|
||||
|
Reference in New Issue
Block a user