2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-25 03:17:41 +00:00

Refactor docstrings

This commit is contained in:
Dan 2019-05-30 15:23:43 +02:00
parent 715ae14751
commit 0340271b33
54 changed files with 105 additions and 105 deletions

View File

@ -434,9 +434,9 @@ class Client(Methods, BaseClient):
def run(self):
"""Start the Client and automatically idle the main script.
This is a convenience method that literally just calls :meth:`start` and :meth:`idle`. It makes running a client
less verbose, but is not suitable in case you want to run more than one client in a single main script,
since :meth:`idle` will block.
This is a convenience method that literally just calls :meth:`~Client.start` and :meth:`~Client.idle`. It makes
running a client less verbose, but is not suitable in case you want to run more than one client in a single main
script, since :meth:`~Client.idle` will block.
Raises:
RPCError: In case of a Telegram RPC error.
@ -472,7 +472,7 @@ class Client(Methods, BaseClient):
"""Remove a previously-registered update handler.
Make sure to provide the right group that the handler was added in. You can use
the return value of the :meth:`add_handler` method, a tuple of (handler, group), and
the return value of the :meth:`~Client.add_handler` method, a tuple of (handler, group), and
pass it directly.
Parameters:

View File

@ -42,7 +42,7 @@ def create(name: str, func: callable, **kwargs) -> type:
**kwargs (``any``, *optional*):
Any keyword argument you would like to pass. Useful for custom filters that accept parameters (e.g.:
:meth:`Filters.command`, :meth:`Filters.regex`).
:meth:`~Filters.command`, :meth:`~Filters.regex`).
"""
# TODO: unpack kwargs using **kwargs into the dict itself. For Python 3.5+ only
d = {"__call__": func}
@ -56,7 +56,7 @@ class Filters:
The Filters listed here are intended to be used with the :obj:`MessageHandler` only.
At the moment, if you want to filter updates coming from different `Handlers <Handlers.html>`_ you have to create
your own filters with :meth:`Filters.create` and use them in the same way.
your own filters with :meth:`~Filters.create` and use them in the same way.
"""
create = create
@ -219,7 +219,7 @@ class Filters:
The command or list of commands as string the filter should look for.
Examples: "start", ["start", "help", "settings"]. When a message text containing
a command arrives, the command itself and its arguments will be stored in the *command*
field of the :class:`Message`.
field of the :obj:`Message`.
prefix (``str`` | ``list``, *optional*):
A prefix or a list of prefixes as string the filter should look for.
@ -263,7 +263,7 @@ class Filters:
pattern (``str``):
The RegEx pattern as string, it will be applied to the text of a message. When a pattern matches,
all the `Match Objects <https://docs.python.org/3/library/re.html#match-objects>`_
are stored in the *matches* field of the :class:`Message` itself.
are stored in the *matches* field of the :obj:`Message` itself.
flags (``int``, *optional*):
RegEx flags.

View File

@ -21,10 +21,10 @@ from .handler import Handler
class CallbackQueryHandler(Handler):
"""The CallbackQuery handler class. Used to handle callback queries coming from inline buttons.
It is intended to be used with :meth:`add_handler() <pyrogram.Client.add_handler>`
It is intended to be used with :meth:`~Client.add_handler`
For a nicer way to register this handler, have a look at the
:meth:`on_callback_query() <pyrogram.Client.on_callback_query>` decorator.
:meth:`~Client.on_callback_query` decorator.
Parameters:
callback (``callable``):

View File

@ -22,10 +22,10 @@ from .handler import Handler
class DeletedMessagesHandler(Handler):
"""The deleted Messages handler class. Used to handle deleted messages coming from any chat
(private, group, channel). It is intended to be used with
:meth:`add_handler() <pyrogram.Client.add_handler>`
:meth:`~Client.add_handler`
For a nicer way to register this handler, have a look at the
:meth:`on_deleted_messages() <pyrogram.Client.on_deleted_messages>` decorator.
:meth:`~Client.on_deleted_messages` decorator.
Parameters:
callback (``callable``):

View File

@ -21,10 +21,10 @@ from .handler import Handler
class DisconnectHandler(Handler):
"""The Disconnect handler class. Used to handle disconnections. It is intended to be used with
:meth:`add_handler() <pyrogram.Client.add_handler>`
:meth:~Client.add_handler`
For a nicer way to register this handler, have a look at the
:meth:`on_disconnect() <pyrogram.Client.on_disconnect>` decorator.
:meth:`~Client.on_disconnect` decorator.
Parameters:
callback (``callable``):

View File

@ -21,10 +21,10 @@ from .handler import Handler
class InlineQueryHandler(Handler):
"""The InlineQuery handler class. Used to handle inline queries.
It is intended to be used with :meth:`add_handler() <pyrogram.Client.add_handler>`
It is intended to be used with :meth:`~Client.add_handler`
For a nicer way to register this handler, have a look at the
:meth:`on_inline_query() <pyrogram.Client.on_inline_query>` decorator.
:meth:`~Client.on_inline_query` decorator.
Parameters:
callback (``callable``):

View File

@ -21,11 +21,10 @@ from .handler import Handler
class MessageHandler(Handler):
"""The Message handler class. Used to handle text, media and service messages coming from
any chat (private, group, channel). It is intended to be used with
:meth:`add_handler() <pyrogram.Client.add_handler>`
any chat (private, group, channel). It is intended to be used with :meth:`~Client.add_handler`
For a nicer way to register this handler, have a look at the
:meth:`on_message() <pyrogram.Client.on_message>` decorator.
:meth:`~Client.on_message` decorator.
Parameters:
callback (``callable``):

View File

@ -22,25 +22,25 @@ from .handler import Handler
class PollHandler(Handler):
"""The Poll handler class. Used to handle polls updates.
It is intended to be used with :meth:`add_handler() <pyrogram.Client.add_handler>`
It is intended to be used with :meth:`~Client.add_handler`
For a nicer way to register this handler, have a look at the
:meth:`on_poll() <pyrogram.Client.on_poll>` decorator.
:meth:`~Client.on_poll` decorator.
Parameters:
callback (``callable``):
Pass a function that will be called when a new poll update arrives. It takes *(client, poll)*
as positional arguments (look at the section below for a detailed description).
filters (:obj:`Filters <pyrogram.Filters>`):
filters (:obj:`Filters`):
Pass one or more filters to allow only a subset of polls to be passed
in your callback function.
Other parameters:
client (:obj:`Client <pyrogram.Client>`):
client (:obj:`Client`):
The Client itself, useful when you want to call other API methods inside the poll handler.
poll (:obj:`Poll <pyrogram.Poll>`):
poll (:obj:`Poll`):
The received poll.
"""

View File

@ -21,10 +21,10 @@ from .handler import Handler
class RawUpdateHandler(Handler):
"""The Raw Update handler class. Used to handle raw updates. It is intended to be used with
:meth:`add_handler() <pyrogram.Client.add_handler>`
:meth:`~Client.add_handler`
For a nicer way to register this handler, have a look at the
:meth:`on_raw_update() <pyrogram.Client.on_raw_update>` decorator.
:meth:`~Client.on_raw_update` decorator.
Parameters:
callback (``callable``):
@ -33,7 +33,7 @@ class RawUpdateHandler(Handler):
a detailed description).
Other Parameters:
client (:class:`Client`):
client (:obj:`Client`):
The Client itself, useful when you want to call other API methods inside the update handler.
update (``Update``):

View File

@ -21,10 +21,10 @@ from .handler import Handler
class UserStatusHandler(Handler):
"""The UserStatus handler class. Used to handle user status updates (user going online or offline).
It is intended to be used with :meth:`add_handler() <pyrogram.Client.add_handler>`
It is intended to be used with :meth:`~Client.add_handler`
For a nicer way to register this handler, have a look at the
:meth:`on_user_status() <pyrogram.Client.on_user_status>` decorator.
:meth:`~Client.on_user_status` decorator.
Parameters:
callback (``callable``):

View File

@ -35,8 +35,8 @@ class ExportChatInviteLink(BaseClient):
Each administrator in a chat generates their own invite links. Bots can't use invite links generated by
other administrators. If you want your bot to work with invite links, it will need to generate its own link
using this method after this the link will become available to the bot via the :meth:`get_chat` method.
If your bot needs to generate a new invite link replacing its previous one, use this method again.
using this method after this the link will become available to the bot via the :meth:`~Client.get_chat`
method. If your bot needs to generate a new invite link replacing its previous one, use this method again.
Parameters:
chat_id (``int`` | ``str``):

View File

@ -51,7 +51,7 @@ class GetChatMembers(BaseClient):
You can get up to 200 chat members at once.
A chat can be either a basic group, a supergroup or a channel.
You must be admin to retrieve the members list of a channel (also known as "subscribers").
For a more convenient way of getting chat members see :meth:`iter_chat_members`.
For a more convenient way of getting chat members see :meth:`~Client.iter_chat_members`.
Parameters:
chat_id (``int`` | ``str``):

View File

@ -37,7 +37,7 @@ class GetDialogs(BaseClient):
"""Get a chunk of the user's dialogs.
You can get up to 100 dialogs at once.
For a more convenient way of getting a user's dialogs see :meth:`iter_dialogs`.
For a more convenient way of getting a user's dialogs see :meth:`~Client.iter_dialogs`.
Parameters:
offset_date (``int``):

View File

@ -47,7 +47,7 @@ class IterChatMembers(BaseClient):
) -> Generator["pyrogram.ChatMember", None, None]:
"""Iterate through the members of a chat sequentially.
This convenience method does the same as repeatedly calling :meth:`get_chat_members` in a loop, thus saving you
This convenience method does the same as repeatedly calling :meth:`~Client.get_chat_members` in a loop, thus saving you
from the hassle of setting up boilerplate code. It is useful for getting the whole members list of a chat with
a single call.

View File

@ -30,8 +30,9 @@ class IterDialogs(BaseClient):
) -> Generator["pyrogram.Dialog", None, None]:
"""Iterate through a user's dialogs sequentially.
This convenience method does the same as repeatedly calling :meth:`get_dialogs` in a loop, thus saving you from
the hassle of setting up boilerplate code. It is useful for getting the whole dialogs list with a single call.
This convenience method does the same as repeatedly calling :meth:`~Client.get_dialogs` in a loop, thus saving
you from the hassle of setting up boilerplate code. It is useful for getting the whole dialogs list with a
single call.
Parameters:
offset_date (``int``):

View File

@ -44,7 +44,7 @@ class SetChatPhoto(BaseClient):
Unique identifier (int) or username (str) of the target chat.
photo (``str``):
New chat photo. You can pass a :class:`Photo` id or a file path to upload a new photo.
New chat photo. You can pass a :obj:`Photo` id or a file path to upload a new photo.
Returns:
``bool``: True on success.

View File

@ -30,7 +30,7 @@ class UpdateChatUsername(BaseClient):
) -> bool:
"""Update a channel or a supergroup username.
To update your own username (for users only, not bots) you can use :meth:`update_username`.
To update your own username (for users only, not bots) you can use :meth:`~Client.update_username`.
Parameters:
chat_id (``int`` | ``str``)

View File

@ -32,7 +32,7 @@ class OnCallbackQuery(BaseClient):
) -> callable:
"""Decorator for handling callback queries.
This does the same thing as :meth:`add_handler` using the :class:`CallbackQueryHandler`.
This does the same thing as :meth:`~Client.add_handler` using the :obj:`CallbackQueryHandler`.
Parameters:
filters (:obj:`Filters`):

View File

@ -32,7 +32,7 @@ class OnDeletedMessages(BaseClient):
) -> callable:
"""Decorator for handling deleted messages.
This does the same thing as :meth:`add_handler` using the :class:`DeletedMessagesHandler`.
This does the same thing as :meth:`~Client.add_handler` using the :obj:`DeletedMessagesHandler`.
Parameters:
filters (:obj:`Filters`):

View File

@ -25,7 +25,7 @@ class OnDisconnect(BaseClient):
def on_disconnect(self=None) -> callable:
"""Decorator for handling disconnections.
This does the same thing as :meth:`add_handler` using the :class:`DisconnectHandler`.
This does the same thing as :meth:`~Client.add_handler` using the :obj:`DisconnectHandler`.
"""
def decorator(func: callable) -> Handler:

View File

@ -32,7 +32,7 @@ class OnInlineQuery(BaseClient):
) -> callable:
"""Decorator for handling inline queries.
This does the same thing as :meth:`add_handler` using the :class:`InlineQueryHandler`.
This does the same thing as :meth:`~Client.add_handler` using the :obj:`InlineQueryHandler`.
Parameters:
filters (:obj:`Filters <pyrogram.Filters>`):

View File

@ -32,7 +32,7 @@ class OnMessage(BaseClient):
) -> callable:
"""Decorator for handling messages.
This does the same thing as :meth:`add_handler` using the :class:`MessageHandler`.
This does the same thing as :meth:`~Client.add_handler` using the :obj:`MessageHandler`.
Parameters:
filters (:obj:`Filters`):

View File

@ -32,10 +32,10 @@ class OnPoll(BaseClient):
) -> callable:
"""Decorator for handling poll updates.
This does the same thing as :meth:`add_handler` using the :class:`PollHandler`.
This does the same thing as :meth:`~Client.add_handler` using the :obj:`PollHandler`.
Parameters:
filters (:obj:`Filters <pyrogram.Filters>`):
filters (:obj:`Filters`):
Pass one or more filters to allow only a subset of polls to be passed
in your function.

View File

@ -30,7 +30,7 @@ class OnRawUpdate(BaseClient):
) -> callable:
"""Decorator for handling raw updates.
This does the same thing as :meth:`add_handler` using the :class:`RawUpdateHandler`.
This does the same thing as :meth:`~Client.add_handler` using the :obj:`RawUpdateHandler`.
Parameters:
group (``int``, *optional*):

View File

@ -31,7 +31,7 @@ class OnUserStatus(BaseClient):
group: int = 0
) -> callable:
"""Decorator for handling user status updates.
This does the same thing as :meth:`add_handler` using the :class:`UserStatusHandler`.
This does the same thing as :meth:`~Client.add_handler` using the :obj:`UserStatusHandler`.
Parameters:
filters (:obj:`Filters`):

View File

@ -77,7 +77,7 @@ class DownloadMedia(BaseClient):
Returns:
``str`` | ``None``: On success, the absolute path of the downloaded file is returned, otherwise, in case
the download failed or was deliberately stopped with :meth:`stop_transmission`, None is returned.
the download failed or was deliberately stopped with :meth:`~Client.stop_transmission`, None is returned.
Raises:
RPCError: In case of a Telegram RPC error.

View File

@ -41,7 +41,7 @@ class GetHistory(BaseClient):
"""Retrieve a chunk of the history of a chat.
You can get up to 100 messages at once.
For a more convenient way of getting a chat history see :meth:`iter_history`.
For a more convenient way of getting a chat history see :meth:`~Client.iter_history`.
Parameters:
chat_id (``int`` | ``str``):

View File

@ -34,8 +34,9 @@ class IterHistory(BaseClient):
) -> Generator["pyrogram.Message", None, None]:
"""Iterate through a chat history sequentially.
This convenience method does the same as repeatedly calling :meth:`get_history` in a loop, thus saving you from
the hassle of setting up boilerplate code. It is useful for getting the whole chat history with a single call.
This convenience method does the same as repeatedly calling :meth:`~Client.get_history` in a loop, thus saving
you from the hassle of setting up boilerplate code. It is useful for getting the whole chat history with a
single call.
Parameters:
chat_id (``int`` | ``str``):

View File

@ -119,7 +119,7 @@ class SendAnimation(BaseClient):
Returns:
:obj:`Message` | ``None``: On success, the sent animation message is returned, otherwise, in case the upload
is deliberately stopped with :meth:`stop_transmission`, None is returned.
is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned.
Raises:
RPCError: In case of a Telegram RPC error.

View File

@ -121,7 +121,7 @@ class SendAudio(BaseClient):
Returns:
:obj:`Message` | ``None``: On success, the sent audio message is returned, otherwise, in case the upload
is deliberately stopped with :meth:`stop_transmission`, None is returned.
is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned.
Raises:
RPCError: In case of a Telegram RPC error.

View File

@ -107,7 +107,7 @@ class SendDocument(BaseClient):
Returns:
:obj:`Message` | ``None``: On success, the sent document message is returned, otherwise, in case the upload
is deliberately stopped with :meth:`stop_transmission`, None is returned.
is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned.
Raises:
RPCError: In case of a Telegram RPC error.

View File

@ -106,7 +106,7 @@ class SendPhoto(BaseClient):
Returns:
:obj:`Message` | ``None``: On success, the sent photo message is returned, otherwise, in case the upload
is deliberately stopped with :meth:`stop_transmission`, None is returned.
is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned.
Raises:
RPCError: In case of a Telegram RPC error.

View File

@ -91,7 +91,7 @@ class SendSticker(BaseClient):
Returns:
:obj:`Message` | ``None``: On success, the sent sticker message is returned, otherwise, in case the upload
is deliberately stopped with :meth:`stop_transmission`, None is returned.
is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned.
Raises:
RPCError: In case of a Telegram RPC error.
"""

View File

@ -123,7 +123,7 @@ class SendVideo(BaseClient):
Returns:
:obj:`Message` | ``None``: On success, the sent video message is returned, otherwise, in case the upload
is deliberately stopped with :meth:`stop_transmission`, None is returned.
is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned.
Raises:
RPCError: In case of a Telegram RPC error.

View File

@ -106,7 +106,7 @@ class SendVideoNote(BaseClient):
Returns:
:obj:`Message` | ``None``: On success, the sent video note message is returned, otherwise, in case the
pload is deliberately stopped with :meth:`stop_transmission`, None is returned.
pload is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned.
Raises:
RPCError: In case of a Telegram RPC error.

View File

@ -104,7 +104,7 @@ class SendVoice(BaseClient):
Returns:
:obj:`Message` | ``None``: On success, the sent voice message is returned, otherwise, in case the upload
is deliberately stopped with :meth:`stop_transmission`, None is returned.
is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned.
Raises:
RPCError: In case of a Telegram RPC error.

View File

@ -31,7 +31,7 @@ class UpdateUsername(BaseClient):
This method only works for users, not bots. Bot usernames must be changed via Bot Support or by recreating
them from scratch using BotFather. To update a channel or supergroup username you can use
:meth:`update_chat_username`.
:meth:`~Client.update_chat_username`.
Parameters:
username (``str`` | ``None``):

View File

@ -92,7 +92,7 @@ class InlineQuery(PyrogramType, Update):
switch_pm_text: str = "",
switch_pm_parameter: str = ""
):
"""Bound method *answer* of :obj:`InlineQuery <pyrogram.InlineQuery>`.
"""Bound method *answer* of :obj:`InlineQuery`.
Use this method as a shortcut for:
@ -109,7 +109,7 @@ class InlineQuery(PyrogramType, Update):
inline_query.answer([...])
Parameters:
results (List of :obj:`InlineQueryResult <pyrogram.InlineQueryResult>`):
results (List of :obj:`InlineQueryResult`):
A list of results for the inline query.
cache_time (``int``, *optional*):

View File

@ -34,10 +34,10 @@ class InlineQueryResultArticle(InlineQueryResult):
title (``str``):
Title for the result.
input_message_content (:obj:`InputMessageContent <pyrogram.InputMessageContent>`):
input_message_content (:obj:`InputMessageContent`):
Content of the message to be sent.
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.InlineKeyboardMarkup>`, *optional*):
reply_markup (:obj:`InlineKeyboardMarkup`, *optional*):
Inline keyboard attached to the message.
url (``str``, *optional*):

View File

@ -50,10 +50,10 @@ class InlineQueryResultAudio(PyrogramType):
audio_duration (``int`` ``32-bit``, optional):
Audio duration in seconds.
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.types.InlineKeyboardMarkup>`, optional):
reply_markup (:obj:`InlineKeyboardMarkup`, optional):
Inline keyboard attached to the message.
input_message_content (:obj:`InputMessageContent <pyrogram.types.InputMessageContent>`, optional):
input_message_content (:obj:`InputMessageContent`, optional):
Content of the message to be sent instead of the audio.
"""

View File

@ -47,10 +47,10 @@ class InlineQueryResultCachedDocument(PyrogramType):
parse_mode (``str``, optional):
Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.types.InlineKeyboardMarkup>`, optional):
reply_markup (:obj:`InlineKeyboardMarkup`, optional):
Inline keyboard attached to the message.
input_message_content (:obj:`InputMessageContent <pyrogram.types.InputMessageContent>`, optional):
input_message_content (:obj:`InputMessageContent`, optional):
Content of the message to be sent instead of the file.
"""

View File

@ -44,10 +44,10 @@ class InlineQueryResultCachedGif(PyrogramType):
parse_mode (``str``, optional):
Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.types.InlineKeyboardMarkup>`, optional):
reply_markup (:obj:`InlineKeyboardMarkup`, optional):
Inline keyboard attached to the message.
input_message_content (:obj:`InputMessageContent <pyrogram.types.InputMessageContent>`, optional):
input_message_content (:obj:`InputMessageContent`, optional):
Content of the message to be sent instead of the GIF animation.
"""

View File

@ -35,10 +35,10 @@ class InlineQueryResultCachedSticker(PyrogramType):
sticker_file_id (``str``):
A valid file identifier of the sticker.
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.types.InlineKeyboardMarkup>`, optional):
reply_markup (:obj:`InlineKeyboardMarkup`, optional):
Inline keyboard attached to the message.
input_message_content (:obj:`InputMessageContent <pyrogram.types.InputMessageContent>`, optional):
input_message_content (:obj:`InputMessageContent`, optional):
Content of the message to be sent instead of the sticker.
"""

View File

@ -44,10 +44,10 @@ class InlineQueryResultCachedVoice(PyrogramType):
parse_mode (``str``, optional):
Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.types.InlineKeyboardMarkup>`, optional):
reply_markup (:obj:`InlineKeyboardMarkup`, optional):
Inline keyboard attached to the message.
input_message_content (:obj:`InputMessageContent <pyrogram.types.InputMessageContent>`, optional):
input_message_content (:obj:`InputMessageContent`, optional):
Content of the message to be sent instead of the voice message.
"""

View File

@ -50,10 +50,10 @@ class InlineQueryResultDocument(PyrogramType):
description (``str``, optional):
Short description of the result.
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.types.InlineKeyboardMarkup>`, optional):
reply_markup (:obj:`InlineKeyboardMarkup`, optional):
Inline keyboard attached to the message.
input_message_content (:obj:`InputMessageContent <pyrogram.types.InputMessageContent>`, optional):
input_message_content (:obj:`InputMessageContent`, optional):
Content of the message to be sent instead of the file.
thumb_url (``str``, optional):

View File

@ -35,7 +35,7 @@ class InlineQueryResultGame(PyrogramType):
game_short_name (``str``):
Short name of the game.
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.types.InlineKeyboardMarkup>`, optional):
reply_markup (:obj:`InlineKeyboardMarkup`, optional):
Inline keyboard attached to the message.
"""

View File

@ -54,10 +54,10 @@ class InlineQueryResultPhoto(PyrogramType):
Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in
the media caption.
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.types.InlineKeyboardMarkup>`, *optional*):
reply_markup (:obj:`InlineKeyboardMarkup`, *optional*):
Inline keyboard attached to the message.
input_message_content (:obj:`InputMessageContent <pyrogram.types.InputMessageContent>`, *optional*):
input_message_content (:obj:`InputMessageContent`, *optional*):
Content of the message to be sent instead of the photo.
"""

View File

@ -50,10 +50,10 @@ class InlineQueryResultVenue(PyrogramType):
foursquare_type (``str``, optional):
Foursquare type of the venue, if known. (For example, "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".).
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.types.InlineKeyboardMarkup>`, optional):
reply_markup (:obj:`InlineKeyboardMarkup`, optional):
Inline keyboard attached to the message.
input_message_content (:obj:`InputMessageContent <pyrogram.types.InputMessageContent>`, optional):
input_message_content (:obj:`InputMessageContent`, optional):
Content of the message to be sent instead of the venue.
thumb_url (``str``, optional):

View File

@ -62,10 +62,10 @@ class InlineQueryResultVideo(PyrogramType):
description (``str``, optional):
Short description of the result.
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.types.InlineKeyboardMarkup>`, optional):
reply_markup (:obj:`InlineKeyboardMarkup`, optional):
Inline keyboard attached to the message.
input_message_content (:obj:`InputMessageContent <pyrogram.types.InputMessageContent>`, optional):
input_message_content (:obj:`InputMessageContent`, optional):
Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
"""

View File

@ -47,10 +47,10 @@ class InlineQueryResultVoice(PyrogramType):
voice_duration (``int`` ``32-bit``, optional):
Recording duration in seconds.
reply_markup (:obj:`InlineKeyboardMarkup <pyrogram.types.InlineKeyboardMarkup>`, optional):
reply_markup (:obj:`InlineKeyboardMarkup`, optional):
Inline keyboard attached to the message.
input_message_content (:obj:`InputMessageContent <pyrogram.types.InputMessageContent>`, optional):
input_message_content (:obj:`InputMessageContent`, optional):
Content of the message to be sent instead of the voice recording.
"""

View File

@ -23,7 +23,7 @@ from ..pyrogram_type import PyrogramType
class InputPhoneContact(PyrogramType):
"""A Phone Contact to be added in your Telegram address book.
It is intended to be used with :meth:`add_contacts() <pyrogram.Client.add_contacts>`
It is intended to be used with :meth:`~Client.add_contacts() <pyrogram.Client.add_contacts>`
Parameters:
phone (``str``):

View File

@ -834,7 +834,7 @@ class Message(PyrogramType, Update):
Returns:
On success, the sent :obj:`Message` is returned.
In case the upload is deliberately stopped with :meth:`stop_transmission`, None is returned instead.
In case the upload is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned instead.
Raises:
RPCError: In case of a Telegram RPC error.
@ -968,7 +968,7 @@ class Message(PyrogramType, Update):
Returns:
On success, the sent :obj:`Message` is returned.
In case the upload is deliberately stopped with :meth:`stop_transmission`, None is returned instead.
In case the upload is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned instead.
Raises:
RPCError: In case of a Telegram RPC error.
@ -1294,7 +1294,7 @@ class Message(PyrogramType, Update):
Returns:
On success, the sent :obj:`Message` is returned.
In case the upload is deliberately stopped with :meth:`stop_transmission`, None is returned instead.
In case the upload is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned instead.
Raises:
RPCError: In case of a Telegram RPC error.
@ -1686,7 +1686,7 @@ class Message(PyrogramType, Update):
Returns:
On success, the sent :obj:`Message` is returned.
In case the upload is deliberately stopped with :meth:`stop_transmission`, None is returned instead.
In case the upload is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned instead.
Raises:
RPCError: In case of a Telegram RPC error.
@ -1864,7 +1864,7 @@ class Message(PyrogramType, Update):
Returns:
On success, the sent :obj:`Message` is returned.
In case the upload is deliberately stopped with :meth:`stop_transmission`, None is returned instead.
In case the upload is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned instead.
Raises:
RPCError: In case of a Telegram RPC error.
@ -2094,7 +2094,7 @@ class Message(PyrogramType, Update):
Returns:
On success, the sent :obj:`Message` is returned.
In case the upload is deliberately stopped with :meth:`stop_transmission`, None is returned instead.
In case the upload is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned instead.
Raises:
RPCError: In case of a Telegram RPC error.
@ -2216,7 +2216,7 @@ class Message(PyrogramType, Update):
Returns:
On success, the sent :obj:`Message` is returned.
In case the upload is deliberately stopped with :meth:`stop_transmission`, None is returned instead.
In case the upload is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned instead.
Raises:
RPCError: In case of a Telegram RPC error.
@ -2332,7 +2332,7 @@ class Message(PyrogramType, Update):
Returns:
On success, the sent :obj:`Message` is returned.
In case the upload is deliberately stopped with :meth:`stop_transmission`, None is returned instead.
In case the upload is deliberately stopped with :meth:`~Client.stop_transmission`, None is returned instead.
Raises:
RPCError: In case of a Telegram RPC error.
@ -2778,9 +2778,8 @@ class Message(PyrogramType, Update):
Timeout in seconds.
Returns:
- The result of :meth:`request_callback_answer() <pyrogram.Client.request_callback_answer>` in case of
inline callback button clicks.
- The result of :meth:`reply() <pyrogram.Message.reply>` in case of normal button clicks.
- The result of :meth:`~Client.request_callback_answer` in case of inline callback button clicks.
- The result of :meth:`~Message.reply()` in case of normal button clicks.
- A string in case the inline button is a URL, a *switch_inline_query* or a
*switch_inline_query_current_chat* button.

View File

@ -146,7 +146,7 @@ class Messages(PyrogramType, Update):
Defaults to False.
Returns:
On success, a :class:`Messages` containing forwarded messages is returned.
On success, a :obj:`Messages` containing forwarded messages is returned.
Raises:
RPCError: In case of a Telegram RPC error.

View File

@ -57,28 +57,28 @@ class Chat(PyrogramType):
last_name (``str``, *optional*):
Last name of the other party in a private chat, for private chats.
photo (:obj:`ChatPhoto <pyrogram.ChatPhoto>`, *optional*):
photo (:obj:`ChatPhoto`, *optional*):
Chat photo. Suitable for downloads only.
description (``str``, *optional*):
Bio, for private chats and bots or description for groups, supergroups and channels.
Returned only in :meth:`get_chat() <pyrogram.Client.get_chat>`.
Returned only in :meth:`~Client.get_chat`.
invite_link (``str``, *optional*):
Chat invite link, for groups, supergroups and channels.
Returned only in :meth:`get_chat() <pyrogram.Client.get_chat>`.
Returned only in :meth:`~Client.get_chat`.
pinned_message (:obj:`Message`, *optional*):
Pinned message, for groups, supergroups channels and own chat.
Returned only in :meth:`get_chat() <pyrogram.Client.get_chat>`.
Returned only in :meth:`~Client.get_chat`.
sticker_set_name (``str``, *optional*):
For supergroups, name of group sticker set.
Returned only in :meth:`get_chat() <pyrogram.Client.get_chat>`.
Returned only in :meth:`~Client.get_chat`.
can_set_sticker_set (``bool``, *optional*):
True, if the group sticker set can be changed by you.
Returned only in :meth:`get_chat() <pyrogram.Client.get_chat>`.
Returned only in :meth:`~Client.get_chat`.
members_count (``int``, *optional*):
Chat members count, for groups, supergroups and channels only.
@ -87,7 +87,7 @@ class Chat(PyrogramType):
The reason why this chat might be unavailable to some users.
This field is available only in case *is_restricted* is True.
permissions (:obj:`ChatPermissions <pyrogram.ChatPermissions>` *optional*):
permissions (:obj:`ChatPermissions` *optional*):
Information about the chat default permissions, for groups and supergroups.
"""