mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-01 05:04:51 +00:00
Pyrofork: Add message.content property
Signed-off-by: Yasir Aris <git@yasir.id>
This commit is contained in:
parent
e33a9d95df
commit
ea8ff2806f
1 changed files with 7 additions and 0 deletions
|
|
@ -424,6 +424,9 @@ class Message(Object, Update):
|
|||
link (``str``, *property*):
|
||||
Generate a link to this message, only for groups and channels.
|
||||
|
||||
content (``str``, *property*):
|
||||
The text or caption content of the message.
|
||||
|
||||
scheduled (``bool``, *optional*):
|
||||
Message is a scheduled message and still in schedule.
|
||||
|
||||
|
|
@ -1358,6 +1361,10 @@ class Message(Object, Update):
|
|||
else:
|
||||
return f"https://t.me/c/{utils.get_channel_id(self.chat.id)}/{self.id}"
|
||||
|
||||
@property
|
||||
def content(self) -> str:
|
||||
return self.text or self.caption or Str("").init([])
|
||||
|
||||
async def get_media_group(self) -> List["types.Message"]:
|
||||
"""Bound method *get_media_group* of :obj:`~pyrogram.types.Message`.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue