mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-03-06 20:25:52 +03:00
Fix and update links in the documentation
This commit is contained in:
parent
fbf7f75b00
commit
5ac88f764d
|
@ -104,7 +104,7 @@ class DownloadMethods(UserMethods):
|
|||
``cryptg`` (through ``pip install cryptg``) so that decrypting the
|
||||
received data is done in C instead of Python (much faster).
|
||||
|
||||
message (:tl:`Message` | :tl:`Media`):
|
||||
message (`Message <telethon.tl.custom.message.Message>` | :tl:`Media`):
|
||||
The media or message containing the media that will be downloaded.
|
||||
|
||||
file (`str` | `file`, optional):
|
||||
|
|
|
@ -349,8 +349,8 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
|
|||
specified it makes sense that it should return the entirety of it.
|
||||
|
||||
If `ids` is present in the *named* arguments and is not a list,
|
||||
a single :tl:`Message` will be returned for convenience instead
|
||||
of a list.
|
||||
a single `Message <telethon.tl.custom.message.Message>` will be
|
||||
returned for convenience instead of a list.
|
||||
"""
|
||||
total = [0]
|
||||
kwargs['_total'] = total
|
||||
|
@ -397,7 +397,7 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
|
|||
entity (`entity`):
|
||||
To who will it be sent.
|
||||
|
||||
message (`str` | :tl:`Message`):
|
||||
message (`str` | `Message <telethon.tl.custom.message.Message>`):
|
||||
The message to be sent, or another message object to resend.
|
||||
|
||||
The maximum length for a message is 35,000 bytes or 4,096
|
||||
|
@ -405,13 +405,15 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
|
|||
and you should slice them manually if the text to send is
|
||||
longer than said length.
|
||||
|
||||
reply_to (`int` | :tl:`Message`, optional):
|
||||
reply_to (`int` | `Message <telethon.tl.custom.message.Message>`, optional):
|
||||
Whether to reply to a message or not. If an integer is provided,
|
||||
it should be the ID of the message that it should reply to.
|
||||
|
||||
parse_mode (`object`, optional):
|
||||
See the `TelegramClient.parse_mode` property for allowed
|
||||
values. Markdown parsing will be used by default.
|
||||
See the `TelegramClient.parse_mode
|
||||
<telethon.client.messageparse.MessageParseMethods.parse_mode>`
|
||||
property for allowed values. Markdown parsing will be used by
|
||||
default.
|
||||
|
||||
link_preview (`bool`, optional):
|
||||
Should the link preview be shown?
|
||||
|
@ -510,10 +512,9 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
|
|||
|
||||
result = await self(request)
|
||||
if isinstance(result, types.UpdateShortSentMessage):
|
||||
to_id, cls = utils.resolve_id(utils.get_peer_id(entity))
|
||||
message = types.Message(
|
||||
id=result.id,
|
||||
to_id=cls(to_id),
|
||||
to_id=utils.get_peer(entity),
|
||||
message=message,
|
||||
date=result.date,
|
||||
out=result.out,
|
||||
|
@ -535,7 +536,7 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
|
|||
entity (`entity`):
|
||||
To which entity the message(s) will be forwarded.
|
||||
|
||||
messages (`list` | `int` | :tl:`Message`):
|
||||
messages (`list` | `int` | `Message <telethon.tl.custom.message.Message>`):
|
||||
The message(s) to forward, or their integer IDs.
|
||||
|
||||
from_peer (`entity`):
|
||||
|
@ -617,24 +618,28 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
|
|||
Edits the given message ID (to change its contents or disable preview).
|
||||
|
||||
Args:
|
||||
entity (`entity` | :tl:`Message`):
|
||||
entity (`entity` | `Message <telethon.tl.custom.message.Message>`):
|
||||
From which chat to edit the message. This can also be
|
||||
the message to be edited, and the entity will be inferred
|
||||
from it, so the next parameter will be assumed to be the
|
||||
message text.
|
||||
|
||||
message (`int` | :tl:`Message` | `str`):
|
||||
The ID of the message (or :tl:`Message` itself) to be edited.
|
||||
If the `entity` was a :tl:`Message`, then this message will be
|
||||
treated as the new text.
|
||||
message (`int` | `Message <telethon.tl.custom.message.Message>` | `str`):
|
||||
The ID of the message (or `Message
|
||||
<telethon.tl.custom.message.Message>` itself) to be edited.
|
||||
If the `entity` was a `Message
|
||||
<telethon.tl.custom.message.Message>`, then this message
|
||||
will be treated as the new text.
|
||||
|
||||
text (`str`, optional):
|
||||
The new text of the message. Does nothing if the `entity`
|
||||
was a :tl:`Message`.
|
||||
was a `Message <telethon.tl.custom.message.Message>`.
|
||||
|
||||
parse_mode (`object`, optional):
|
||||
See the `TelegramClient.parse_mode` property for allowed
|
||||
values. Markdown parsing will be used by default.
|
||||
See the `TelegramClient.parse_mode
|
||||
<telethon.client.messageparse.MessageParseMethods.parse_mode>`
|
||||
property for allowed values. Markdown parsing will be used by
|
||||
default.
|
||||
|
||||
link_preview (`bool`, optional):
|
||||
Should the link preview be shown?
|
||||
|
@ -701,7 +706,7 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
|
|||
be ``None`` for normal chats, but **must** be present
|
||||
for channels and megagroups.
|
||||
|
||||
message_ids (`list` | `int` | :tl:`Message`):
|
||||
message_ids (`list` | `int` | `Message <telethon.tl.custom.message.Message>`):
|
||||
The IDs (or ID) or messages to be deleted.
|
||||
|
||||
revoke (`bool`, optional):
|
||||
|
@ -751,7 +756,7 @@ class MessageMethods(UploadMethods, ButtonMethods, MessageParseMethods):
|
|||
entity (`entity`):
|
||||
The chat where these messages are located.
|
||||
|
||||
message (`list` | :tl:`Message`):
|
||||
message (`list` | `Message <telethon.tl.custom.message.Message>`):
|
||||
Either a list of messages or a single message.
|
||||
|
||||
max_id (`int`):
|
||||
|
|
|
@ -68,7 +68,7 @@ class UploadMethods(ButtonMethods, MessageParseMethods, UserMethods):
|
|||
A callback function accepting two parameters:
|
||||
``(sent bytes, total)``.
|
||||
|
||||
reply_to (`int` | :tl:`Message`):
|
||||
reply_to (`int` | `Message <telethon.tl.custom.message.Message>`):
|
||||
Same as `reply_to` from `send_message`.
|
||||
|
||||
attributes (`list`, optional):
|
||||
|
@ -90,8 +90,10 @@ class UploadMethods(ButtonMethods, MessageParseMethods, UserMethods):
|
|||
or thumb than those that were used when the file was cached.
|
||||
|
||||
parse_mode (`object`, optional):
|
||||
See the `TelegramClient.parse_mode` property for allowed
|
||||
values. Markdown parsing will be used by default.
|
||||
See the `TelegramClient.parse_mode
|
||||
<telethon.client.messageparse.MessageParseMethods.parse_mode>`
|
||||
property for allowed values. Markdown parsing will be used by
|
||||
default.
|
||||
|
||||
voice_note (`bool`, optional):
|
||||
If ``True`` the audio will be sent as a voice note.
|
||||
|
|
|
@ -232,7 +232,7 @@ class CallbackQuery(EventBuilder):
|
|||
`telethon.client.messages.MessageMethods.edit_message` with
|
||||
both ``entity`` and ``message`` already set.
|
||||
|
||||
Returns the edited :tl:`Message`.
|
||||
Returns the edited `Message <telethon.tl.custom.message.Message>`.
|
||||
|
||||
This method also creates a task to `answer` the callback.
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ class NewMessage(EventBuilder):
|
|||
Mutually exclusive with ``incoming`` (can only set one of either).
|
||||
|
||||
from_users (`entity`, optional):
|
||||
Unlike `chats`, this parameter filters the *sender* of the message.
|
||||
That is, only messages *sent by this user* will be handled. Use
|
||||
`chats` if you want private messages with this/these users.
|
||||
`from_users` lets you filter by messages sent by one or more users
|
||||
across the desired chats.
|
||||
Unlike `chats`, this parameter filters the *senders* of the
|
||||
message. That is, only messages *sent by these users* will be
|
||||
handled. Use `chats` if you want private messages with this/these
|
||||
users. `from_users` lets you filter by messages sent by *one or
|
||||
more* users across the desired chats (doesn't need a list).
|
||||
|
||||
forwards (`bool`, optional):
|
||||
Whether forwarded messages should be handled or not. By default,
|
||||
|
@ -162,7 +162,7 @@ class NewMessage(EventBuilder):
|
|||
**refer to its documentation** to know what you can do with this event.
|
||||
|
||||
Members:
|
||||
message (:tl:`Message`):
|
||||
message (`Message <telethon.tl.custom.message.Message>`):
|
||||
This is the only difference with the received
|
||||
`telethon.tl.custom.message.Message`, and will
|
||||
return the `telethon.tl.custom.message.Message` itself,
|
||||
|
|
|
@ -112,7 +112,7 @@ class Conversation(ChatGetter):
|
|||
Returns a coroutine that will resolve once a response arrives.
|
||||
|
||||
Args:
|
||||
message (:tl:`Message` | `int`, optional):
|
||||
message (`Message <telethon.tl.custom.message.Message>` | `int`, optional):
|
||||
The message (or the message ID) for which a response
|
||||
is expected. By default this is the last sent message.
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class Dialog:
|
|||
pinned (`bool`):
|
||||
Whether this dialog is pinned to the top or not.
|
||||
|
||||
message (:tl:`Message`):
|
||||
message (`Message <telethon.tl.custom.message.Message>`):
|
||||
The last message sent on this dialog. Note that this member
|
||||
will not be updated when new messages arrive, it's only set
|
||||
on creation of the instance.
|
||||
|
|
|
@ -106,7 +106,7 @@ class InlineResult:
|
|||
entity (`entity`):
|
||||
The entity to which the message of this result should be sent.
|
||||
|
||||
reply_to (`int` | :tl:`Message`, optional):
|
||||
reply_to (`int` | `Message <telethon.tl.custom.message.Message>`, optional):
|
||||
If present, the sent message will reply to this ID or message.
|
||||
|
||||
silent (`bool`, optional):
|
||||
|
|
|
@ -65,7 +65,8 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC):
|
|||
messages.
|
||||
|
||||
message (`str`):
|
||||
The string text of the message for :tl:`Message` instances,
|
||||
The string text of the message for `Message
|
||||
<telethon.tl.custom.message.Message>` instances,
|
||||
which will be ``None`` for other types of messages.
|
||||
|
||||
action (:tl:`MessageAction`):
|
||||
|
|
Loading…
Reference in New Issue
Block a user