mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Several documentation enhancements and build warnings fixes
- Made the documentation even more friendly towards newbies. - Eased the usage of methods like get history which now set a default empty message for message actions and vice versa. - Fixed some docstring documentations too. - Updated the old normal docs/ to link back and forth RTD. - Fixed the version of the documentation, now auto-loaded.
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
from ..functions.messages import SaveDraftRequest
|
||||
from ..types import UpdateDraftMessage
|
||||
from ..types import UpdateDraftMessage, DraftMessage
|
||||
|
||||
|
||||
class Draft:
|
||||
"""
|
||||
Custom class that encapsulates a draft on the Telegram servers, providing
|
||||
an abstraction to change the message conveniently. The library will return
|
||||
instances of this class when calling `client.get_drafts()`.
|
||||
instances of this class when calling ``client.get_drafts()``.
|
||||
"""
|
||||
def __init__(self, client, peer, draft):
|
||||
self._client = client
|
||||
self._peer = peer
|
||||
if not draft:
|
||||
draft = DraftMessage('', None, None, None, None)
|
||||
|
||||
self.text = draft.message
|
||||
self.date = draft.date
|
||||
|
Reference in New Issue
Block a user