Skip to content

Commit

Permalink
Remove Functionality Deprecated in Bot API 7.3 (#4266)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshil21 committed May 29, 2024
1 parent 6ba7a09 commit c1c5438
Show file tree
Hide file tree
Showing 13 changed files with 694 additions and 1,260 deletions.
1 change: 1 addition & 0 deletions docs/auxil/sphinx_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"_BaseThumbedMedium": "TelegramObject",
"_BaseMedium": "TelegramObject",
"_CredentialsBase": "TelegramObject",
"_ChatBase": "TelegramObject",
}


Expand Down
2 changes: 2 additions & 0 deletions docs/source/telegram.chat.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Chat
====

.. Also lists methods of _ChatBase, but not the ones of TelegramObject
.. autoclass:: telegram.Chat
:members:
:show-inheritance:
:inherited-members: TelegramObject
4 changes: 3 additions & 1 deletion docs/source/telegram.chatfullinfo.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ChatFullInfo
============

.. Also lists methods of _ChatBase, but not the ones of TelegramObject
.. autoclass:: telegram.ChatFullInfo
:members:
:show-inheritance:
:show-inheritance:
:inherited-members: TelegramObject
2 changes: 1 addition & 1 deletion docs/source/telegram.photosize.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PhotoSize
=========
.. Also lists methods of _BaseThumbedMedium, but not the ones of TelegramObject
.. Also lists methods of _BaseMedium, but not the ones of TelegramObject
.. autoclass:: telegram.PhotoSize
:members:
Expand Down
8 changes: 4 additions & 4 deletions telegram/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ async def forward_message(
Note:
Since the release of Bot API 5.5 it can be impossible to forward messages from
some chats. Use the attributes :attr:`telegram.Message.has_protected_content` and
:attr:`telegram.Chat.has_protected_content` to check this.
:attr:`telegram.ChatFullInfo.has_protected_content` to check this.
As a workaround, it is still possible to use :meth:`copy_message`. However, this
behaviour is undocumented and might be changed by Telegram.
Expand Down Expand Up @@ -4610,8 +4610,8 @@ async def set_chat_sticker_set(
) -> bool:
"""Use this method to set a new group sticker set for a supergroup.
The bot must be an administrator in the chat for this to work and must have the appropriate
admin rights. Use the field :attr:`telegram.Chat.can_set_sticker_set` optionally returned
in :meth:`get_chat` requests to check if the bot can use this method.
admin rights. Use the field :attr:`telegram.ChatFullInfo.can_set_sticker_set` optionally
returned in :meth:`get_chat` requests to check if the bot can use this method.
Args:
chat_id (:obj:`int` | :obj:`str`): |chat_id_group|
Expand Down Expand Up @@ -4644,7 +4644,7 @@ async def delete_chat_sticker_set(
) -> bool:
"""Use this method to delete a group sticker set from a supergroup. The bot must be an
administrator in the chat for this to work and must have the appropriate admin rights.
Use the field :attr:`telegram.Chat.can_set_sticker_set` optionally returned in
Use the field :attr:`telegram.ChatFullInfo.can_set_sticker_set` optionally returned in
:meth:`get_chat` requests to check if the bot can use this method.
Args:
Expand Down
Loading

0 comments on commit c1c5438

Please sign in to comment.