X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changes/22.7_2026-03-16/5176.UzCwJkd4nVg8LM4WeTdn9a.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
other = "Bump Version to v22.7"
[[pull_requests]]
uid = "5176"
author_uids = ["harshil21"]
closes_threads = []
14 changes: 7 additions & 7 deletions src/telegram/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ async def send_message_draft(

.. versionadded:: 22.6

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 22.7
Now all bots can use this method.


Expand Down Expand Up @@ -6014,7 +6014,7 @@ async def promote_chat_member(
can_manage_tags (:obj:`bool`, optional): Pass :obj:`True`, if the administrator can
edit the tags of regular members; for groups and supergroups only.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Returns:
:obj:`bool`: On success, :obj:`True` is returned.
Expand Down Expand Up @@ -9972,7 +9972,7 @@ async def get_business_account_gifts(

.. versionadded:: 22.1

.. versionremoved:: NEXT.VERSION
.. versionremoved:: 22.7
Bot API 9.3 removed the :paramref:`exclude_limited` parameter. Use
:paramref:`exclude_limited_upgradable` and :paramref:`exclude_limited_non_upgradable`
instead.
Expand Down Expand Up @@ -11926,7 +11926,7 @@ async def set_my_profile_photo(
"""
Changes the profile photo of the bot.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Args:
photo (:class:`telegram.InputProfilePhoto`): The new profile photo to set.
Expand Down Expand Up @@ -11963,7 +11963,7 @@ async def remove_my_profile_photo(
"""
Removes the profile photo of the bot. Requires no parameters.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Returns:
:obj:`bool`: On success, :obj:`True` is returned.
Expand Down Expand Up @@ -11997,7 +11997,7 @@ async def get_user_profile_audios(
"""
Use this method to get a list of profile audios for a user.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Args:
user_id (:obj:`int`): Unique identifier of the target user.
Expand Down Expand Up @@ -12050,7 +12050,7 @@ async def set_chat_member_tag(
be an administrator in the chat for this to work and must have the
:attr:`~telegram.ChatMemberAdministrator.can_manage_tags` administrator right.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Args:
chat_id (:obj:`int` | :obj:`str`): |chat_id_group|
Expand Down
2 changes: 1 addition & 1 deletion src/telegram/_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -4016,7 +4016,7 @@ async def set_chat_member_tag(
For the documentation of the arguments, please see
:meth:`telegram.Bot.set_chat_member_tag`.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Returns:
:obj:`bool`: On success, :obj:`True` is returned.
Expand Down
6 changes: 3 additions & 3 deletions src/telegram/_chatadministratorrights.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ChatAdministratorRights(TelegramObject):
:attr:`can_manage_direct_messages` is considered as well when comparing objects of
this type in terms of equality.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 22.7
:attr:`can_manage_tags` is considered as well when comparing objects of this type in terms
of equality.

Expand Down Expand Up @@ -113,7 +113,7 @@ class ChatAdministratorRights(TelegramObject):
tags of regular members; for groups and supergroups only. If omitted defaults to the
value of :attr:`can_pin_messages`.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Attributes:
is_anonymous (:obj:`bool`): :obj:`True`, if the user's presence in the chat is hidden.
Expand Down Expand Up @@ -171,7 +171,7 @@ class ChatAdministratorRights(TelegramObject):
tags of regular members; for groups and supergroups only. If omitted defaults to the
value of :attr:`can_pin_messages`.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
"""

__slots__ = (
Expand Down
4 changes: 2 additions & 2 deletions src/telegram/_chatfullinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class ChatFullInfo(_ChatBase):
first_profile_audio (:obj:`telegram.Audio`, optional): For private chats, the first audio
added to the profile of the user.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7


Attributes:
Expand Down Expand Up @@ -441,7 +441,7 @@ class ChatFullInfo(_ChatBase):
first_profile_audio (:obj:`telegram.Audio`): Optional. For private chats, the first audio
added to the profile of the user.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

.. _accent colors: https://core.telegram.org/bots/api#accent-colors
.. _topics: https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups
Expand Down
16 changes: 8 additions & 8 deletions src/telegram/_chatmember.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class ChatMemberAdministrator(ChatMember):
tags of regular members; for groups and supergroups only. If omitted defaults to the
value of :attr:`can_pin_messages`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
Attributes:
status (:obj:`str`): The member's status in the chat,
Expand Down Expand Up @@ -330,7 +330,7 @@ class ChatMemberAdministrator(ChatMember):
tags of regular members; for groups and supergroups only. If omitted defaults to the
value of :attr:`can_pin_messages`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
"""

__slots__ = (
Expand Down Expand Up @@ -419,7 +419,7 @@ class ChatMemberMember(ChatMember):
.. versionadded:: 21.5
tag (:obj:`str`, optional): Tag of the member.
.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
Attributes:
status (:obj:`str`): The member's status in the chat,
Expand All @@ -431,7 +431,7 @@ class ChatMemberMember(ChatMember):
.. versionadded:: 21.5
tag (:obj:`str`): Optional. Tag of the member.
.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
"""

Expand Down Expand Up @@ -516,10 +516,10 @@ class ChatMemberRestricted(ChatMember):
.. versionadded:: 20.1
can_edit_tag (:obj:`bool`): :obj:`True`, if the user is allowed to edit their own tag.
.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
tag (:obj:`str`, optional): Tag of the member.
.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
Attributes:
status (:obj:`str`): The member's status in the chat,
Expand Down Expand Up @@ -572,10 +572,10 @@ class ChatMemberRestricted(ChatMember):
.. versionadded:: 20.1
can_edit_tag (:obj:`bool`): :obj:`True`, if the user is allowed to edit their own tag.
.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
tag (:obj:`str`): Optional. Tag of the member.
.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
"""

Expand Down
4 changes: 2 additions & 2 deletions src/telegram/_chatowner.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ChatOwnerChanged(TelegramObject):
Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`new_owner` is equal.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Args:
new_owner (:class:`telegram.User`): The new owner of the chat
Expand Down Expand Up @@ -76,7 +76,7 @@ class ChatOwnerLeft(TelegramObject):
Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`new_owner` is equal.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Args:
new_owner (:class:`telegram.User`, optional): The user which will be the new owner of the
Expand Down
6 changes: 3 additions & 3 deletions src/telegram/_chatpermissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ChatPermissions(TelegramObject):
:attr:`can_send_videos`, :attr:`can_send_video_notes` and :attr:`can_send_voice_notes`
are considered as well when comparing objects of this type in terms of equality.
* Removed deprecated argument and attribute ``can_send_media_messages``.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 22.7
:attr:`can_edit_tag` is considered as well when comparing objects of
this type in terms of equality.

Expand Down Expand Up @@ -99,7 +99,7 @@ class ChatPermissions(TelegramObject):
can_edit_tag (:obj:`bool`, optional): :obj:`True`, if the user is allowed to edit their own
tag.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Attributes:
can_send_messages (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to send text
Expand Down Expand Up @@ -144,7 +144,7 @@ class ChatPermissions(TelegramObject):
can_edit_tag (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to edit their own
tag.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

"""

Expand Down
4 changes: 2 additions & 2 deletions src/telegram/_files/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Video(_BaseThumbedMedium):
qualities (Sequence[:class:`telegram.VideoQuality`], optional): List of available qualities
of the video

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Attributes:
file_id (:obj:`str`): Identifier for this file, which can be used to download
Expand Down Expand Up @@ -108,7 +108,7 @@ class Video(_BaseThumbedMedium):
qualities (Sequence[:class:`telegram.VideoQuality`]): Optional. List of available qualities
of the video

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
"""

__slots__ = (
Expand Down
2 changes: 1 addition & 1 deletion src/telegram/_files/videoquality.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class VideoQuality(_BaseMedium):
Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`file_unique_id` is equal.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Args:
file_id (:obj:`str`): Identifier for this file, which can be used
Expand Down
10 changes: 5 additions & 5 deletions src/telegram/_inline/inlinekeyboardbutton.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class InlineKeyboardButton(TelegramObject):
:attr:`web_app` is considered as well when comparing objects of this type in terms of
equality.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 22.7
:attr:`style` and :attr:`icon_custom_emoji_id` are considered as well when
comparing objects of this type in terms of equality.

Expand Down Expand Up @@ -156,7 +156,7 @@ class InlineKeyboardButton(TelegramObject):
:tg-const:`telegram.constants.KeyboardButtonStyle.RED` are also available.
If omitted, then an app-specific style is used.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
switch_inline_query_chosen_chat (:class:`telegram.SwitchInlineQueryChosenChat`, optional):
If set, pressing the button will prompt the user to select one of their chats of the
specified type, open that chat and insert the bot's username and the specified inline
Expand All @@ -178,7 +178,7 @@ class InlineKeyboardButton(TelegramObject):
the bot to private, group and supergroup chats if the owner of the bot has a Telegram
Premium subscription.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Attributes:
text (:obj:`str`): Label text on the button.
Expand Down Expand Up @@ -234,7 +234,7 @@ class InlineKeyboardButton(TelegramObject):
:tg-const:`telegram.constants.KeyboardButtonStyle.RED` are also available.
If omitted, then an app-specific style is used.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
callback_game (:class:`telegram.CallbackGame`): Optional. Description of the game that will
be launched when the user presses the button.

Expand Down Expand Up @@ -268,7 +268,7 @@ class InlineKeyboardButton(TelegramObject):
the bot to private, group and supergroup chats if the owner of the bot has a Telegram
Premium subscription.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
"""

__slots__ = (
Expand Down
12 changes: 6 additions & 6 deletions src/telegram/_keyboardbutton.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ class KeyboardButton(TelegramObject):
.. versionchanged:: 20.5
:attr:`request_users` and :attr:`request_chat` are considered as well when
comparing objects of this type in terms of equality.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 22.7
:attr:`icon_custom_emoji_id` is considered as well when comparing objects of this type in
terms of equality.

.. versionchanged:: NEXT.VERSION
.. versionchanged:: 22.7
:attr:`style` and :attr:`icon_custom_emoji_id` are considered as well when
comparing objects of this type in terms of equality.

Expand Down Expand Up @@ -112,14 +112,14 @@ class KeyboardButton(TelegramObject):
:tg-const:`telegram.constants.KeyboardButtonStyle.RED` are also available.
If omitted, then an app-specific style is used.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
icon_custom_emoji_id (:obj:`str`, optional): Unique identifier of the
custom emoji shown before the text of the button. Can only be used by bots that
purchased additional usernames on Fragment or in the messages directly sent by the
bot to private, group and supergroup chats if the owner of the bot has a Telegram
Premium subscription.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Attributes:
text (:obj:`str`): Text of the button. If none of the fields other than :attr:`text`,
Expand Down Expand Up @@ -159,14 +159,14 @@ class KeyboardButton(TelegramObject):
:tg-const:`telegram.constants.KeyboardButtonStyle.RED` are also available.
If omitted, then an app-specific style is used.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
icon_custom_emoji_id (:obj:`str`): Optional. Unique identifier of the
custom emoji shown before the text of the button. Can only be used by bots that
purchased additional usernames on Fragment or in the messages directly sent by the
bot to private, group and supergroup chats if the owner of the bot has a Telegram
Premium subscription.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
"""

__slots__ = (
Expand Down
12 changes: 6 additions & 6 deletions src/telegram/_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,15 +680,15 @@ class Message(MaybeInaccessibleMessage):
chat_owner_left (:class:`telegram.ChatOwnerLeft`, optional): Service message: chat owner
has left.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
chat_owner_changed (:class:`telegram.ChatOwnerChanged`, optional): Service message: chat
owner has changed.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
sender_tag (:obj:`str`, optional): Tag or custom title of the sender of the message; for
supergroups only

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

Attributes:
message_id (:obj:`int`): Unique message identifier inside this chat. In specific instances
Expand Down Expand Up @@ -1096,15 +1096,15 @@ class Message(MaybeInaccessibleMessage):
chat_owner_left (:class:`telegram.ChatOwnerLeft`): Optional. Service message: chat owner
has left.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
chat_owner_changed (:class:`telegram.ChatOwnerChanged`): Optional. Service message: chat
owner has changed.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7
sender_tag (:obj:`str`): Optional. Tag or custom title of the sender of the message; for
supergroups only

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.7

.. |custom_emoji_no_md1_support| replace:: Since custom emoji entities are not supported by
:attr:`~telegram.constants.ParseMode.MARKDOWN`, this method now raises a
Expand Down
Loading
Loading
X Tutup