Completely overhaul the documentation

This commit is contained in:
Lonami Exo
2019-05-09 12:24:37 +02:00
parent 10251f9782
commit 0a3d6106f0
75 changed files with 2410 additions and 2895 deletions

View File

@@ -33,11 +33,11 @@ class InlineBuilder:
May be ``True`` to indicate that the game will be sent.
buttons (`list`, `custom.Button <telethon.tl.custom.button.Button>`, :tl:`KeyboardButton`, optional):
Same as ``buttons`` for `client.send_message
Same as ``buttons`` for `client.send_message()
<telethon.client.messages.MessageMethods.send_message>`.
parse_mode (`str`, optional):
Same as ``parse_mode`` for `client.send_message
Same as ``parse_mode`` for `client.send_message()
<telethon.client.messageparse.MessageParseMethods.parse_mode>`.
id (`str`, optional):
@@ -119,7 +119,7 @@ class InlineBuilder:
Args:
file (`obj`, optional):
Same as ``file`` for `client.send_file
Same as ``file`` for `client.send_file()
<telethon.client.uploads.UploadMethods.send_file>`.
"""
try:
@@ -173,7 +173,7 @@ class InlineBuilder:
Args:
file (`obj`):
Same as ``file`` for `client.send_file
Same as ``file`` for `client.send_file()
<telethon.client.uploads.UploadMethods.send_file>`.
title (`str`, optional):

View File

@@ -784,6 +784,22 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC):
behave as if it clicked a button with said data. Note
that if the message does not have this data, it will
``raise DataInvalidError``.
Example:
.. code-block:: python
# Click the first button
message.click(0)
# Click some row/column
message.click(row, column)
# Click by text
message.click(text='👍')
# Click by data
message.click(data=b'payload')
"""
if not self._client:
return