mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2026-06-19 07:35:19 +00:00
Bump Version to v22.1 (#4791)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
other = "Bump Version to v22.1"
|
||||
[[pull_requests]]
|
||||
uid = "4791"
|
||||
author_uid = "Bibo-Joshi"
|
||||
closes_threads = []
|
||||
+20
-20
@@ -9386,7 +9386,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified.
|
||||
"""
|
||||
Gifts a Telegram Premium subscription to the given user.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
user_id (:obj:`int`): Unique identifier of the target user who will receive a Telegram
|
||||
@@ -9506,7 +9506,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified.
|
||||
Returns the gifts received and owned by a managed business account. Requires the
|
||||
:attr:`~telegram.BusinessBotRights.can_view_gifts_and_stars` business bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business connection.
|
||||
@@ -9572,7 +9572,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified.
|
||||
Returns the amount of Telegram Stars owned by a managed business account. Requires the
|
||||
:attr:`~telegram.BusinessBotRights.can_view_gifts_and_stars` business bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business connection.
|
||||
@@ -9613,7 +9613,7 @@ CUSTOM_EMOJI_IDENTIFIER_LIMIT` custom emoji identifiers can be specified.
|
||||
Marks incoming message as read on behalf of a business account.
|
||||
Requires the :attr:`~telegram.BusinessBotRights.can_read_messages` business bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business connection on
|
||||
@@ -9663,7 +9663,7 @@ CHAT_ACTIVITY_TIMEOUT` seconds.
|
||||
:attr:`~telegram.BusinessBotRights.can_delete_all_messages` business bot right to delete
|
||||
any message.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`int` | :obj:`str`): Unique identifier of the business
|
||||
@@ -9716,7 +9716,7 @@ CHAT_ACTIVITY_TIMEOUT` seconds.
|
||||
Posts a story on behalf of a managed business account. Requires the
|
||||
:attr:`~telegram.BusinessBotRights.can_manage_stories` business bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business connection.
|
||||
@@ -9805,7 +9805,7 @@ MAX_UNIQUE_GIFT_AREAS` of :class:`telegram.StoryAreaTypeUniqueGift`.
|
||||
Edits a story previously posted by the bot on behalf of a managed business account.
|
||||
Requires the :attr:`~telegram.BusinessBotRights.can_manage_stories` business bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business connection.
|
||||
@@ -9878,7 +9878,7 @@ MAX_UNIQUE_GIFT_AREAS` of :class:`telegram.StoryAreaTypeUniqueGift`.
|
||||
Deletes a story previously posted by the bot on behalf of a managed business account.
|
||||
Requires the :attr:`~telegram.BusinessBotRights.can_manage_stories` business bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business connection.
|
||||
@@ -9920,7 +9920,7 @@ MAX_UNIQUE_GIFT_AREAS` of :class:`telegram.StoryAreaTypeUniqueGift`.
|
||||
Changes the first and last name of a managed business account. Requires the
|
||||
:attr:`~telegram.BusinessBotRights.can_edit_name` business bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`int` | :obj:`str`): Unique identifier of the business
|
||||
@@ -9967,7 +9967,7 @@ MAX_UNIQUE_GIFT_AREAS` of :class:`telegram.StoryAreaTypeUniqueGift`.
|
||||
Changes the username of a managed business account. Requires the
|
||||
:attr:`~telegram.BusinessBotRights.can_edit_username` business bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business connection.
|
||||
@@ -10009,7 +10009,7 @@ MAX_UNIQUE_GIFT_AREAS` of :class:`telegram.StoryAreaTypeUniqueGift`.
|
||||
Changes the bio of a managed business account. Requires the
|
||||
:attr:`~telegram.BusinessBotRights.can_edit_bio` business bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business connection.
|
||||
@@ -10053,7 +10053,7 @@ MAX_UNIQUE_GIFT_AREAS` of :class:`telegram.StoryAreaTypeUniqueGift`.
|
||||
Requires the :attr:`~telegram.BusinessBotRights.can_change_gift_settings` business
|
||||
bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business
|
||||
@@ -10101,7 +10101,7 @@ MAX_UNIQUE_GIFT_AREAS` of :class:`telegram.StoryAreaTypeUniqueGift`.
|
||||
Requires the :attr:`~telegram.BusinessBotRights.can_edit_profile_photo` business
|
||||
bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business connection.
|
||||
@@ -10148,7 +10148,7 @@ MAX_UNIQUE_GIFT_AREAS` of :class:`telegram.StoryAreaTypeUniqueGift`.
|
||||
Requires the :attr:`~telegram.BusinessBotRights.can_edit_profile_photo` business
|
||||
bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business connection.
|
||||
@@ -10192,7 +10192,7 @@ MAX_UNIQUE_GIFT_AREAS` of :class:`telegram.StoryAreaTypeUniqueGift`.
|
||||
Converts a given regular gift to Telegram Stars. Requires the
|
||||
:attr:`~telegram.BusinessBotRights.can_convert_gifts_to_stars` business bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business
|
||||
@@ -10239,7 +10239,7 @@ MAX_UNIQUE_GIFT_AREAS` of :class:`telegram.StoryAreaTypeUniqueGift`.
|
||||
Additionally requires the :attr:`~telegram.BusinessBotRights.can_transfer_stars` business
|
||||
bot right if the upgrade is paid.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business
|
||||
@@ -10296,7 +10296,7 @@ MAX_UNIQUE_GIFT_AREAS` of :class:`telegram.StoryAreaTypeUniqueGift`.
|
||||
Requires :attr:`~telegram.BusinessBotRights.can_transfer_stars` business bot right if the
|
||||
transfer is paid.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business
|
||||
@@ -10349,7 +10349,7 @@ CHAT_ACTIVITY_TIMEOUT` seconds.
|
||||
Transfers Telegram Stars from the business account balance to the bot's balance. Requires
|
||||
the :attr:`~telegram.BusinessBotRights.can_transfer_stars` business bot right.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
business_connection_id (:obj:`str`): Unique identifier of the business
|
||||
@@ -10840,8 +10840,8 @@ CHAT_ACTIVITY_TIMEOUT` seconds.
|
||||
The gift can't be converted to Telegram Stars by the receiver.
|
||||
|
||||
.. versionadded:: 21.8
|
||||
.. versionchanged:: NEXT.VERSION
|
||||
Bot API 8.3 made :paramref:`user_id` optional. In version NEXT.VERSION, the methods
|
||||
.. versionchanged:: 22.1
|
||||
Bot API 8.3 made :paramref:`user_id` optional. In version 22.1, the methods
|
||||
signature was changed accordingly.
|
||||
|
||||
Args:
|
||||
|
||||
@@ -48,7 +48,7 @@ class BusinessBotRights(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality.
|
||||
Two objects of this class are considered equal, if all their attributes are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
can_reply (:obj:`bool`, optional): True, if the bot can send and edit messages in the
|
||||
@@ -194,7 +194,7 @@ class BusinessConnection(TelegramObject):
|
||||
:attr:`rights`, and :attr:`is_enabled` are equal.
|
||||
|
||||
.. versionadded:: 21.1
|
||||
.. versionchanged:: NEXT.VERSION
|
||||
.. versionchanged:: 22.1
|
||||
Equality comparison now considers :attr:`rights` instead of :attr:`can_reply`.
|
||||
|
||||
Args:
|
||||
@@ -206,12 +206,12 @@ class BusinessConnection(TelegramObject):
|
||||
can_reply (:obj:`bool`, optional): True, if the bot can act on behalf of the business
|
||||
account in chats that were active in the last 24 hours.
|
||||
|
||||
.. deprecated:: NEXT.VERSION
|
||||
.. deprecated:: 22.1
|
||||
Bot API 9.0 deprecated this argument in favor of :paramref:`rights`.
|
||||
is_enabled (:obj:`bool`): True, if the connection is active.
|
||||
rights (:class:`BusinessBotRights`, optional): Rights of the business bot.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Attributes:
|
||||
id (:obj:`str`): Unique identifier of the business connection.
|
||||
@@ -222,7 +222,7 @@ class BusinessConnection(TelegramObject):
|
||||
is_enabled (:obj:`bool`): True, if the connection is active.
|
||||
rights (:class:`BusinessBotRights`): Optional. Rights of the business bot.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = (
|
||||
@@ -243,7 +243,7 @@ class BusinessConnection(TelegramObject):
|
||||
date: dtm.datetime,
|
||||
can_reply: Optional[bool] = None,
|
||||
# temporarily optional to account for changed signature
|
||||
# tags: deprecated NEXT.VERSION; bot api 9.0
|
||||
# tags: deprecated 22.1; bot api 9.0
|
||||
is_enabled: Optional[bool] = None,
|
||||
rights: Optional[BusinessBotRights] = None,
|
||||
*,
|
||||
@@ -255,7 +255,7 @@ class BusinessConnection(TelegramObject):
|
||||
if can_reply is not None:
|
||||
warn(
|
||||
PTBDeprecationWarning(
|
||||
version="NEXT.VERSION",
|
||||
version="22.1",
|
||||
message=build_deprecation_warning_message(
|
||||
deprecated_name="can_reply",
|
||||
new_name="rights",
|
||||
@@ -291,14 +291,14 @@ class BusinessConnection(TelegramObject):
|
||||
""":obj:`bool`: Optional. True, if the bot can act on behalf of the business account in
|
||||
chats that were active in the last 24 hours.
|
||||
|
||||
.. deprecated:: NEXT.VERSION
|
||||
.. deprecated:: 22.1
|
||||
Bot API 9.0 deprecated this argument in favor of :attr:`rights`
|
||||
"""
|
||||
warn_about_deprecated_attr_in_property(
|
||||
deprecated_attr_name="can_reply",
|
||||
new_attr_name="rights",
|
||||
bot_api_version="9.0",
|
||||
ptb_version="NEXT.VERSION",
|
||||
ptb_version="22.1",
|
||||
)
|
||||
return self._can_reply
|
||||
|
||||
|
||||
+2
-2
@@ -3524,7 +3524,7 @@ class _ChatBase(TelegramObject):
|
||||
|
||||
For the documentation of the arguments, please see :meth:`telegram.Bot.transfer_gift`.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Returns:
|
||||
:obj:`bool`: On success, :obj:`True` is returned.
|
||||
@@ -3621,7 +3621,7 @@ class _ChatBase(TelegramObject):
|
||||
For the documentation of the arguments, please see
|
||||
:meth:`telegram.Bot.read_business_message`.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Returns:
|
||||
:obj:`bool`: On success, :obj:`True` is returned.
|
||||
|
||||
@@ -74,7 +74,7 @@ class ChatFullInfo(_ChatBase):
|
||||
accepted_gift_types (:class:`telegram.AcceptedGiftTypes`): Information about types of
|
||||
gifts that are accepted by the chat or by the corresponding user for private chats.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
title (:obj:`str`, optional): Title, for supergroups, channels and group chats.
|
||||
username (:obj:`str`, optional): Username, for private chats, supergroups and channels if
|
||||
available.
|
||||
@@ -215,7 +215,7 @@ class ChatFullInfo(_ChatBase):
|
||||
|
||||
.. versionadded:: 21.11
|
||||
|
||||
.. deprecated:: NEXT.VERSION
|
||||
.. deprecated:: 22.1
|
||||
Bot API 9.0 introduced :paramref:`accepted_gift_types`, replacing this argument.
|
||||
Hence, this argument will be removed in future versions.
|
||||
|
||||
@@ -236,7 +236,7 @@ class ChatFullInfo(_ChatBase):
|
||||
accepted_gift_types (:class:`telegram.AcceptedGiftTypes`): Information about types of
|
||||
gifts that are accepted by the chat or by the corresponding user for private chats.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
title (:obj:`str`, optional): Title, for supergroups, channels and group chats.
|
||||
username (:obj:`str`, optional): Username, for private chats, supergroups and channels if
|
||||
available.
|
||||
@@ -469,7 +469,7 @@ class ChatFullInfo(_ChatBase):
|
||||
linked_chat_id: Optional[int] = None,
|
||||
location: Optional[ChatLocation] = None,
|
||||
can_send_paid_media: Optional[bool] = None,
|
||||
# tags: deprecated NEXT.VERSION; bot api 9.0
|
||||
# tags: deprecated 22.1; bot api 9.0
|
||||
can_send_gift: Optional[bool] = None,
|
||||
# temporarily optional to account for changed signature
|
||||
accepted_gift_types: Optional[AcceptedGiftTypes] = None,
|
||||
@@ -492,7 +492,7 @@ class ChatFullInfo(_ChatBase):
|
||||
if can_send_gift is not None:
|
||||
warn(
|
||||
PTBDeprecationWarning(
|
||||
"NEXT.VERSION",
|
||||
"22.1",
|
||||
build_deprecation_warning_message(
|
||||
deprecated_name="can_send_gift",
|
||||
new_name="accepted_gift_types",
|
||||
@@ -562,7 +562,7 @@ class ChatFullInfo(_ChatBase):
|
||||
"""
|
||||
:obj:`bool`: Optional. :obj:`True`, if gifts can be sent to the chat.
|
||||
|
||||
.. deprecated:: NEXT.VERSION
|
||||
.. deprecated:: 22.1
|
||||
As Bot API 9.0 replaces this attribute with :attr:`accepted_gift_types`, this attribute
|
||||
will be removed in future versions.
|
||||
|
||||
@@ -571,7 +571,7 @@ class ChatFullInfo(_ChatBase):
|
||||
deprecated_attr_name="can_send_gift",
|
||||
new_attr_name="accepted_gift_types",
|
||||
bot_api_version="9.0",
|
||||
ptb_version="NEXT.VERSION",
|
||||
ptb_version="22.1",
|
||||
stacklevel=2,
|
||||
)
|
||||
return self._can_send_gift
|
||||
|
||||
@@ -35,7 +35,7 @@ class InputStoryContent(TelegramObject):
|
||||
* :class:`telegram.InputStoryContentPhoto`
|
||||
* :class:`telegram.InputStoryContentVideo`
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
type (:obj:`str`): Type of the content.
|
||||
@@ -72,7 +72,7 @@ class InputStoryContent(TelegramObject):
|
||||
class InputStoryContentPhoto(InputStoryContent):
|
||||
"""Describes a photo to post as a story.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
photo (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \
|
||||
@@ -109,7 +109,7 @@ class InputStoryContentVideo(InputStoryContent):
|
||||
"""
|
||||
Describes a video to post as a story.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
video (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`, \
|
||||
|
||||
@@ -37,7 +37,7 @@ class InputProfilePhoto(TelegramObject):
|
||||
* :class:`InputProfilePhotoStatic`
|
||||
* :class:`InputProfilePhotoAnimated`
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
type (:obj:`str`): Type of the profile photo.
|
||||
@@ -69,7 +69,7 @@ class InputProfilePhoto(TelegramObject):
|
||||
class InputProfilePhotoStatic(InputProfilePhoto):
|
||||
"""A static profile photo in the .JPG format.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
photo (:term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` | \
|
||||
@@ -101,7 +101,7 @@ class InputProfilePhotoStatic(InputProfilePhoto):
|
||||
class InputProfilePhotoAnimated(InputProfilePhoto):
|
||||
"""An animated profile photo in the MPEG4 format.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
animation (:term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` | \
|
||||
|
||||
+2
-2
@@ -155,7 +155,7 @@ class GiftInfo(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal if their :attr:`gift` is equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
gift (:class:`Gift`): Information about the gift.
|
||||
@@ -305,7 +305,7 @@ class AcceptedGiftTypes(TelegramObject):
|
||||
considered equal if their :attr:`unlimited_gifts`, :attr:`limited_gifts`,
|
||||
:attr:`unique_gifts` and :attr:`premium_subscription` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
unlimited_gifts (:class:`bool`): :obj:`True`, if unlimited regular gifts are accepted.
|
||||
|
||||
@@ -449,7 +449,7 @@ class Message(MaybeInaccessibleMessage):
|
||||
paid_star_count (:obj:`int`, optional): The number of Telegram Stars that were paid by the
|
||||
sender of the message to send it
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
passport_data (:class:`telegram.PassportData`, optional): Telegram Passport data.
|
||||
poll (:class:`telegram.Poll`, optional): Message is a native poll,
|
||||
information about the poll.
|
||||
@@ -535,11 +535,11 @@ class Message(MaybeInaccessibleMessage):
|
||||
gift (:class:`telegram.GiftInfo`, optional): Service message: a regular gift was sent
|
||||
or received.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
unique_gift (:class:`telegram.UniqueGiftInfo`, optional): Service message: a unique gift
|
||||
was sent or received
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
giveaway_created (:class:`telegram.GiveawayCreated`, optional): Service message: a
|
||||
scheduled giveaway was created
|
||||
|
||||
@@ -559,7 +559,7 @@ class Message(MaybeInaccessibleMessage):
|
||||
paid_message_price_changed (:class:`telegram.PaidMessagePriceChanged`, optional): Service
|
||||
message: the price for paid messages has changed in the chat
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
external_reply (:class:`telegram.ExternalReplyInfo`, optional): Information about the
|
||||
message that is being replied to, which may come from another chat or forum topic.
|
||||
|
||||
@@ -793,7 +793,7 @@ class Message(MaybeInaccessibleMessage):
|
||||
paid_star_count (:obj:`int`): Optional. The number of Telegram Stars that were paid by the
|
||||
sender of the message to send it
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
passport_data (:class:`telegram.PassportData`): Optional. Telegram Passport data.
|
||||
|
||||
Examples:
|
||||
@@ -879,11 +879,11 @@ class Message(MaybeInaccessibleMessage):
|
||||
gift (:class:`telegram.GiftInfo`): Optional. Service message: a regular gift was sent
|
||||
or received.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
unique_gift (:class:`telegram.UniqueGiftInfo`): Optional. Service message: a unique gift
|
||||
was sent or received
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
giveaway_created (:class:`telegram.GiveawayCreated`): Optional. Service message: a
|
||||
scheduled giveaway was created
|
||||
|
||||
@@ -903,7 +903,7 @@ class Message(MaybeInaccessibleMessage):
|
||||
paid_message_price_changed (:class:`telegram.PaidMessagePriceChanged`): Optional. Service
|
||||
message: the price for paid messages has changed in the chat
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
external_reply (:class:`telegram.ExternalReplyInfo`): Optional. Information about the
|
||||
message that is being replied to, which may come from another chat or forum topic.
|
||||
|
||||
@@ -4554,7 +4554,7 @@ class Message(MaybeInaccessibleMessage):
|
||||
For the documentation of the arguments, please see
|
||||
:meth:`telegram.Bot.read_business_message`.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Returns:
|
||||
:obj:`bool` On success, :obj:`True` is returned.
|
||||
|
||||
@@ -48,7 +48,7 @@ class OwnedGift(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal, if their :attr:`type` is equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
type (:obj:`str`): Type of the owned gift.
|
||||
@@ -108,7 +108,7 @@ class OwnedGifts(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal, if their :attr:`total_count` and :attr:`gifts` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
total_count (:obj:`int`): The total number of gifts owned by the user or the chat.
|
||||
@@ -161,7 +161,7 @@ class OwnedGiftRegular(OwnedGift):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal, if their :attr:`gift` and :attr:`send_date` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
gift (:class:`telegram.Gift`): Information about the regular gift.
|
||||
@@ -339,7 +339,7 @@ class OwnedGiftUnique(OwnedGift):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal, if their :attr:`gift` and :attr:`send_date` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
gift (:class:`telegram.UniqueGift`): Information about the unique gift.
|
||||
|
||||
@@ -29,7 +29,7 @@ class PaidMessagePriceChanged(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal, if their :attr:`paid_message_star_count` is equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
paid_message_star_count (:obj:`int`): The new number of Telegram Stars that must be paid by
|
||||
|
||||
@@ -285,7 +285,7 @@ class TransactionPartnerUser(TransactionPartner):
|
||||
|
||||
.. versionadded:: 21.4
|
||||
|
||||
.. versionchanged:: NEXT.VERSION
|
||||
.. versionchanged:: 22.1
|
||||
Equality comparison now includes the new required argument :paramref:`transaction_type`,
|
||||
introduced in Bot API 9.0.
|
||||
|
||||
@@ -300,7 +300,7 @@ class TransactionPartnerUser(TransactionPartner):
|
||||
:tg-const:`telegram.constants.TransactionPartnerUser.BUSINESS_ACCOUNT_TRANSFER` for
|
||||
direct transfers from managed business accounts.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
user (:class:`telegram.User`): Information about the user.
|
||||
affiliate (:class:`telegram.AffiliateInfo`, optional): Information about the affiliate that
|
||||
received a commission via this transaction. Can be available only for
|
||||
@@ -337,7 +337,7 @@ class TransactionPartnerUser(TransactionPartner):
|
||||
:tg-const:`telegram.constants.TransactionPartnerUser.PREMIUM_PURCHASE`
|
||||
transactions only.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Attributes:
|
||||
type (:obj:`str`): The type of the transaction partner,
|
||||
@@ -352,7 +352,7 @@ class TransactionPartnerUser(TransactionPartner):
|
||||
:tg-const:`telegram.constants.TransactionPartnerUser.BUSINESS_ACCOUNT_TRANSFER` for
|
||||
direct transfers from managed business accounts.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
user (:class:`telegram.User`): Information about the user.
|
||||
affiliate (:class:`telegram.AffiliateInfo`): Optional. Information about the affiliate that
|
||||
received a commission via this transaction. Can be available only for
|
||||
@@ -389,7 +389,7 @@ class TransactionPartnerUser(TransactionPartner):
|
||||
:tg-const:`telegram.constants.TransactionPartnerUser.PREMIUM_PURCHASE`
|
||||
transactions only.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
"""
|
||||
|
||||
@@ -422,7 +422,7 @@ class TransactionPartnerUser(TransactionPartner):
|
||||
) -> None:
|
||||
super().__init__(type=TransactionPartner.USER, api_kwargs=api_kwargs)
|
||||
|
||||
# tags: deprecated NEXT.VERSION, bot api 9.0
|
||||
# tags: deprecated 22.1, bot api 9.0
|
||||
if transaction_type is None:
|
||||
raise TypeError("`transaction_type` is a required argument since Bot API 9.0")
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class StoryAreaPosition(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal, if all of their attributes are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
x_percentage (:obj:`float`): The abscissa of the area's center, as a percentage of the
|
||||
@@ -111,7 +111,7 @@ class LocationAddress(TelegramObject):
|
||||
considered equal, if their :attr:`country_code`, :attr:`state`, :attr:`city` and :attr:`street`
|
||||
are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
country_code (:obj:`str`): The two-letter ``ISO 3166-1 alpha-2`` country code of the
|
||||
@@ -162,7 +162,7 @@ class StoryAreaType(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal, if their :attr:`type` is equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
type (:obj:`str`): Type of the area.
|
||||
@@ -205,7 +205,7 @@ class StoryAreaTypeLocation(StoryAreaType):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal, if their :attr:`latitude` and :attr:`longitude` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
latitude (:obj:`float`): Location latitude in degrees.
|
||||
@@ -250,7 +250,7 @@ class StoryAreaTypeSuggestedReaction(StoryAreaType):
|
||||
considered equal, if their :attr:`reaction_type`, :attr:`is_dark` and :attr:`is_flipped`
|
||||
are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
reaction_type (:class:`ReactionType`): Type of the reaction.
|
||||
@@ -295,7 +295,7 @@ class StoryAreaTypeLink(StoryAreaType):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal, if their :attr:`url` is equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
url (:obj:`str`): ``HTTP`` or ``tg://`` URL to be opened when the area is clicked.
|
||||
@@ -331,7 +331,7 @@ class StoryAreaTypeWeather(StoryAreaType):
|
||||
considered equal, if their :attr:`temperature`, :attr:`emoji` and
|
||||
:attr:`background_color` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
temperature (:obj:`float`): Temperature, in degree Celsius.
|
||||
@@ -375,7 +375,7 @@ class StoryAreaTypeUniqueGift(StoryAreaType):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal, if their :attr:`name` is equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
name (:obj:`str`): Unique name of the gift.
|
||||
@@ -409,7 +409,7 @@ class StoryArea(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal, if their :attr:`position` and :attr:`type` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
position (:class:`telegram.StoryAreaPosition`): Position of the area.
|
||||
|
||||
@@ -37,7 +37,7 @@ class UniqueGiftModel(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal if their :attr:`name`, :attr:`sticker` and :attr:`rarity_per_mille` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
name (:obj:`str`): Name of the model.
|
||||
@@ -92,7 +92,7 @@ class UniqueGiftSymbol(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal if their :attr:`name`, :attr:`sticker` and :attr:`rarity_per_mille` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
name (:obj:`str`): Name of the symbol.
|
||||
@@ -148,7 +148,7 @@ class UniqueGiftBackdropColors(TelegramObject):
|
||||
considered equal if their :attr:`center_color`, :attr:`edge_color`, :attr:`symbol_color`,
|
||||
and :attr:`text_color` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
center_color (:obj:`int`): The color in the center of the backdrop in RGB format.
|
||||
@@ -197,7 +197,7 @@ class UniqueGiftBackdrop(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal if their :attr:`name`, :attr:`colors`, and :attr:`rarity_per_mille` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
name (:obj:`str`): Name of the backdrop.
|
||||
@@ -253,7 +253,7 @@ class UniqueGift(TelegramObject):
|
||||
considered equal if their :attr:`base_name`, :attr:`name`, :attr:`number`, :class:`model`,
|
||||
:attr:`symbol`, and :attr:`backdrop` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
base_name (:obj:`str`): Human-readable name of the regular gift from which this unique
|
||||
@@ -336,7 +336,7 @@ class UniqueGiftInfo(TelegramObject):
|
||||
Objects of this class are comparable in terms of equality. Two objects of this class are
|
||||
considered equal if their :attr:`gift`, and :attr:`origin` are equal.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Args:
|
||||
gift (:class:`UniqueGift`): Information about the gift.
|
||||
|
||||
+1
-1
@@ -1722,7 +1722,7 @@ class User(TelegramObject):
|
||||
For the documentation of the arguments, please see
|
||||
:meth:`telegram.Bot.gift_premium_subscription`.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
|
||||
Returns:
|
||||
:obj:`bool`: On success, :obj:`True` is returned.
|
||||
|
||||
@@ -51,6 +51,6 @@ class Version(NamedTuple):
|
||||
|
||||
|
||||
__version_info__: Final[Version] = Version(
|
||||
major=22, minor=0, micro=0, releaselevel="final", serial=0
|
||||
major=22, minor=1, micro=0, releaselevel="final", serial=0
|
||||
)
|
||||
__version__: Final[str] = str(__version_info__)
|
||||
|
||||
+26
-26
@@ -720,7 +720,7 @@ class BusinessLimit(IntEnum):
|
||||
"""This enum contains limitations related to handling business accounts. The enum members
|
||||
of this enumeration are instances of :class:`int` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -961,7 +961,7 @@ class ChatSubscriptionLimit(IntEnum):
|
||||
MAX_PRICE = 10000
|
||||
""":obj:`int`: Amount of stars a user pays, maximum amount the subscription can be set to.
|
||||
|
||||
.. versionchanged:: NEXT.VERSION
|
||||
.. versionchanged:: 22.1
|
||||
Bot API 9.0 changed the value to 10000.
|
||||
"""
|
||||
|
||||
@@ -1448,7 +1448,7 @@ class InputProfilePhotoType(StringEnum):
|
||||
"""This enum contains the available types of :class:`telegram.InputProfilePhoto`. The enum
|
||||
members of this enumeration are instances of :class:`str` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -1464,7 +1464,7 @@ class InputStoryContentLimit(StringEnum):
|
||||
:class:`telegram.InputStoryContentVideo`. The enum members of this enumeration are instances
|
||||
of :class:`int` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -1510,7 +1510,7 @@ class InputStoryContentType(StringEnum):
|
||||
"""This enum contains the available types of :class:`telegram.InputStoryContent`. The enum
|
||||
members of this enumeration are instances of :class:`str` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -2104,7 +2104,7 @@ class MessageType(StringEnum):
|
||||
GIFT = "gift"
|
||||
""":obj:`str`: Messages with :attr:`telegram.Message.gift`.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
GIVEAWAY = "giveaway"
|
||||
""":obj:`str`: Messages with :attr:`telegram.Message.giveaway`.
|
||||
@@ -2197,7 +2197,7 @@ class MessageType(StringEnum):
|
||||
UNIQUE_GIFT = "unique_gift"
|
||||
""":obj:`str`: Messages with :attr:`telegram.Message.unique_gift`.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
USERS_SHARED = "users_shared"
|
||||
""":obj:`str`: Messages with :attr:`telegram.Message.users_shared`.
|
||||
@@ -2239,7 +2239,7 @@ class Nanostar(FloatEnum):
|
||||
The enum members of this enumeration are instances of :class:`float` and can be treated as
|
||||
such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -2260,7 +2260,7 @@ class NanostarLimit(IntEnum):
|
||||
and :class:`telegram.StarAmount`.
|
||||
The enum members of this enumeration are instances of :class:`int` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -2284,7 +2284,7 @@ class OwnedGiftType(StringEnum):
|
||||
"""This enum contains the available types of :class:`telegram.OwnedGift`. The enum
|
||||
members of this enumeration are instances of :class:`str` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -2336,7 +2336,7 @@ class PremiumSubscription(IntEnum):
|
||||
"""This enum contains limitations for :meth:`~telegram.Bot.gift_premium_subscription`.
|
||||
The enum members of this enumeration are instances of :class:`int` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -2737,7 +2737,7 @@ class RevenueWithdrawalStateType(StringEnum):
|
||||
""":obj:`str`: A withdrawal failed and the transaction was refunded."""
|
||||
|
||||
|
||||
# tags: deprecated NEXT.VERSION, bot api 9.0
|
||||
# tags: deprecated 22.1, bot api 9.0
|
||||
class StarTransactions(FloatEnum):
|
||||
"""This enum contains constants for :class:`telegram.StarTransaction`.
|
||||
The enum members of this enumeration are instances of :class:`float` and can be treated as
|
||||
@@ -2745,7 +2745,7 @@ class StarTransactions(FloatEnum):
|
||||
|
||||
.. versionadded:: 21.9
|
||||
|
||||
.. deprecated:: NEXT.VERSION
|
||||
.. deprecated:: 22.1
|
||||
This class will be removed as its only member :attr:`NANOSTAR_VALUE` will be replaced
|
||||
by :attr:`telegram.constants.Nanostar.VALUE`.
|
||||
"""
|
||||
@@ -2756,7 +2756,7 @@ class StarTransactions(FloatEnum):
|
||||
""":obj:`float`: The value of one nanostar as used in
|
||||
:attr:`telegram.StarTransaction.nanostar_amount`.
|
||||
|
||||
.. deprecated:: NEXT.VERSION
|
||||
.. deprecated:: 22.1
|
||||
This member will be replaced by :attr:`telegram.constants.Nanostar.VALUE`.
|
||||
"""
|
||||
|
||||
@@ -2779,17 +2779,17 @@ class StarTransactionsLimit(IntEnum):
|
||||
""":obj:`int`: Maximum value allowed for the
|
||||
:paramref:`~telegram.Bot.get_star_transactions.limit` parameter of
|
||||
:meth:`telegram.Bot.get_star_transactions`."""
|
||||
# tags: deprecated NEXT.VERSION, bot api 9.0
|
||||
# tags: deprecated 22.1, bot api 9.0
|
||||
NANOSTAR_MIN_AMOUNT = NanostarLimit.MIN_AMOUNT
|
||||
""":obj:`int`: Minimum value allowed for :paramref:`~telegram.AffiliateInfo.nanostar_amount`
|
||||
parameter of :class:`telegram.AffiliateInfo`.
|
||||
|
||||
.. versionadded:: 21.9
|
||||
|
||||
.. deprecated:: NEXT.VERSION
|
||||
.. deprecated:: 22.1
|
||||
This member will be replaced by :attr:`telegram.constants.NanostarLimit.MIN_AMOUNT`.
|
||||
"""
|
||||
# tags: deprecated NEXT.VERSION, bot api 9.0
|
||||
# tags: deprecated 22.1, bot api 9.0
|
||||
NANOSTAR_MAX_AMOUNT = NanostarLimit.MAX_AMOUNT
|
||||
""":obj:`int`: Maximum value allowed for :paramref:`~telegram.StarTransaction.nanostar_amount`
|
||||
parameter of :class:`telegram.StarTransaction` and
|
||||
@@ -2798,7 +2798,7 @@ class StarTransactionsLimit(IntEnum):
|
||||
|
||||
.. versionadded:: 21.9
|
||||
|
||||
.. deprecated:: NEXT.VERSION
|
||||
.. deprecated:: 22.1
|
||||
This member will be replaced by :attr:`telegram.constants.NanostarLimit.MAX_AMOUNT`.
|
||||
"""
|
||||
|
||||
@@ -2940,7 +2940,7 @@ class StoryAreaPositionLimit(IntEnum):
|
||||
"""This enum contains limitations for :class:`telegram.StoryAreaPosition`.
|
||||
The enum members of this enumeration are instances of :class:`int` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -2956,7 +2956,7 @@ class StoryAreaTypeLimit(IntEnum):
|
||||
"""This enum contains limitations for subclasses of :class:`telegram.StoryAreaType`.
|
||||
The enum members of this enumeration are instances of :class:`int` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -2982,7 +2982,7 @@ class StoryAreaTypeType(StringEnum):
|
||||
"""This enum contains the available types of :class:`telegram.StoryAreaType`. The enum
|
||||
members of this enumeration are instances of :class:`str` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -3004,7 +3004,7 @@ class StoryLimit(StringEnum):
|
||||
:meth:`~telegram.Bot.edit_story`.
|
||||
The enum members of this enumeration are instances of :class:`int` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -3068,7 +3068,7 @@ class TransactionPartnerUser(StringEnum):
|
||||
The enum members of this enumeration are instances of :class:`str` and can be treated as
|
||||
such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -3201,7 +3201,7 @@ class UniqueGiftInfoOrigin(StringEnum):
|
||||
"""This enum contains the available origins for :class:`telegram.UniqueGiftInfo`. The enum
|
||||
members of this enumeration are instances of :class:`str` and can be treated as such.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
@@ -3389,7 +3389,7 @@ class InvoiceLimit(IntEnum):
|
||||
:meth:`telegram.Bot.send_paid_media`.
|
||||
|
||||
.. versionadded:: 21.6
|
||||
.. versionchanged:: NEXT.VERSION
|
||||
.. versionchanged:: 22.1
|
||||
Bot API 9.0 changed the value to 10000.
|
||||
"""
|
||||
SUBSCRIPTION_PERIOD = dtm.timedelta(days=30).total_seconds()
|
||||
@@ -3404,7 +3404,7 @@ class InvoiceLimit(IntEnum):
|
||||
:meth:`telegram.Bot.create_invoice_link`.
|
||||
|
||||
.. versionadded:: 21.9
|
||||
.. versionchanged:: NEXT.VERSION
|
||||
.. versionchanged:: 22.1
|
||||
Bot API 9.0 changed the value to 10000.
|
||||
"""
|
||||
|
||||
|
||||
@@ -2091,7 +2091,7 @@ class StatusUpdate:
|
||||
GIFT = _Gift(name="filters.StatusUpdate.GIFT")
|
||||
"""Messages that contain :attr:`telegram.Message.gift`.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
class _GiveawayCreated(MessageFilter):
|
||||
@@ -2188,7 +2188,7 @@ class StatusUpdate:
|
||||
)
|
||||
"""Messages that contain :attr:`telegram.Message.paid_message_price_changed`.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
class _PinnedMessage(MessageFilter):
|
||||
@@ -2231,7 +2231,7 @@ class StatusUpdate:
|
||||
UNIQUE_GIFT = _UniqueGift(name="filters.StatusUpdate.UNIQUE_GIFT")
|
||||
"""Messages that contain :attr:`telegram.Message.unique_gift`.
|
||||
|
||||
.. versionadded:: NEXT.VERSION
|
||||
.. versionadded:: 22.1
|
||||
"""
|
||||
|
||||
class _UsersShared(MessageFilter):
|
||||
|
||||
Reference in New Issue
Block a user