Fix several minor typos (#1603)

This commit is contained in:
Qwerty-Space 2020-10-18 20:11:59 +01:00 committed by GitHub
parent 4db51dff8a
commit d56b27e570
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 9 additions and 9 deletions

View File

@ -19,7 +19,7 @@ use these if possible.
# Getting information about yourself # Getting information about yourself
me = await client.get_me() me = await client.get_me()
# "me" is an User object. You can pretty-print # "me" is a user object. You can pretty-print
# any Telegram object with the "stringify" method: # any Telegram object with the "stringify" method:
print(me.stringify()) print(me.stringify())

View File

@ -289,7 +289,7 @@ applications"? Now do the same with the library. Use what applies:
# (These examples assume you are inside an "async def") # (These examples assume you are inside an "async def")
async with client: async with client:
# Does it have an username? Use it! # Does it have a username? Use it!
entity = await client.get_entity(username) entity = await client.get_entity(username)
# Do you have a conversation open with them? Get dialogs. # Do you have a conversation open with them? Get dialogs.

View File

@ -3806,7 +3806,7 @@ things with the ``InteractiveTelegramClient``:
- **Download** any message's media (photos, documents or even contacts!). - **Download** any message's media (photos, documents or even contacts!).
- **Receive message updates** as you talk (i.e., someone sent you a message). - **Receive message updates** as you talk (i.e., someone sent you a message).
It actually is an usable-enough client for your day by day. You could It actually is a usable-enough client for your day by day. You could
even add ``libnotify`` and pop, you're done! A great cli-client with even add ``libnotify`` and pop, you're done! A great cli-client with
desktop notifications. desktop notifications.

View File

@ -9,7 +9,7 @@ you may need when using Telethon. They are sorted by relevance and are not in
alphabetical order. alphabetical order.
You should use this page to learn about which methods are available, and You should use this page to learn about which methods are available, and
if you need an usage example or further description of the arguments, be if you need a usage example or further description of the arguments, be
sure to follow the links. sure to follow the links.
.. contents:: .. contents::

View File

@ -92,7 +92,7 @@ class AuthMethods:
# Starting as a bot account # Starting as a bot account
await client.start(bot_token=bot_token) await client.start(bot_token=bot_token)
# Starting as an user account # Starting as a user account
await client.start(phone) await client.start(phone)
# Please enter the code you received: 12345 # Please enter the code you received: 12345
# Please enter your password: ******* # Please enter your password: *******

View File

@ -406,7 +406,7 @@ class MessageMethods:
from_user (`entity`): from_user (`entity`):
Only messages from this user will be returned. Only messages from this user will be returned.
This parameter will be ignored if it is not an user. This parameter will be ignored if it is not a user.
wait_time (`int`): wait_time (`int`):
Wait time (in seconds) between different Wait time (in seconds) between different

View File

@ -1,6 +1,6 @@
""" """
Several extensions Python is missing, such as a proper class to handle a TCP Several extensions Python is missing, such as a proper class to handle a TCP
communication with support for cancelling the operation, and an utility class communication with support for cancelling the operation, and a utility class
to read arbitrary binary data in a more comfortable way, with int/strings/etc. to read arbitrary binary data in a more comfortable way, with int/strings/etc.
""" """
from .binaryreader import BinaryReader from .binaryreader import BinaryReader

View File

@ -1072,7 +1072,7 @@ def _rle_encode(string):
def _decode_telegram_base64(string): def _decode_telegram_base64(string):
""" """
Decodes an url-safe base64-encoded string into its bytes Decodes a url-safe base64-encoded string into its bytes
by first adding the stripped necessary padding characters. by first adding the stripped necessary padding characters.
This is the way Telegram shares binary data as strings, This is the way Telegram shares binary data as strings,

View File

@ -297,7 +297,7 @@ TYPES_EMPTY,400,The types field is empty
TYPE_CONSTRUCTOR_INVALID,,The type constructor is invalid TYPE_CONSTRUCTOR_INVALID,,The type constructor is invalid
UNKNOWN_METHOD,500,The method you tried to call cannot be called on non-CDN DCs UNKNOWN_METHOD,500,The method you tried to call cannot be called on non-CDN DCs
UNTIL_DATE_INVALID,400,That date cannot be specified in this request (try using None) UNTIL_DATE_INVALID,400,That date cannot be specified in this request (try using None)
URL_INVALID,400,The URL used was invalid (e.g. when answering a callback with an URL that's not t.me/yourbot or your game's URL) URL_INVALID,400,The URL used was invalid (e.g. when answering a callback with a URL that's not t.me/yourbot or your game's URL)
USERNAME_INVALID,400,"Nobody is using this username, or the username is unacceptable. If the latter, it must match r""[a-zA-Z][\w\d]{3,30}[a-zA-Z\d]""" USERNAME_INVALID,400,"Nobody is using this username, or the username is unacceptable. If the latter, it must match r""[a-zA-Z][\w\d]{3,30}[a-zA-Z\d]"""
USERNAME_NOT_MODIFIED,400,The username is not different from the current username USERNAME_NOT_MODIFIED,400,The username is not different from the current username
USERNAME_NOT_OCCUPIED,400,The username is not in use by anyone else yet USERNAME_NOT_OCCUPIED,400,The username is not in use by anyone else yet

1 name codes description
297 TYPE_CONSTRUCTOR_INVALID The type constructor is invalid
298 UNKNOWN_METHOD 500 The method you tried to call cannot be called on non-CDN DCs
299 UNTIL_DATE_INVALID 400 That date cannot be specified in this request (try using None)
300 URL_INVALID 400 The URL used was invalid (e.g. when answering a callback with an URL that's not t.me/yourbot or your game's URL) The URL used was invalid (e.g. when answering a callback with a URL that's not t.me/yourbot or your game's URL)
301 USERNAME_INVALID 400 Nobody is using this username, or the username is unacceptable. If the latter, it must match r"[a-zA-Z][\w\d]{3,30}[a-zA-Z\d]"
302 USERNAME_NOT_MODIFIED 400 The username is not different from the current username
303 USERNAME_NOT_OCCUPIED 400 The username is not in use by anyone else yet