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:
Bibo-Joshi
2025-09-13 16:56:58 +02:00
committed by GitHub
parent 068ee7ea9d
commit 539cc13097
11 changed files with 41 additions and 30 deletions
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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
View File
@@ -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.
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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."""