Create a default module to use as a sentinel value

This looks better in the documentation than utils.Default,
cleans the utils with specific stuff like this, and users
may use it more easily.
This commit is contained in:
Lonami Exo
2018-10-05 14:20:50 +02:00
parent 0fcc2e5e52
commit d392939018
8 changed files with 26 additions and 29 deletions

View File

@@ -3,9 +3,10 @@ import datetime
from .. import TLObject
from ..functions.messages import SaveDraftRequest
from ..types import UpdateDraftMessage, DraftMessage
from ... import default
from ...errors import RPCError
from ...extensions import markdown
from ...utils import Default, get_peer_id, get_input_peer
from ...utils import get_peer_id, get_input_peer
class Draft:
@@ -116,7 +117,7 @@ class Draft:
return not self._text
async def set_message(
self, text=None, reply_to=0, parse_mode=Default,
self, text=None, reply_to=0, parse_mode=default,
link_preview=None):
"""
Changes the draft message on the Telegram servers. The changes are
@@ -163,7 +164,7 @@ class Draft:
return result
async def send(self, clear=True, parse_mode=Default):
async def send(self, clear=True, parse_mode=default):
"""
Sends the contents of this draft to the dialog. This is just a
wrapper around ``send_message(dialog.input_entity, *args, **kwargs)``.