mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Added the field has_media_spoiler to the class Message.
Added the field has_media_spoiler to the class Message.
This commit is contained in:
parent
4537b237c8
commit
9f5d9861a4
@ -812,6 +812,9 @@ class Message(JsonDeserializable):
|
|||||||
commands, etc. that appear in the caption
|
commands, etc. that appear in the caption
|
||||||
:type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
|
:type caption_entities: :obj:`list` of :class:`telebot.types.MessageEntity`
|
||||||
|
|
||||||
|
:param has_media_spoiler: Optional. True, if the message media is covered by a spoiler animation
|
||||||
|
:type has_media_spoiler: :obj:`bool`
|
||||||
|
|
||||||
:param contact: Optional. Message is a shared contact, information about the contact
|
:param contact: Optional. Message is a shared contact, information about the contact
|
||||||
:type contact: :class:`telebot.types.Contact`
|
:type contact: :class:`telebot.types.Contact`
|
||||||
|
|
||||||
@ -1110,6 +1113,8 @@ class Message(JsonDeserializable):
|
|||||||
if 'forum_topic_reopened' in obj:
|
if 'forum_topic_reopened' in obj:
|
||||||
opts['forum_topic_reopened'] = ForumTopicReopened.de_json(obj['forum_topic_reopened'])
|
opts['forum_topic_reopened'] = ForumTopicReopened.de_json(obj['forum_topic_reopened'])
|
||||||
content_type = 'forum_topic_reopened'
|
content_type = 'forum_topic_reopened'
|
||||||
|
if 'has_media_spoiler' in obj:
|
||||||
|
opts['has_media_spoiler'] = obj['has_media_spoiler']
|
||||||
return cls(message_id, from_user, date, chat, content_type, opts, json_string)
|
return cls(message_id, from_user, date, chat, content_type, opts, json_string)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -1200,6 +1205,7 @@ class Message(JsonDeserializable):
|
|||||||
self.forum_topic_created: Optional[ForumTopicCreated] = None
|
self.forum_topic_created: Optional[ForumTopicCreated] = None
|
||||||
self.forum_topic_closed: Optional[ForumTopicClosed] = None
|
self.forum_topic_closed: Optional[ForumTopicClosed] = None
|
||||||
self.forum_topic_reopened: Optional[ForumTopicReopened] = None
|
self.forum_topic_reopened: Optional[ForumTopicReopened] = None
|
||||||
|
self.has_media_spoiler: Optional[bool] = None
|
||||||
for key in options:
|
for key in options:
|
||||||
setattr(self, key, options[key])
|
setattr(self, key, options[key])
|
||||||
self.json = json_string
|
self.json = json_string
|
||||||
|
Loading…
Reference in New Issue
Block a user