mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-11-10 02:50:36 +00:00
Revert d392939 and use empty tuple as a sentinel value
This commit is contained in:
@@ -3,7 +3,6 @@ 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 get_peer_id, get_input_peer
|
||||
@@ -117,7 +116,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=(),
|
||||
link_preview=None):
|
||||
"""
|
||||
Changes the draft message on the Telegram servers. The changes are
|
||||
@@ -164,7 +163,7 @@ class Draft:
|
||||
|
||||
return result
|
||||
|
||||
async def send(self, clear=True, parse_mode=default):
|
||||
async def send(self, clear=True, parse_mode=()):
|
||||
"""
|
||||
Sends the contents of this draft to the dialog. This is just a
|
||||
wrapper around ``send_message(dialog.input_entity, *args, **kwargs)``.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import hashlib
|
||||
|
||||
from .. import functions, types
|
||||
from ... import default, utils
|
||||
from ... import utils
|
||||
|
||||
|
||||
class InlineBuilder:
|
||||
@@ -54,7 +54,7 @@ class InlineBuilder:
|
||||
async def article(
|
||||
self, title, description=None,
|
||||
*, url=None, thumb=None, content=None,
|
||||
id=None, text=None, parse_mode=default, link_preview=True,
|
||||
id=None, text=None, parse_mode=(), link_preview=True,
|
||||
geo=None, period=60, contact=None, game=False, buttons=None
|
||||
):
|
||||
"""
|
||||
@@ -104,7 +104,7 @@ class InlineBuilder:
|
||||
|
||||
async def photo(
|
||||
self, file, *, id=None,
|
||||
text=None, parse_mode=default, link_preview=True,
|
||||
text=None, parse_mode=(), link_preview=True,
|
||||
geo=None, period=60, contact=None, game=False, buttons=None
|
||||
):
|
||||
"""
|
||||
@@ -143,7 +143,7 @@ class InlineBuilder:
|
||||
self, file, title=None, *, description=None, type=None,
|
||||
mime_type=None, attributes=None, force_document=False,
|
||||
voice_note=False, video_note=False, use_cache=True, id=None,
|
||||
text=None, parse_mode=default, link_preview=True,
|
||||
text=None, parse_mode=(), link_preview=True,
|
||||
geo=None, period=60, contact=None, game=False, buttons=None
|
||||
):
|
||||
"""
|
||||
@@ -218,7 +218,7 @@ class InlineBuilder:
|
||||
|
||||
async def game(
|
||||
self, short_name, *, id=None,
|
||||
text=None, parse_mode=default, link_preview=True,
|
||||
text=None, parse_mode=(), link_preview=True,
|
||||
geo=None, period=60, contact=None, game=False, buttons=None
|
||||
):
|
||||
"""
|
||||
@@ -246,7 +246,7 @@ class InlineBuilder:
|
||||
|
||||
async def _message(
|
||||
self, *,
|
||||
text=None, parse_mode=default, link_preview=True,
|
||||
text=None, parse_mode=(), link_preview=True,
|
||||
geo=None, period=60, contact=None, game=False, buttons=None
|
||||
):
|
||||
if sum(1 for x in (text, geo, contact, game) if x) != 1:
|
||||
|
||||
Reference in New Issue
Block a user