This commit is contained in:
Lonami Exo 2018-02-22 14:13:40 +01:00
parent 7fea4e265f
commit 56b7ed4e77
2 changed files with 4 additions and 4 deletions

View File

@ -551,7 +551,7 @@ class TelegramClient(TelegramBareClient):
Returns: Returns:
A list of custom ``Draft`` objects that are easy to work with: A list of custom ``Draft`` objects that are easy to work with:
You can call :meth:`draft.set_message('text')` to change the message, You can call ``draft.set_message('text')`` to change the message,
or delete it through :meth:`draft.delete()`. or delete it through :meth:`draft.delete()`.
""" """
response = self(GetAllDraftsRequest()) response = self(GetAllDraftsRequest())

View File

@ -42,7 +42,7 @@ class Draft:
""" """
Changes the draft message on the Telegram servers. The changes are Changes the draft message on the Telegram servers. The changes are
reflected in this object. Changing only individual attributes like for reflected in this object. Changing only individual attributes like for
example the `reply_to_msg_id` should be done by providing the current example the ``reply_to_msg_id`` should be done by providing the current
values of this object, like so: values of this object, like so:
draft.set_message( draft.set_message(
@ -56,7 +56,7 @@ class Draft:
:param bool no_webpage: Whether to attach a web page preview :param bool no_webpage: Whether to attach a web page preview
:param int reply_to_msg_id: Message id to reply to :param int reply_to_msg_id: Message id to reply to
:param list entities: A list of formatting entities :param list entities: A list of formatting entities
:return bool: `True` on success :return bool: ``True`` on success
""" """
result = self._client(SaveDraftRequest( result = self._client(SaveDraftRequest(
peer=self._peer, peer=self._peer,
@ -77,6 +77,6 @@ class Draft:
def delete(self): def delete(self):
""" """
Deletes this draft Deletes this draft
:return bool: `True` on success :return bool: ``True`` on success
""" """
return self.set_message(text='') return self.set_message(text='')