Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Full Support for Bot API 9.0#4756

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 19 commits intomasterfromapi_9.0
May 15, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
19 commits
Select commitHold shift + click to select a range
e3c7073
Bump Bot API Version
Bibo-JoshiApr 11, 2025
14c8ba4
Merge branch 'master' into api_9.0
Bibo-JoshiApr 11, 2025
8418cc9
Add chango fragment for PR #4756
Bibo-JoshiApr 11, 2025
2144c78
Api 9.0 business methods (#4757)
Bibo-JoshiApr 16, 2025
c1dde7b
Api 9.0 business bot rights (#4759)
Bibo-JoshiApr 17, 2025
be5d4f2
Fix attribute references for BusinessBotRights in docstrings.
aelkheirApr 18, 2025
ea609c9
can_delete_outgoing_messages → can_delete_sent_messages
Bibo-JoshiApr 20, 2025
e6fa43f
Api 9.0 gifts (#4763)
aelkheirApr 23, 2025
985bf28
Clean up incorrect reference in `test_ownedgift.py`.
aelkheirApr 23, 2025
6f17855
Merge branch 'master' into api_9.0
Bibo-JoshiApr 24, 2025
380282e
Api 9.0 profile photos (#4766)
Bibo-JoshiApr 28, 2025
6e202f3
Api 9.0 business stories (#4769)
aelkheirApr 28, 2025
2ee3a10
Api 9.0 business stars (#4773)
aelkheirMay 4, 2025
d861270
Merge branch 'master' into api_9.0
Bibo-JoshiMay 4, 2025
f1b2d1d
Elaborate deprecation info in chango fragment
Bibo-JoshiMay 4, 2025
9387e9b
Api 9.0 general (#4782)
Bibo-JoshiMay 6, 2025
c1e6b5b
Api 9.0 premium (#4781)
aelkheirMay 12, 2025
b755077
Merge branch 'master' into api_9.0
Bibo-JoshiMay 12, 2025
9dc69b5
fix test official
Bibo-JoshiMay 12, 2025
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
4 changes: 2 additions & 2 deletionsREADME.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@
:target: https://pypi.org/project/python-telegram-bot/
:alt: Supported Python versions

.. image:: https://img.shields.io/badge/Bot%20API-8.3-blue?logo=telegram
.. image:: https://img.shields.io/badge/Bot%20API-9.0-blue?logo=telegram
:target: https://core.telegram.org/bots/api-changelog
:alt: Supported Bot API version

Expand DownExpand Up@@ -81,7 +81,7 @@ After installing_ the library, be sure to check out the section on `working with
Telegram API support
~~~~~~~~~~~~~~~~~~~~

All types and methods of the Telegram Bot API **8.3** are natively supported by this library.
All types and methods of the Telegram Bot API **9.0** are natively supported by this library.
In addition, Bot API functionality not yet natively included can still be used as described `in our wiki <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Bot-API-Forward-Compatibility>`_.

Notable Features
Expand Down
51 changes: 51 additions & 0 deletionschanges/unreleased/4756.JT5nmUmGRG6qDEh5ScMn5f.toml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
features = "Full Support for Bot API 9.0"
deprecations = """This release comes with several deprecations, in line with our :ref:`stability policy <stability-policy>`.
This includes the following:

- Deprecated ``telegram.constants.StarTransactionsLimit.NANOSTAR_MIN_AMOUNT`` and ``telegram.constants.StarTransactionsLimit.NANOSTAR_MAX_AMOUNT``. These members will be replaced by ``telegram.constants.NanostarLimit.MIN_AMOUNT`` and ``telegram.constants.NanostarLimit.MAX_AMOUNT``.
- Deprecated the class ``telegram.constants.StarTransactions``. Its only member ``telegram.constants.StarTransactions.NANOSTAR_VALUE`` will be replaced by ``telegram.constants.Nanostar.VALUE``.
- Bot API 9.0 deprecated ``BusinessConnection.can_reply`` in favor of ``BusinessConnection.rights``
- Bot API 9.0 deprecated ``ChatFullInfo.can_send_gift`` in favor of ``ChatFullInfo.accepted_gift_types``.
- Bot API 9.0 introduced these new required fields to existing classes:
- ``TransactionPartnerUser.transaction_type``
- ``ChatFullInfo.accepted_gift_types``

Passing these values as positional arguments is deprecated. We encourage you to use keyword arguments instead, as the the signature will be updated in a future release.

These deprecations are backward compatible, but we strongly recommend to update your code to use the new members.
"""
[[pull_requests]]
uid = "4756"
author_uid = "Bibo-Joshi"
closes_threads = ["4754"]
[[pull_requests]]
uid = "4757"
author_uid = "Bibo-Joshi"
closes_threads = []
[[pull_requests]]
uid = "4759"
author_uid = "Bibo-Joshi"
closes_threads = []
[[pull_requests]]
uid = "4763"
author_uid = "aelkheir"
closes_threads = []
[[pull_requests]]
uid = "4766"
author_uid = "Bibo-Joshi"
[[pull_requests]]
uid = "4769"
author_uid = "aelkheir"
closes_threads = []
[[pull_requests]]
uid = "4773"
author_uid = "aelkheir"
closes_threads = []
[[pull_requests]]
uid = "4781"
author_uid = "aelkheir"
closes_threads = []
[[pull_requests]]
uid = "4782"
author_uid = "Bibo-Joshi"
closes_threads = []
56 changes: 54 additions & 2 deletionsdocs/source/inclusions/bot_methods.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -161,8 +161,6 @@
- Used for unpinning a message
* - :meth:`~telegram.Bot.unpin_all_chat_messages`
- Used for unpinning all pinned chat messages
* - :meth:`~telegram.Bot.get_business_connection`
- Used for getting information about the business account.
* - :meth:`~telegram.Bot.get_user_profile_photos`
- Used for obtaining user's profile pictures
* - :meth:`~telegram.Bot.get_chat`
Expand DownExpand Up@@ -396,6 +394,60 @@
- Used for obtaining the bot's Telegram Stars transactions
* - :meth:`~telegram.Bot.refund_star_payment`
- Used for refunding a payment in Telegram Stars
* - :meth:`~telegram.Bot.gift_premium_subscription`
- Used for gifting Telegram Premium to another user.

.. raw:: html

</details>
<br>

.. raw:: html

<details>
<summary>Business Related Methods</summary>

.. list-table::
:align: left
:widths: 1 4

* - :meth:`~telegram.Bot.get_business_connection`
- Used for getting information about the business account.
* - :meth:`~telegram.Bot.get_business_account_gifts`
- Used for getting gifts owned by the business account.
* - :meth:`~telegram.Bot.get_business_account_star_balance`
- Used for getting the amount of Stars owned by the business account.
* - :meth:`~telegram.Bot.read_business_message`
- Used for marking a message as read.
* - :meth:`~telegram.Bot.delete_story`
- Used for deleting business stories posted by the bot.
* - :meth:`~telegram.Bot.delete_business_messages`
- Used for deleting business messages.
* - :meth:`~telegram.Bot.remove_business_account_profile_photo`
- Used for removing the business accounts profile photo
* - :meth:`~telegram.Bot.set_business_account_name`
- Used for setting the business account name.
* - :meth:`~telegram.Bot.set_business_account_username`
- Used for setting the business account username.
* - :meth:`~telegram.Bot.set_business_account_bio`
- Used for setting the business account bio.
* - :meth:`~telegram.Bot.set_business_account_gift_settings`
- Used for setting the business account gift settings.
* - :meth:`~telegram.Bot.set_business_account_profile_photo`
- Used for setting the business accounts profile photo
* - :meth:`~telegram.Bot.post_story`
- Used for posting a story on behalf of business account.
* - :meth:`~telegram.Bot.edit_story`
- Used for editing business stories posted by the bot.
* - :meth:`~telegram.Bot.convert_gift_to_stars`
- Used for converting owned reqular gifts to stars.
* - :meth:`~telegram.Bot.upgrade_gift`
- Used for upgrading owned regular gifts to unique ones.
* - :meth:`~telegram.Bot.transfer_gift`
- Used for transferring owned unique gifts to another user.
* - :meth:`~telegram.Bot.transfer_business_account_stars`
- Used for transfering Stars from the business account balance to the bot's balance.


.. raw:: html

Expand Down
6 changes: 6 additions & 0 deletionsdocs/source/telegram.acceptedgifttypes.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
AcceptedGiftTypes
=================

..autoclass::telegram.AcceptedGiftTypes
:members:
:show-inheritance:
29 changes: 29 additions & 0 deletionsdocs/source/telegram.at-tree.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,7 @@ Available Types
.. toctree::
:titlesonly:

telegram.acceptedgifttypes
telegram.animation
telegram.audio
telegram.birthdate
Expand All@@ -19,6 +20,7 @@ Available Types
telegram.botdescription
telegram.botname
telegram.botshortdescription
telegram.businessbotrights
telegram.businessconnection
telegram.businessintro
telegram.businesslocation
Expand DownExpand Up@@ -75,6 +77,7 @@ Available Types
telegram.forumtopicreopened
telegram.generalforumtopichidden
telegram.generalforumtopicunhidden
telegram.giftinfo
telegram.giveaway
telegram.giveawaycompleted
telegram.giveawaycreated
Expand All@@ -92,13 +95,20 @@ Available Types
telegram.inputpaidmedia
telegram.inputpaidmediaphoto
telegram.inputpaidmediavideo
telegram.inputprofilephoto
telegram.inputprofilephotoanimated
telegram.inputprofilephotostatic
telegram.inputpolloption
telegram.inputstorycontent
telegram.inputstorycontentphoto
telegram.inputstorycontentvideo
telegram.keyboardbutton
telegram.keyboardbuttonpolltype
telegram.keyboardbuttonrequestchat
telegram.keyboardbuttonrequestusers
telegram.linkpreviewoptions
telegram.location
telegram.locationaddress
telegram.loginurl
telegram.maybeinaccessiblemessage
telegram.menubutton
Expand All@@ -116,12 +126,17 @@ Available Types
telegram.messageoriginuser
telegram.messagereactioncountupdated
telegram.messagereactionupdated
telegram.ownedgift
telegram.ownedgiftregular
telegram.ownedgifts
telegram.ownedgiftunique
telegram.paidmedia
telegram.paidmediainfo
telegram.paidmediaphoto
telegram.paidmediapreview
telegram.paidmediapurchased
telegram.paidmediavideo
telegram.paidmessagepricechanged
telegram.photosize
telegram.poll
telegram.pollanswer
Expand All@@ -138,9 +153,23 @@ Available Types
telegram.sentwebappmessage
telegram.shareduser
telegram.story
telegram.storyarea
telegram.storyareaposition
telegram.storyareatype
telegram.storyareatypelink
telegram.storyareatypelocation
telegram.storyareatypesuggestedreaction
telegram.storyareatypeuniquegift
telegram.storyareatypeweather
telegram.switchinlinequerychosenchat
telegram.telegramobject
telegram.textquote
telegram.uniquegift
telegram.uniquegiftbackdrop
telegram.uniquegiftbackdropcolors
telegram.uniquegiftinfo
telegram.uniquegiftmodel
telegram.uniquegiftsymbol
telegram.update
telegram.user
telegram.userchatboosts
Expand Down
6 changes: 6 additions & 0 deletionsdocs/source/telegram.businessbotrights.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
BusinessBotRights
=================

..autoclass::telegram.BusinessBotRights
:members:
:show-inheritance:
7 changes: 7 additions & 0 deletionsdocs/source/telegram.giftinfo.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
GiftInfo
========

.. autoclass:: telegram.GiftInfo
:members:
:show-inheritance:

6 changes: 6 additions & 0 deletionsdocs/source/telegram.inputprofilephoto.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
InputProfilePhoto
=================

.. autoclass:: telegram.InputProfilePhoto
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.inputprofilephotoanimated.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
InputProfilePhotoAnimated
=========================

.. autoclass:: telegram.InputProfilePhotoAnimated
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.inputprofilephotostatic.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
InputProfilePhotoStatic
=======================

.. autoclass:: telegram.InputProfilePhotoStatic
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.inputstorycontent.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
InputStoryContent
=================

.. autoclass:: telegram.InputStoryContent
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.inputstorycontentphoto.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
InputStoryContentPhoto
======================

.. autoclass:: telegram.InputStoryContentPhoto
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.inputstorycontentvideo.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
InputStoryContentVideo
======================

.. autoclass:: telegram.InputStoryContentVideo
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.locationaddress.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
LocationAddress
===============

.. autoclass:: telegram.LocationAddress
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.ownedgift.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
OwnedGift
=========

.. autoclass:: telegram.OwnedGift
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.ownedgiftregular.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
OwnedGiftRegular
================

.. autoclass:: telegram.OwnedGiftRegular
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.ownedgifts.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
OwnedGifts
==========

.. autoclass:: telegram.OwnedGifts
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.ownedgiftunique.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
OwnedGiftUnique
===============

.. autoclass:: telegram.OwnedGiftUnique
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.paidmeessagepricechanged.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
PaidMessagePriceChanged
=======================

.. autoclass:: telegram.PaidMessagePriceChanged
:members:
:show-inheritance:
1 change: 1 addition & 0 deletionsdocs/source/telegram.payments-tree.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,6 +22,7 @@ Your bot can accept payments from Telegram users. Please see the `introduction t
telegram.shippingaddress
telegram.shippingoption
telegram.shippingquery
telegram.staramount
telegram.startransaction
telegram.startransactions
telegram.successfulpayment
Expand Down
6 changes: 6 additions & 0 deletionsdocs/source/telegram.staramount.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
StarAmount
==========

.. autoclass:: telegram.StarAmount
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.storyarea.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
StoryArea
=========

.. autoclass:: telegram.StoryArea
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.storyareaposition.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
StoryAreaPosition
=================

.. autoclass:: telegram.StoryAreaPosition
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.storyareatype.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
StoryAreaType
=============

.. autoclass:: telegram.StoryAreaType
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.storyareatypelink.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
StoryAreaTypeLink
=================

.. autoclass:: telegram.StoryAreaTypeLink
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.storyareatypelocation.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
StoryAreaTypeLocation
=====================

.. autoclass:: telegram.StoryAreaTypeLocation
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletionsdocs/source/telegram.storyareatypesuggestedreaction.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
StoryAreaTypeSuggestedReaction
==============================

.. autoclass:: telegram.StoryAreaTypeSuggestedReaction
:members:
:show-inheritance:
Loading

[8]ページ先頭

©2009-2025 Movatter.jp