Add a custom role for TL references and make use of it

This commit is contained in:
Lonami Exo
2018-03-23 21:40:24 +01:00
parent c6d821910e
commit 43c6896481
12 changed files with 212 additions and 134 deletions

View File

@@ -10,13 +10,13 @@ class Dialog:
return instances of this class when calling :meth:`.get_dialogs()`.
Args:
dialog (:obj:`Dialog`):
dialog (:tl:`Dialog`):
The original ``Dialog`` instance.
pinned (:obj:`bool`):
Whether this dialog is pinned to the top or not.
message (:obj:`Message`):
message (:tl:`Message`):
The last message sent on this dialog. Note that this member
will not be updated when new messages arrive, it's only set
on creation of the instance.
@@ -27,7 +27,7 @@ class Dialog:
entity (:obj:`entity`):
The entity that belongs to this dialog (user, chat or channel).
input_entity (:obj:`InputPeer`):
input_entity (:tl:`InputPeer`):
Input version of the entity.
id (:obj:`int`):

View File

@@ -128,7 +128,7 @@ class Draft:
def send(self, clear=True, parse_mode='md'):
"""
Sends the contents of this draft to the dialog. This is just a
wrapper around send_message(dialog.input_entity, *args, **kwargs).
wrapper around ``send_message(dialog.input_entity, *args, **kwargs)``.
"""
self._client.send_message(self._peer, self.text,
reply_to=self.reply_to_msg_id,