mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2026-06-19 07:35:19 +00:00
Documentation Improvements (#4878)
Co-authored-by: Ca5parAD <github.unearned388@passmail.net> Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com> Co-authored-by: Poolitzer <github@poolitzer.eu> Co-authored-by: aelkheir <90580077+aelkheir@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -206,7 +206,7 @@ Concurrency
|
||||
~~~~~~~~~~~
|
||||
|
||||
Since v20.0, ``python-telegram-bot`` is built on top of Pythons ``asyncio`` module.
|
||||
Because ``asyncio`` is in general single-threaded, ``python-telegram-bot`` does currently not aim to be thread-safe.
|
||||
Because ``asyncio`` is in general single-threaded, ``python-telegram-bot`` currently does not aim to be thread-safe.
|
||||
Noteworthy parts of ``python-telegram-bots`` API that are likely to cause issues (e.g. race conditions) when used in a multi-threaded setting include:
|
||||
|
||||
* ``telegram.ext.Application/Updater.update_queue``
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
documentation = "Documentation Improvements"
|
||||
|
||||
[[pull_requests]]
|
||||
uid = "4878"
|
||||
author_uid = "Bibo-Joshi"
|
||||
|
||||
[[pull_requests]]
|
||||
uid = "4872"
|
||||
author_uid = "Ca5parAD"
|
||||
@@ -40,7 +40,7 @@ class ChecklistTask(TelegramObject):
|
||||
Describes a task in a checklist.
|
||||
|
||||
Objects of this class are comparable in terms of equality.
|
||||
Two objects of this class are considered equal, if all their :attr:`id` is equal.
|
||||
Two objects of this class are considered equal, if their :attr:`id` is equal.
|
||||
|
||||
.. versionadded:: 22.3
|
||||
|
||||
|
||||
+22
-20
@@ -43,15 +43,16 @@ class Gift(TelegramObject):
|
||||
.. versionadded:: 21.8
|
||||
|
||||
Args:
|
||||
id (:obj:`str`): Unique identifier of the gift
|
||||
sticker (:class:`~telegram.Sticker`): The sticker that represents the gift
|
||||
star_count (:obj:`int`): The number of Telegram Stars that must be paid to send the sticker
|
||||
id (:obj:`str`): Unique identifier of the gift.
|
||||
sticker (:class:`~telegram.Sticker`): The sticker that represents the gift.
|
||||
star_count (:obj:`int`): The number of Telegram Stars that must be paid to send the
|
||||
sticker.
|
||||
total_count (:obj:`int`, optional): The total number of the gifts of this type that can be
|
||||
sent; for limited gifts only
|
||||
sent; for limited gifts only.
|
||||
remaining_count (:obj:`int`, optional): The number of remaining gifts of this type that can
|
||||
be sent; for limited gifts only
|
||||
be sent; for limited gifts only.
|
||||
upgrade_star_count (:obj:`int`, optional): The number of Telegram Stars that must be paid
|
||||
to upgrade the gift to a unique one
|
||||
to upgrade the gift to a unique one.
|
||||
|
||||
.. versionadded:: 21.10
|
||||
publisher_chat (:class:`telegram.Chat`, optional): Information about the chat that
|
||||
@@ -60,15 +61,16 @@ class Gift(TelegramObject):
|
||||
.. versionadded:: NEXT.VERSION
|
||||
|
||||
Attributes:
|
||||
id (:obj:`str`): Unique identifier of the gift
|
||||
sticker (:class:`~telegram.Sticker`): The sticker that represents the gift
|
||||
star_count (:obj:`int`): The number of Telegram Stars that must be paid to send the sticker
|
||||
id (:obj:`str`): Unique identifier of the gift.
|
||||
sticker (:class:`~telegram.Sticker`): The sticker that represents the gift.
|
||||
star_count (:obj:`int`): The number of Telegram Stars that must be paid to send the
|
||||
sticker.
|
||||
total_count (:obj:`int`): Optional. The total number of the gifts of this type that can be
|
||||
sent; for limited gifts only
|
||||
sent; for limited gifts only.
|
||||
remaining_count (:obj:`int`): Optional. The number of remaining gifts of this type that can
|
||||
be sent; for limited gifts only
|
||||
be sent; for limited gifts only.
|
||||
upgrade_star_count (:obj:`int`): Optional. The number of Telegram Stars that must be paid
|
||||
to upgrade the gift to a unique one
|
||||
to upgrade the gift to a unique one.
|
||||
|
||||
.. versionadded:: 21.10
|
||||
publisher_chat (:class:`telegram.Chat`): Optional. Information about the chat that
|
||||
@@ -132,10 +134,10 @@ class Gifts(TelegramObject):
|
||||
.. versionadded:: 21.8
|
||||
|
||||
Args:
|
||||
gifts (Sequence[:class:`Gift`]): The sequence of gifts
|
||||
gifts (Sequence[:class:`Gift`]): The sequence of gifts.
|
||||
|
||||
Attributes:
|
||||
gifts (tuple[:class:`Gift`]): The sequence of gifts
|
||||
gifts (tuple[:class:`Gift`]): The sequence of gifts.
|
||||
|
||||
"""
|
||||
|
||||
@@ -174,12 +176,12 @@ class GiftInfo(TelegramObject):
|
||||
Args:
|
||||
gift (:class:`Gift`): Information about the gift.
|
||||
owned_gift_id (:obj:`str`, optional): Unique identifier of the received gift for the bot;
|
||||
only present for gifts received on behalf of business accounts
|
||||
only present for gifts received on behalf of business accounts.
|
||||
convert_star_count (:obj:`int`, optional) Number of Telegram Stars that can be claimed by
|
||||
the receiver by converting the gift; omitted if conversion to Telegram Stars
|
||||
is impossible
|
||||
is impossible.
|
||||
prepaid_upgrade_star_count (:obj:`int`, optional): Number of Telegram Stars that were
|
||||
prepaid by the sender for the ability to upgrade the gift
|
||||
prepaid by the sender for the ability to upgrade the gift.
|
||||
can_be_upgraded (:obj:`bool`, optional): :obj:`True`, if the gift can be upgraded
|
||||
to a unique gift.
|
||||
text (:obj:`str`, optional): Text of the message that was added to the gift.
|
||||
@@ -191,12 +193,12 @@ class GiftInfo(TelegramObject):
|
||||
Attributes:
|
||||
gift (:class:`Gift`): Information about the gift.
|
||||
owned_gift_id (:obj:`str`): Optional. Unique identifier of the received gift for the bot;
|
||||
only present for gifts received on behalf of business accounts
|
||||
only present for gifts received on behalf of business accounts.
|
||||
convert_star_count (:obj:`int`): Optional. Number of Telegram Stars that can be claimed by
|
||||
the receiver by converting the gift; omitted if conversion to Telegram Stars
|
||||
is impossible
|
||||
is impossible.
|
||||
prepaid_upgrade_star_count (:obj:`int`): Optional. Number of Telegram Stars that were
|
||||
prepaid by the sender for the ability to upgrade the gift
|
||||
prepaid by the sender for the ability to upgrade the gift.
|
||||
can_be_upgraded (:obj:`bool`): Optional. :obj:`True`, if the gift can be upgraded
|
||||
to a unique gift.
|
||||
text (:obj:`str`): Optional. Text of the message that was added to the gift.
|
||||
|
||||
@@ -63,7 +63,7 @@ class InlineQueryResultGif(InlineQueryResult):
|
||||
|
||||
.. versionadded:: 20.2
|
||||
|
||||
..versionchanged:: 20.5
|
||||
.. versionchanged:: 20.5
|
||||
|thumbnail_url_mandatory|
|
||||
|
||||
thumbnail_mime_type (:obj:`str`, optional): MIME type of the thumbnail, must be one of
|
||||
|
||||
@@ -64,7 +64,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
|
||||
|
||||
.. versionadded:: 20.2
|
||||
|
||||
..versionchanged:: 20.5
|
||||
.. versionchanged:: 20.5
|
||||
|thumbnail_url_mandatory|
|
||||
|
||||
thumbnail_mime_type (:obj:`str`, optional): MIME type of the thumbnail, must be one of
|
||||
|
||||
@@ -54,7 +54,7 @@ class InlineQueryResultPhoto(InlineQueryResult):
|
||||
|
||||
.. versionadded:: 20.2
|
||||
|
||||
..versionchanged:: 20.5
|
||||
.. versionchanged:: 20.5
|
||||
|thumbnail_url_mandatory|
|
||||
|
||||
photo_width (:obj:`int`, optional): Width of the photo.
|
||||
|
||||
@@ -61,7 +61,7 @@ class InlineQueryResultVideo(InlineQueryResult):
|
||||
|
||||
.. versionadded:: 20.2
|
||||
|
||||
..versionchanged:: 20.5
|
||||
.. versionchanged:: 20.5
|
||||
|thumbnail_url_mandatory|
|
||||
|
||||
title (:obj:`str`): Title for the result.
|
||||
|
||||
@@ -744,7 +744,7 @@ class Message(MaybeInaccessibleMessage):
|
||||
effect_id (:obj:`str`): Optional. Unique identifier of the message effect added to the
|
||||
message.
|
||||
|
||||
..versionadded:: 21.3
|
||||
.. versionadded:: 21.3
|
||||
|
||||
caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. For messages with a
|
||||
Caption. Special entities like usernames, URLs, bot commands, etc. that appear in the
|
||||
|
||||
@@ -91,7 +91,7 @@ class ExternalReplyInfo(TelegramObject):
|
||||
the file.
|
||||
has_media_spoiler (:obj:`bool`, optional): :obj:`True`, if the message media is covered by
|
||||
a spoiler animation.
|
||||
checklist (:class:`telegram.Checklist`, optional): Message is a checklist
|
||||
checklist (:class:`telegram.Checklist`, optional): Message is a checklist.
|
||||
|
||||
.. versionadded:: 22.3
|
||||
contact (:class:`telegram.Contact`, optional): Message is a shared contact, information
|
||||
@@ -143,7 +143,7 @@ class ExternalReplyInfo(TelegramObject):
|
||||
the file.
|
||||
has_media_spoiler (:obj:`bool`): Optional. :obj:`True`, if the message media is covered by
|
||||
a spoiler animation.
|
||||
checklist (:class:`telegram.Checklist`): Optional. Message is a checklist
|
||||
checklist (:class:`telegram.Checklist`): Optional. Message is a checklist.
|
||||
|
||||
.. versionadded:: 22.3
|
||||
contact (:class:`telegram.Contact`): Optional. Message is a shared contact, information
|
||||
|
||||
@@ -3176,7 +3176,7 @@ class TransactionPartnerType(StringEnum):
|
||||
""":obj:`str`: Transaction with with payment for
|
||||
`paid broadcasting <https://core.telegram.org/bots/api#paid-broadcasts>`_.
|
||||
|
||||
..versionadded:: 21.7
|
||||
.. versionadded:: 21.7
|
||||
"""
|
||||
USER = "user"
|
||||
""":obj:`str`: Transaction with a user."""
|
||||
|
||||
Reference in New Issue
Block a user