Document custom.Message

This commit is contained in:
Lonami Exo
2018-06-02 12:52:38 +02:00
parent 5c76af34aa
commit f7222407de
6 changed files with 48 additions and 16 deletions
+15 -1
View File
@@ -66,6 +66,10 @@ class Message:
@property
def client(self):
"""
Returns the `telethon.telegram_client.TelegramClient` instance that
created this instance.
"""
return self._client
@property
@@ -176,6 +180,15 @@ class Message:
@property
def input_chat(self):
"""
This (:tl:`InputPeer`) is the input version of the chat where the
message was sent. Similarly to `input_sender`, this doesn't have
things like username or similar, but still useful in some cases.
Note that this might not be available if the library doesn't know
where the message came from, and it may fetch the dialogs to try
to find it in the worst case.
"""
if self._input_chat is None:
if self._chat is None:
try:
@@ -350,7 +363,8 @@ class Message:
@property
def reply_message(self):
"""
The :tl:`Message` that this message is replying to, or ``None``.
The `telethon.tl.custom.message.Message` that this message is replying
to, or ``None``.
Note that this will make a network call to fetch the message and
will later be cached.
+4
View File
@@ -22,6 +22,10 @@ class MessageButton:
@property
def client(self):
"""
Returns the `telethon.telegram_client.TelegramClient` instance that
created this instance.
"""
return self._client
@property