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.4_2025-09-13/4939.YDNzLiFegKD2difT6yr6P7.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
other = "Bump Version to v22.4"
[[pull_requests]]
uid = "4939"
author_uid = "Bibo-Joshi"
closes_threads = []
82 changes: 41 additions & 41 deletions src/telegram/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,10 +1067,10 @@ async def send_message(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1289,12 +1289,12 @@ async def forward_message(
object containing the parameters of the suggested post to send; for direct messages
chats only.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): Identifier of the direct messages
topic to which the message will be forwarded; required if the message is
forwarded to a direct messages chat.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Returns:
:class:`telegram.Message`: On success, the sent Message is returned.
Expand Down Expand Up @@ -1363,7 +1363,7 @@ async def forward_messages(
topic to which the messages will be forwarded; required if the messages are
forwarded to a direct messages chat.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Returns:
tuple[:class:`telegram.Message`]: On success, a tuple of ``MessageId`` of sent messages
Expand Down Expand Up @@ -1487,10 +1487,10 @@ async def send_photo(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1662,10 +1662,10 @@ async def send_audio(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1832,10 +1832,10 @@ async def send_document(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1974,10 +1974,10 @@ async def send_sticker(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2162,10 +2162,10 @@ async def send_video(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2334,10 +2334,10 @@ async def send_video_note(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2514,10 +2514,10 @@ async def send_animation(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2686,10 +2686,10 @@ async def send_voice(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2828,7 +2828,7 @@ async def send_media_group(
topic to which the messages will be sent; required if the messages are sent to a
direct messages chat.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4


Keyword Args:
Expand Down Expand Up @@ -3028,10 +3028,10 @@ async def send_location(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -3355,10 +3355,10 @@ async def send_venue(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -3513,10 +3513,10 @@ async def send_contact(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -5522,10 +5522,10 @@ async def send_invoice(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -5923,7 +5923,7 @@ async def promote_chat_member(
administrator can manage direct messages within the channel and decline suggested
posts; for channels only

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Returns:
:obj:`bool`: On success, :obj:`True` is returned.
Expand Down Expand Up @@ -7948,10 +7948,10 @@ async def send_dice(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -8394,10 +8394,10 @@ async def copy_message(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -8519,7 +8519,7 @@ async def copy_messages(
topic to which the message will be sent; required if the message is sent to a
direct messages chat.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4


Returns:
Expand Down Expand Up @@ -10995,13 +10995,13 @@ async def send_paid_media(
suggested_post_parameters (:class:`telegram.SuggestedPostParameters`, optional):
|suggested_post_parameters|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
direct_messages_topic_id (:obj:`int`, optional): |direct_messages_topic_id|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
message_thread_id (:obj:`int`, optional): |message_thread_id_arg|

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -11485,7 +11485,7 @@ async def approve_suggested_post(
The bot must have the :attr:`~telegram.ChatMemberAdministrator.can_post_messages`
administrator right in the corresponding channel chat.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Args:
chat_id (:obj:`int`): Unique identifier of the target direct messages chat.
Expand Down Expand Up @@ -11537,7 +11537,7 @@ async def decline_suggested_post(
The bot must have the :attr:`~telegram.ChatMemberAdministrator.can_manage_direct_messages`
administrator right in the corresponding channel chat.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Args:
chat_id (:obj:`int`): Unique identifier of the target direct messages chat.
Expand Down
8 changes: 4 additions & 4 deletions src/telegram/_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3803,7 +3803,7 @@ async def approve_suggested_post(
For the documentation of the arguments, please see
:meth:`telegram.Bot.approve_suggested_post`.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Returns:
:obj:`bool`: On success, :obj:`True` is returned.
Expand Down Expand Up @@ -3838,7 +3838,7 @@ async def decline_suggested_post(
For the documentation of the arguments, please see
:meth:`telegram.Bot.decline_suggested_post`.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Returns:
:obj:`bool`: On success, :obj:`True` is returned.
Expand Down Expand Up @@ -3894,7 +3894,7 @@ class Chat(_ChatBase):
is_direct_messages (:obj:`bool`, optional): :obj:`True`, if the chat is the direct messages
chat of a channel.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Attributes:
id (:obj:`int`): Unique identifier for this chat.
Expand All @@ -3912,7 +3912,7 @@ class Chat(_ChatBase):
is_direct_messages (:obj:`bool`): Optional. :obj:`True`, if the chat is the direct messages
chat of a channel.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

.. _topics: https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups
"""
Expand Down
6 changes: 3 additions & 3 deletions src/telegram/_chatadministratorrights.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ChatAdministratorRights(TelegramObject):
and :attr:`can_delete_stories` is now required. Thus, the order of arguments had to be
changed.

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

Expand Down Expand Up @@ -105,7 +105,7 @@ class ChatAdministratorRights(TelegramObject):
can_manage_direct_messages (:obj:`bool`, optional): :obj:`True`, if the administrator can
manage direct messages of the channel and decline suggested posts; for channels only.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Attributes:
is_anonymous (:obj:`bool`): :obj:`True`, if the user's presence in the chat is hidden.
Expand Down Expand Up @@ -158,7 +158,7 @@ class ChatAdministratorRights(TelegramObject):
can_manage_direct_messages (:obj:`bool`): Optional. :obj:`True`, if the administrator can
manage direct messages of the channel and decline suggested posts; for channels only.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
"""

__slots__ = (
Expand Down
8 changes: 4 additions & 4 deletions src/telegram/_chatfullinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ class ChatFullInfo(_ChatBase):
is_direct_messages (:obj:`bool`, optional): :obj:`True`, if the chat is the direct messages
chat of a channel.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
parent_chat (:obj:`telegram.Chat`, optional): Information about the corresponding channel
chat; for direct messages chats only.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Attributes:
id (:obj:`int`): Unique identifier for this chat.
Expand Down Expand Up @@ -399,11 +399,11 @@ class ChatFullInfo(_ChatBase):
is_direct_messages (:obj:`bool`): Optional. :obj:`True`, if the chat is the direct messages
chat of a channel.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
parent_chat (:obj:`telegram.Chat`): Optional. Information about the corresponding channel
chat; for direct messages chats only.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

.. _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
4 changes: 2 additions & 2 deletions src/telegram/_chatmember.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class ChatMemberAdministrator(ChatMember):
can_manage_direct_messages (:obj:`bool`, optional): :obj:`True`, if the administrator can
manage direct messages of the channel and decline suggested posts; for channels only.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4

Attributes:
status (:obj:`str`): The member's status in the chat,
Expand Down Expand Up @@ -320,7 +320,7 @@ class ChatMemberAdministrator(ChatMember):
can_manage_direct_messages (:obj:`bool`, optional): :obj:`True`, if the administrator can
manage direct messages of the channel and decline suggested posts; for channels only.

.. versionadded:: NEXT.VERSION
.. versionadded:: 22.4
"""

__slots__ = (
Expand Down
Loading