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/unreleased/5168.2fnSt8zjs3pkiboD72J5Hr.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
internal = "Bump Sphinx Related Dependencies, Fix `uv` and Docs Build"
[[pull_requests]]
uid = "5168"
author_uids = ["harshil21"]
closes_threads = []
2 changes: 1 addition & 1 deletion docs/source/telegram.videoquality.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VideoQuality
=========
============
.. Also lists methods of _BaseMedium, but not the ones of TelegramObject

.. autoclass:: telegram.VideoQuality
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ tests = [
]
docs = [
"chango~=0.6.0; python_version >= '3.12'",
"sphinx==9.1.0; python_version >= '3.11'",
"furo==2025.9.25",
"sphinx==9.1.0; python_version >= '3.12'",
"furo==2025.12.19",
"sphinx-paramlinks==0.6.0",
"sphinxcontrib-mermaid==1.0.0",
"sphinxcontrib-mermaid==2.0.1",
"sphinx-copybutton==0.5.2",
"sphinx-inline-tabs==2023.4.21",
"sphinx-inline-tabs==2025.12.21.14",
# Temporary. See #4387
"sphinx-build-compatibility @ git+https://github.com/readthedocs/sphinx-build-compatibility.git@58aabc5f207c6c2421f23d3578adc0b14af57047",
# For python 3.14 support, we need a version of pydantic-core >= 2.35.0, since it upgrades the
Expand All @@ -134,7 +134,7 @@ docs = [
linting = [
"prek",
"ruff==0.15.6",
"mypy==1.18.2",
"mypy==1.19.1",
"pylint==4.0.5"
]
all = [{ include-group = "tests" }, { include-group = "docs" }, { include-group = "linting"}]
Expand Down
103 changes: 54 additions & 49 deletions src/telegram/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -11707,7 +11707,7 @@ async def repost_story(
Reposts a story on behalf of a business account from another business account.
Both business accounts must be managed by the same bot, and the story on the source account
must have been posted (or reposted) by the bot. Requires the
:attr:`~telegram.BusinessBotRight.can_manage_stories` business bot right for both
:attr:`~telegram.BusinessBotRights.can_manage_stories` business bot right for both
business accounts.

.. versionadded:: 22.6
Expand All @@ -11719,10 +11719,10 @@ async def repost_story(
from_story_id (:obj:`int`): Unique identifier of the story that should be reposted
active_period (:obj:`int` | :class:`datetime.timedelta`): Period after which the story
is moved to the archive, in seconds; must be one of
:tg-const:`telegram.constants.StoryLimit.SIX_HOURS`,
:tg-const:`telegram.constants.StoryLimit.TWELVE_HOURS`,
:tg-const:`telegram.constants.StoryLimit.ONE_DAY`, or
:tg-const:`telegram.constants.StoryLimit.TWO_DAYS`.
:tg-const:`telegram.constants.StoryLimit.ACTIVITY_SIX_HOURS`,
:tg-const:`telegram.constants.StoryLimit.ACTIVITY_TWELVE_HOURS`,
:tg-const:`telegram.constants.StoryLimit.ACTIVITY_ONE_DAY`, or
:tg-const:`telegram.constants.StoryLimit.ACTIVITY_TWO_DAYS`.
post_to_chat_page (:obj:`bool`, optional): Pass :obj:`True` to keep the story
accessible after it expires.
protect_content (:obj:`bool`, optional): Pass :obj:`True` if the content of the story
Expand Down Expand Up @@ -11777,24 +11777,27 @@ async def get_user_gifts(

.. versionadded:: 22.6

user_id (:obj:`int`): Unique identifier of the user
exclude_unlimited (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that can be
purchased an unlimited number of times
exclude_limited_upgradable (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that
can be purchased a limited number of times and can be upgraded to unique
exclude_limited_non_upgradable (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts
that can be purchased a limited number of times and can't be upgraded to unique
exclude_from_blockchain (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that
were assigned from the TON blockchain and can't be resold or transferred in Telegram
exclude_unique (:obj:`bool`, optional): Pass :obj:`True` to exclude unique gifts
sort_by_price (:obj:`bool`, optional): Pass :obj:`True` to sort results by gift price
instead of send date. Sorting is applied before pagination.
offset (:obj:`str`, optional): Offset of the first entry to return as received from the
previous request; use an empty string to get the first chunk of results
limit (:obj:`int`, optional): The maximum number of gifts to be returned;
:tg-const:`~telegram.constants.BusinessLimit.MIN_GIFT_RESULTS` -
:tg-const:`~telegram.constants.BusinessLimit.MAX_GIFT_RESLUTS`.
Defaults to :tg-const:`~telegram.constants.BusinessLimit.MAX_GIFT_RESLUTS`
Args:
user_id (:obj:`int`): Unique identifier of the user
exclude_unlimited (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that can
be purchased an unlimited number of times
exclude_limited_upgradable (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts
that can be purchased a limited number of times and can be upgraded to unique
exclude_limited_non_upgradable (:obj:`bool`, optional): Pass :obj:`True` to exclude
gifts that can be purchased a limited number of times and can't be upgraded to
unique.
exclude_from_blockchain (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that
were assigned from the TON blockchain and can't be resold or transferred in
Telegram.
exclude_unique (:obj:`bool`, optional): Pass :obj:`True` to exclude unique gifts
sort_by_price (:obj:`bool`, optional): Pass :obj:`True` to sort results by gift price
instead of send date. Sorting is applied before pagination.
offset (:obj:`str`, optional): Offset of the first entry to return as received from the
previous request; use an empty string to get the first chunk of results
limit (:obj:`int`, optional): The maximum number of gifts to be returned;
:tg-const:`~telegram.constants.BusinessLimit.MIN_GIFT_RESULTS` -
:tg-const:`~telegram.constants.BusinessLimit.MAX_GIFT_RESULTS`.
Defaults to :tg-const:`~telegram.constants.BusinessLimit.MAX_GIFT_RESULTS`

Returns:
:class:`telegram.OwnedGifts`: The owned gifts for the user.
Expand Down Expand Up @@ -11850,32 +11853,34 @@ async def get_chat_gifts(
.. versionadded:: 22.6

Args:
chat_id (:obj:`int` | :obj:`str`): |chat_id_channel|
exclude_unsaved (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that aren't
saved to the chat's profile page. Always :obj:`True`, unless the bot has the
:attr:`~telegram.ChatAdministratorRights..can_post_messages` administrator right in the
channel.
exclude_saved (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that are saved to
the chat's profile page. Always :obj:`False`, unless the bot has the
:attr:`~telegram.ChatAdministratorRights..can_post_messages` administrator right in the
channel.
exclude_unlimited (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that can be
purchased an unlimited number of times
exclude_limited_upgradable (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that
can be purchased a limited number of times and can be upgraded to unique
exclude_limited_non_upgradable (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts
that can be purchased a limited number of times and can't be upgraded to unique
exclude_from_blockchain (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that
were assigned from the TON blockchain and can't be resold or transferred in Telegram
exclude_unique (:obj:`bool`, optional): Pass :obj:`True` to exclude unique gifts
sort_by_price (:obj:`bool`, optional): Pass :obj:`True` to sort results by gift price
instead of send date. Sorting is applied before pagination.
offset (:obj:`str`, optional): Offset of the first entry to return as received from the
previous request; use an empty string to get the first chunk of results
limit (:obj:`int`, optional): The maximum number of gifts to be returned;
:tg-const:`~telegram.constants.BusinessLimit.MIN_GIFT_RESULTS` -
:tg-const:`~telegram.constants.BusinessLimit.MAX_GIFT_RESLUTS`.
Defaults to :tg-const:`~telegram.constants.BusinessLimit.MAX_GIFT_RESLUTS`
chat_id (:obj:`int` | :obj:`str`): |chat_id_channel|
exclude_unsaved (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that aren't
saved to the chat's profile page. Always :obj:`True`, unless the bot has the
:attr:`~telegram.ChatAdministratorRights.can_post_messages` administrator right in
the channel.
exclude_saved (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that are saved
to the chat's profile page. Always :obj:`False`, unless the bot has the
:attr:`~telegram.ChatAdministratorRights.can_post_messages` administrator right in
the channel.
exclude_unlimited (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that can
be purchased an unlimited number of times
exclude_limited_upgradable (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts
that can be purchased a limited number of times and can be upgraded to unique
exclude_limited_non_upgradable (:obj:`bool`, optional): Pass :obj:`True` to exclude
gifts that can be purchased a limited number of times and can't be upgraded to
unique.
exclude_from_blockchain (:obj:`bool`, optional): Pass :obj:`True` to exclude gifts that
were assigned from the TON blockchain and can't be resold or transferred in
Telegram.
exclude_unique (:obj:`bool`, optional): Pass :obj:`True` to exclude unique gifts
sort_by_price (:obj:`bool`, optional): Pass :obj:`True` to sort results by gift price
instead of send date. Sorting is applied before pagination.
offset (:obj:`str`, optional): Offset of the first entry to return as received from the
previous request; use an empty string to get the first chunk of results
limit (:obj:`int`, optional): The maximum number of gifts to be returned;
:tg-const:`~telegram.constants.BusinessLimit.MIN_GIFT_RESULTS` -
:tg-const:`~telegram.constants.BusinessLimit.MAX_GIFT_RESULTS`.
Defaults to :tg-const:`~telegram.constants.BusinessLimit.MAX_GIFT_RESULTS`

Returns:
:class:`telegram.OwnedGifts`: The owned gifts for the chat.
Expand Down
38 changes: 12 additions & 26 deletions src/telegram/_inline/inlinekeyboardbutton.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,14 @@ class InlineKeyboardButton(TelegramObject):
This type of button **must** always be the first button in the first row and can
only be used in invoice messages.
style (:obj:`str`, optional): Style of the button. Must be one of
:tg-const:`telegram.KeyboardButtonStyle.PRIMARY` (blue),
:tg-const:`telegram.KeyboardButtonStyle.SUCCESS` (green), and
:tg-const:`telegram.KeyboardButtonStyle.DANGER` (red).
Color name aliases :tg-const:`telegram.KeyboardButtonStyle.BLUE`,
:tg-const:`telegram.KeyboardButtonStyle.GREEN`, and
:tg-const:`telegram.KeyboardButtonStyle.RED` are also available.
:tg-const:`telegram.constants.KeyboardButtonStyle.PRIMARY` (blue),
:tg-const:`telegram.constants.KeyboardButtonStyle.SUCCESS` (green), and
:tg-const:`telegram.constants.KeyboardButtonStyle.DANGER` (red).
Color name aliases :tg-const:`telegram.constants.KeyboardButtonStyle.BLUE`,
:tg-const:`telegram.constants.KeyboardButtonStyle.GREEN`, and
:tg-const:`telegram.constants.KeyboardButtonStyle.RED` are also available.
If omitted, then an app-specific style is used.

.. versionadded:: NEXT.VERSION
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
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
Expand Down Expand Up @@ -233,21 +226,14 @@ class InlineKeyboardButton(TelegramObject):

.. versionadded:: 21.7
style (:obj:`str`): Optional. Style of the button. Must be one of
:tg-const:`telegram.KeyboardButtonStyle.PRIMARY` (blue),
:tg-const:`telegram.KeyboardButtonStyle.SUCCESS` (green), and
:tg-const:`telegram.KeyboardButtonStyle.DANGER` (red).
Color name aliases :tg-const:`telegram.KeyboardButtonStyle.BLUE`,
:tg-const:`telegram.KeyboardButtonStyle.GREEN`, and
:tg-const:`telegram.KeyboardButtonStyle.RED` are also available.
:tg-const:`telegram.constants.KeyboardButtonStyle.PRIMARY` (blue),
:tg-const:`telegram.constants.KeyboardButtonStyle.SUCCESS` (green), and
:tg-const:`telegram.constants.KeyboardButtonStyle.DANGER` (red).
Color name aliases :tg-const:`telegram.constants.KeyboardButtonStyle.BLUE`,
:tg-const:`telegram.constants.KeyboardButtonStyle.GREEN`, and
:tg-const:`telegram.constants.KeyboardButtonStyle.RED` are also available.
If omitted, then an app-specific style is used.

.. versionadded:: NEXT.VERSION
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
callback_game (:class:`telegram.CallbackGame`): Optional. Description of the game that will
be launched when the user presses the button.
Expand Down
24 changes: 12 additions & 12 deletions src/telegram/_keyboardbutton.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ class KeyboardButton(TelegramObject):

.. versionadded:: 20.1
style (:obj:`str`, optional): Style of the button. Must be one of
:tg-const:`telegram.KeyboardButtonStyle.PRIMARY` (blue),
:tg-const:`telegram.KeyboardButtonStyle.SUCCESS` (green), and
:tg-const:`telegram.KeyboardButtonStyle.DANGER` (red).
Color name aliases :tg-const:`telegram.KeyboardButtonStyle.BLUE`,
:tg-const:`telegram.KeyboardButtonStyle.GREEN`, and
:tg-const:`telegram.KeyboardButtonStyle.RED` are also available.
:tg-const:`telegram.constants.KeyboardButtonStyle.PRIMARY` (blue),
:tg-const:`telegram.constants.KeyboardButtonStyle.SUCCESS` (green), and
:tg-const:`telegram.constants.KeyboardButtonStyle.DANGER` (red).
Color name aliases :tg-const:`telegram.constants.KeyboardButtonStyle.BLUE`,
:tg-const:`telegram.constants.KeyboardButtonStyle.GREEN`, and
:tg-const:`telegram.constants.KeyboardButtonStyle.RED` are also available.
If omitted, then an app-specific style is used.

.. versionadded:: NEXT.VERSION
Expand Down Expand Up @@ -151,12 +151,12 @@ class KeyboardButton(TelegramObject):

.. versionadded:: 20.1
style (:obj:`str`): Optional. Style of the button. Must be one of
:tg-const:`telegram.KeyboardButtonStyle.PRIMARY` (blue),
:tg-const:`telegram.KeyboardButtonStyle.SUCCESS` (green), and
:tg-const:`telegram.KeyboardButtonStyle.DANGER` (red).
Color name aliases :tg-const:`telegram.KeyboardButtonStyle.BLUE`,
:tg-const:`telegram.KeyboardButtonStyle.GREEN`, and
:tg-const:`telegram.KeyboardButtonStyle.RED` are also available.
:tg-const:`telegram.constants.KeyboardButtonStyle.PRIMARY` (blue),
:tg-const:`telegram.constants.KeyboardButtonStyle.SUCCESS` (green), and
:tg-const:`telegram.constants.KeyboardButtonStyle.DANGER` (red).
Color name aliases :tg-const:`telegram.constants.KeyboardButtonStyle.BLUE`,
:tg-const:`telegram.constants.KeyboardButtonStyle.GREEN`, and
:tg-const:`telegram.constants.KeyboardButtonStyle.RED` are also available.
If omitted, then an app-specific style is used.

.. versionadded:: NEXT.VERSION
Expand Down
Loading
Loading