Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Functionality Deprecated in v21.2 #4266

Merged
merged 5 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
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: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
release = "21.2" # telegram.__version__

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = "6.1.3"
harshil21 marked this conversation as resolved.
Show resolved Hide resolved
needs_sphinx = "7.3.7"

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
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
Loading