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 8.1#4594

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 10 commits intomasterfrombot-api-8.1
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes fromall 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
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.0-blue?logo=telegram
.. image:: https://img.shields.io/badge/Bot%20API-8.1-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.0** are natively supported by this library.
All types and methods of the Telegram Bot API **8.1** 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
5 changes: 5 additions & 0 deletionsdocs/auxil/sphinx_hooks.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -187,6 +187,11 @@ def autodoc_process_bases(app, name, obj, option, bases: list) -> None:
bases[idx] = ":class:`enum.IntEnum`"
continue

if "FloatEnum" in base:
bases[idx] = ":class:`enum.Enum`"
bases.insert(0, ":class:`float`")
continue

# Drop generics (at least for now)
if base.endswith("]"):
base = base.split("[", maxsplit=1)[0]
Expand Down
6 changes: 6 additions & 0 deletionsdocs/source/telegram.affiliateinfo.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
AffiliateInfo
=============

.. autoclass:: telegram.AffiliateInfo
:members:
:show-inheritance:
2 changes: 1 addition & 1 deletiondocs/source/telegram.constants.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,5 +5,5 @@ telegram.constants Module
:members:
:show-inheritance:
:no-undoc-members:
:inherited-members: Enum, EnumMeta, str, int
:inherited-members: Enum, EnumMeta, str, int, float
:exclude-members: __format__, __new__, __repr__, __str__
2 changes: 2 additions & 0 deletionsdocs/source/telegram.payments-tree.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@ Your bot can accept payments from Telegram users. Please see the `introduction t
.. toctree::
:titlesonly:

telegram.affiliateinfo
telegram.invoice
telegram.labeledprice
telegram.orderinfo
Expand All@@ -25,6 +26,7 @@ Your bot can accept payments from Telegram users. Please see the `introduction t
telegram.startransactions
telegram.successfulpayment
telegram.transactionpartner
telegram.transactionpartneraffiliateprogram
telegram.transactionpartnerfragment
telegram.transactionpartnerother
telegram.transactionpartnertelegramads
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
TransactionPartnerAffiliateProgram
===================================

.. autoclass:: telegram.TransactionPartnerAffiliateProgram
:members:
:show-inheritance:
4 changes: 4 additions & 0 deletionstelegram/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,6 +20,7 @@

__author__ = "devs@python-telegram-bot.org"
__all__ = (
"AffiliateInfo",
"Animation",
"Audio",
"BackgroundFill",
Expand DownExpand Up@@ -236,6 +237,7 @@
"TelegramObject",
"TextQuote",
"TransactionPartner",
"TransactionPartnerAffiliateProgram",
"TransactionPartnerFragment",
"TransactionPartnerOther",
"TransactionPartnerTelegramAds",
Expand DownExpand Up@@ -469,13 +471,15 @@
from ._payment.shippingoption import ShippingOption
from ._payment.shippingquery import ShippingQuery
from ._payment.stars import (
AffiliateInfo,
RevenueWithdrawalState,
RevenueWithdrawalStateFailed,
RevenueWithdrawalStatePending,
RevenueWithdrawalStateSucceeded,
StarTransaction,
StarTransactions,
TransactionPartner,
TransactionPartnerAffiliateProgram,
TransactionPartnerFragment,
TransactionPartnerOther,
TransactionPartnerTelegramAds,
Expand Down
5 changes: 4 additions & 1 deletiontelegram/_bot.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8175,7 +8175,10 @@ async def create_invoice_link(
``“XTR”`` (Telegram Stars) if the parameter is used. Currently, it must always be
:tg-const:`telegram.constants.InvoiceLimit.SUBSCRIPTION_PERIOD` if specified. Any
number of subscriptions can be active for a given bot at the same time, including
multiple concurrent subscriptions from the same user.
multiple concurrent subscriptions from the same user. Subscription price must
not exceed
:tg-const:`telegram.constants.InvoiceLimit.SUBSCRIPTION_MAX_PRICE`
Telegram Stars.

.. versionadded:: 21.8
max_tip_amount (:obj:`int`, optional): The maximum accepted amount for tips in the
Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp