Revisit documentation, cross-references and unnecessary indents

This commit is contained in:
Lonami Exo
2018-06-20 11:05:33 +02:00
parent 1b7e7320a4
commit c85ba4accc
20 changed files with 651 additions and 522 deletions

View File

@@ -15,15 +15,15 @@ If you need to retrieve the bio, biography or about information for an user
you should use :tl:`GetFullUser`:
.. code-block:: python
.. code-block:: python
from telethon.tl.functions.users import GetFullUserRequest
from telethon.tl.functions.users import GetFullUserRequest
full = client(GetFullUserRequest(user))
# or even
full = client(GetFullUserRequest('username'))
full = client(GetFullUserRequest(user))
# or even
full = client(GetFullUserRequest('username'))
bio = full.about
bio = full.about
See :tl:`UserFull` to know what other fields you can access.
@@ -35,11 +35,11 @@ Updating your name and/or bio
The first name, last name and bio (about) can all be changed with the same
request. Omitted fields won't change after invoking :tl:`UpdateProfile`:
.. code-block:: python
.. code-block:: python
from telethon.tl.functions.account import UpdateProfileRequest
from telethon.tl.functions.account import UpdateProfileRequest
client(UpdateProfileRequest(about='This is a test from Telethon'))
client(UpdateProfileRequest(about='This is a test from Telethon'))
Updating your username
@@ -47,11 +47,11 @@ Updating your username
You need to use :tl:`account.UpdateUsername`:
.. code-block:: python
.. code-block:: python
from telethon.tl.functions.account import UpdateUsernameRequest
from telethon.tl.functions.account import UpdateUsernameRequest
client(UpdateUsernameRequest('new_username'))
client(UpdateUsernameRequest('new_username'))
Updating your profile photo
@@ -61,10 +61,10 @@ The easiest way is to upload a new file and use that as the profile photo
through :tl:`UploadProfilePhoto`:
.. code-block:: python
.. code-block:: python
from telethon.tl.functions.photos import UploadProfilePhotoRequest
from telethon.tl.functions.photos import UploadProfilePhotoRequest
client(UploadProfilePhotoRequest(
client.upload_file('/path/to/some/file')
))
client(UploadProfilePhotoRequest(
client.upload_file('/path/to/some/file')
))