mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Added web_page attribute to Message object
This commit is contained in:
parent
3b3fec8293
commit
61f2d7c968
@ -327,6 +327,7 @@ def parse_messages(
|
|||||||
video_note = None
|
video_note = None
|
||||||
sticker = None
|
sticker = None
|
||||||
document = None
|
document = None
|
||||||
|
web_page = None
|
||||||
|
|
||||||
media = message.media
|
media = message.media
|
||||||
|
|
||||||
@ -574,6 +575,8 @@ def parse_messages(
|
|||||||
file_size=doc.size,
|
file_size=doc.size,
|
||||||
date=doc.date
|
date=doc.date
|
||||||
)
|
)
|
||||||
|
elif isinstance(media, types.MessageMediaWebPage):
|
||||||
|
web_page = True
|
||||||
else:
|
else:
|
||||||
media = None
|
media = None
|
||||||
|
|
||||||
@ -621,6 +624,7 @@ def parse_messages(
|
|||||||
video_note=video_note,
|
video_note=video_note,
|
||||||
sticker=sticker,
|
sticker=sticker,
|
||||||
document=document,
|
document=document,
|
||||||
|
web_page=web_page,
|
||||||
views=message.views,
|
views=message.views,
|
||||||
via_bot=parse_user(users.get(message.via_bot_id, None)),
|
via_bot=parse_user(users.get(message.via_bot_id, None)),
|
||||||
outgoing=message.out,
|
outgoing=message.out,
|
||||||
|
@ -134,6 +134,9 @@ class Message(Object):
|
|||||||
venue (:obj:`Venue <pyrogram.Venue>`, *optional*):
|
venue (:obj:`Venue <pyrogram.Venue>`, *optional*):
|
||||||
Message is a venue, information about the venue.
|
Message is a venue, information about the venue.
|
||||||
|
|
||||||
|
web_page (``bool``, *optional*):
|
||||||
|
Message was sent with a webpage preview.
|
||||||
|
|
||||||
new_chat_members (List of :obj:`User <pyrogram.User>`, *optional*):
|
new_chat_members (List of :obj:`User <pyrogram.User>`, *optional*):
|
||||||
New members that were added to the group or supergroup and information about them
|
New members that were added to the group or supergroup and information about them
|
||||||
(the bot itself may be one of these members).
|
(the bot itself may be one of these members).
|
||||||
@ -246,6 +249,7 @@ class Message(Object):
|
|||||||
contact=None,
|
contact=None,
|
||||||
location=None,
|
location=None,
|
||||||
venue=None,
|
venue=None,
|
||||||
|
web_page=None,
|
||||||
new_chat_members: list = None,
|
new_chat_members: list = None,
|
||||||
left_chat_member=None,
|
left_chat_member=None,
|
||||||
new_chat_title: str = None,
|
new_chat_title: str = None,
|
||||||
@ -297,6 +301,7 @@ class Message(Object):
|
|||||||
self.contact = contact # flags.22?Contact
|
self.contact = contact # flags.22?Contact
|
||||||
self.location = location # flags.23?Location
|
self.location = location # flags.23?Location
|
||||||
self.venue = venue # flags.24?Venue
|
self.venue = venue # flags.24?Venue
|
||||||
|
self.web_page = web_page
|
||||||
self.new_chat_members = new_chat_members # flags.25?Vector<User>
|
self.new_chat_members = new_chat_members # flags.25?Vector<User>
|
||||||
self.left_chat_member = left_chat_member # flags.26?User
|
self.left_chat_member = left_chat_member # flags.26?User
|
||||||
self.new_chat_title = new_chat_title # flags.27?string
|
self.new_chat_title = new_chat_title # flags.27?string
|
||||||
|
Loading…
Reference in New Issue
Block a user