mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Expand docs on migration guide
This commit is contained in:
@@ -384,6 +384,8 @@ class Client:
|
||||
|
||||
:param file:
|
||||
The output file path or :term:`file-like object`.
|
||||
Note that the extension is not automatically added to the path.
|
||||
You can get the file extension with :attr:`telethon.types.File.ext`.
|
||||
|
||||
.. rubric:: Example
|
||||
|
||||
@@ -1020,8 +1022,8 @@ class Client:
|
||||
async def send_message(
|
||||
self,
|
||||
chat: ChatLike,
|
||||
*,
|
||||
text: Optional[str] = None,
|
||||
*,
|
||||
markdown: Optional[str] = None,
|
||||
html: Optional[str] = None,
|
||||
link_preview: Optional[bool] = None,
|
||||
@@ -1046,7 +1048,7 @@ class Client:
|
||||
return await send_message(
|
||||
self,
|
||||
chat,
|
||||
text=text,
|
||||
text,
|
||||
markdown=markdown,
|
||||
html=html,
|
||||
link_preview=link_preview,
|
||||
|
@@ -273,7 +273,7 @@ async def upload(
|
||||
|
||||
|
||||
async def iter_download(self: Client) -> None:
|
||||
pass
|
||||
raise NotImplementedError
|
||||
# result = self(
|
||||
# functions.upload.get_file(
|
||||
# precise=False,
|
||||
@@ -291,4 +291,4 @@ async def iter_download(self: Client) -> None:
|
||||
|
||||
|
||||
async def download(self: Client, media: MediaLike, file: OutFileLike) -> None:
|
||||
pass
|
||||
raise NotImplementedError
|
||||
|
@@ -38,8 +38,8 @@ def parse_message(
|
||||
async def send_message(
|
||||
self: Client,
|
||||
chat: ChatLike,
|
||||
*,
|
||||
text: Optional[str] = None,
|
||||
*,
|
||||
markdown: Optional[str] = None,
|
||||
html: Optional[str] = None,
|
||||
link_preview: Optional[bool] = None,
|
||||
|
@@ -295,5 +295,9 @@ class File(metaclass=NoPublicConstructor):
|
||||
raw=None,
|
||||
)
|
||||
|
||||
@property
|
||||
def ext(self):
|
||||
raise NotImplementedError
|
||||
|
||||
async def _read(self, n: int) -> bytes:
|
||||
raise NotImplementedError
|
||||
|
@@ -33,11 +33,11 @@ class Message(metaclass=NoPublicConstructor):
|
||||
return getattr(self._raw, "message", None)
|
||||
|
||||
@property
|
||||
def html_text(self) -> Optional[str]:
|
||||
def text_html(self) -> Optional[str]:
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def markdown_text(self) -> Optional[str]:
|
||||
def text_markdown(self) -> Optional[str]:
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
|
Reference in New Issue
Block a user