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