mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 10:53:44 +03:00
Minor documentation and type hint updates
This commit is contained in:
parent
4bf85d9e8e
commit
cbcbda5276
|
@ -16,7 +16,7 @@ class BotMethods:
|
|||
offset: str = None,
|
||||
geo_point: 'types.GeoPoint' = None) -> custom.InlineResults:
|
||||
"""
|
||||
Makes an inline query to the specified bot (e.g. ``@vote New Poll``).
|
||||
Makes an inline query to the specified bot (``@vote New Poll``).
|
||||
|
||||
Arguments
|
||||
bot (`entity`):
|
||||
|
|
|
@ -968,11 +968,11 @@ class ChatMethods:
|
|||
from datetime import timedelta
|
||||
|
||||
# Kicking `user` from `chat` for 1 minute
|
||||
client.edit_permission(chat, user, timedelta(minutes=1),
|
||||
client.edit_permissions(chat, user, timedelta(minutes=1),
|
||||
view_messages=False)
|
||||
|
||||
# Banning `user` from `chat` forever
|
||||
client.edit_permission(chat, user, view_messages=False)
|
||||
client.edit_permissions(chat, user, view_messages=False)
|
||||
"""
|
||||
entity = await self.get_input_entity(entity)
|
||||
if not isinstance(entity, types.InputPeerChannel):
|
||||
|
|
|
@ -273,7 +273,7 @@ class DownloadMethods:
|
|||
message: 'hints.MessageLike',
|
||||
file: 'hints.FileLike' = None,
|
||||
*,
|
||||
thumb: 'hints.FileLike' = None,
|
||||
thumb: 'typing.Union[int, types.TypePhotoSize]' = None,
|
||||
progress_callback: 'hints.ProgressCallback' = None) -> typing.Optional[typing.Union[str, bytes]]:
|
||||
"""
|
||||
Downloads the given media from a message object.
|
||||
|
|
|
@ -521,7 +521,7 @@ class MessageMethods:
|
|||
reply_to: 'typing.Union[int, types.Message]' = None,
|
||||
parse_mode: typing.Optional[str] = (),
|
||||
link_preview: bool = True,
|
||||
file: 'hints.FileLike' = None,
|
||||
file: 'typing.Union[hints.FileLike, typing.Sequence[hints.FileLike]]' = None,
|
||||
force_document: bool = False,
|
||||
clear_draft: bool = False,
|
||||
buttons: 'hints.MarkupLike' = None,
|
||||
|
|
|
@ -166,7 +166,7 @@ class UserMethods:
|
|||
|
||||
async def is_user_authorized(self: 'TelegramClient') -> bool:
|
||||
"""
|
||||
Returns `True` if the user is authorized (i.e. has logged in).
|
||||
Returns `True` if the user is authorized (logged in).
|
||||
|
||||
Example
|
||||
.. code-block:: python
|
||||
|
|
Loading…
Reference in New Issue
Block a user