Skip to content

Add classes SuggestedPost[Parameters/Price]. #4912

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

Open
wants to merge 10 commits into
base: api-9.2-central
Choose a base branch
from
1 change: 1 addition & 0 deletions changes/unreleased/4911.kiF45Y4cfPGMq5cuLpa5da.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ features = "Full Support for Bot API 9.2"

pull_requests = [
{ uid = "4911", author_uid = "aelkheir", closes_threads = ["4910"] },
{ uid = "4912", author_uid = "aelkheir" },
]
2 changes: 2 additions & 0 deletions docs/source/telegram.at-tree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ Available Types
telegram.storyareatypesuggestedreaction
telegram.storyareatypeuniquegift
telegram.storyareatypeweather
telegram.suggestedpostparameters
telegram.suggestedpostprice
telegram.switchinlinequerychosenchat
telegram.telegramobject
telegram.textquote
Expand Down
6 changes: 6 additions & 0 deletions docs/source/telegram.suggestedpostparameters.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SuggestedPostParameters
=======================

.. autoclass:: telegram.SuggestedPostParameters
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.suggestedpostprice.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SuggestedPostPrice
==================

.. autoclass:: telegram.SuggestedPostPrice
:members:
:show-inheritance:
2 changes: 2 additions & 0 deletions docs/substitutions/global.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@

.. |allow_paid_broadcast| replace:: Pass True to allow up to :tg-const:`telegram.constants.FloodLimit.PAID_MESSAGES_PER_SECOND` messages per second, ignoring `broadcasting limits <https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once>`__ for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.

.. |suggested_post_parameters| replace:: An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.

.. |tz-naive-dtms| replace:: For timezone naive :obj:`datetime.datetime` objects, the default timezone of the bot will be used, which is UTC unless :attr:`telegram.ext.Defaults.tzinfo` is used.

.. |org-verify| replace:: `on behalf of the organization <https://telegram.org/verify#third-party-verification>`__
Expand Down
3 changes: 3 additions & 0 deletions src/telegram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@
"StoryAreaTypeUniqueGift",
"StoryAreaTypeWeather",
"SuccessfulPayment",
"SuggestedPostParameters",
"SuggestedPostPrice",
"SwitchInlineQueryChosenChat",
"TelegramObject",
"TextQuote",
Expand Down Expand Up @@ -571,6 +573,7 @@
StoryAreaTypeUniqueGift,
StoryAreaTypeWeather,
)
from ._suggestedpost import SuggestedPostParameters, SuggestedPostPrice
from ._switchinlinequerychosenchat import SwitchInlineQueryChosenChat
from ._telegramobject import TelegramObject
from ._uniquegift import (
Expand Down
Loading