mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 21:38:04 +00:00
Add Message.empty field
This commit is contained in:
parent
f8844d60ab
commit
32a09ffc4c
@ -751,7 +751,7 @@ def parse_messages(
|
|||||||
except MessageIdsEmpty:
|
except MessageIdsEmpty:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
m = pyrogram_types.Message(message_id=message.id, client=proxy(client))
|
m = pyrogram_types.Message(message_id=message.id, client=proxy(client), empty=True)
|
||||||
|
|
||||||
parsed_messages.append(m)
|
parsed_messages.append(m)
|
||||||
|
|
||||||
|
@ -58,6 +58,10 @@ class Message(Object):
|
|||||||
mentioned (``bool``, *optional*):
|
mentioned (``bool``, *optional*):
|
||||||
The message contains a mention.
|
The message contains a mention.
|
||||||
|
|
||||||
|
empty (``bool``, *optional*):
|
||||||
|
The message is empty.
|
||||||
|
A message can be empty in case it was deleted or you tried to retrieve a message that doesn't exist yet.
|
||||||
|
|
||||||
edit_date (``int``, *optional*):
|
edit_date (``int``, *optional*):
|
||||||
Date the message was last edited in Unix time.
|
Date the message was last edited in Unix time.
|
||||||
|
|
||||||
@ -210,6 +214,7 @@ class Message(Object):
|
|||||||
forward_date: int = None,
|
forward_date: int = None,
|
||||||
reply_to_message=None,
|
reply_to_message=None,
|
||||||
mentioned=None,
|
mentioned=None,
|
||||||
|
empty=None,
|
||||||
edit_date: int = None,
|
edit_date: int = None,
|
||||||
media_group_id: str = None,
|
media_group_id: str = None,
|
||||||
author_signature: str = None,
|
author_signature: str = None,
|
||||||
@ -258,6 +263,7 @@ class Message(Object):
|
|||||||
self.forward_date = forward_date # flags.5?int
|
self.forward_date = forward_date # flags.5?int
|
||||||
self.reply_to_message = reply_to_message # flags.6?Message
|
self.reply_to_message = reply_to_message # flags.6?Message
|
||||||
self.mentioned = mentioned
|
self.mentioned = mentioned
|
||||||
|
self.empty = empty
|
||||||
self.edit_date = edit_date # flags.7?int
|
self.edit_date = edit_date # flags.7?int
|
||||||
self.media_group_id = media_group_id # flags.8?string
|
self.media_group_id = media_group_id # flags.8?string
|
||||||
self.author_signature = author_signature # flags.9?string
|
self.author_signature = author_signature # flags.9?string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user