Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Api 7.5 Docs #4316

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

Merged
merged 1 commit into from
Jul 1, 2024
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
2 changes: 2 additions & 0 deletions docs/substitutions/global.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

.. |editreplymarkup| replace:: It is currently only possible to edit messages without :attr:`telegram.Message.reply_markup` or with inline keyboards.

.. |bcid_edit_time| replace:: Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within *48 hours* from the time they were sent.

.. |toapikwargsbase| replace:: These arguments are also considered by :meth:`~telegram.TelegramObject.to_dict` and :meth:`~telegram.TelegramObject.to_json`, i.e. when passing objects to Telegram. Passing them to Telegram is however not guaranteed to work for all kinds of objects, e.g. this will fail for objects that can not directly be JSON serialized.

.. |toapikwargsarg| replace:: Arbitrary keyword arguments. Can be used to store data for which there are no dedicated attributes. |toapikwargsbase|
Expand Down
12 changes: 8 additions & 4 deletions telegram/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3957,7 +3957,8 @@ async def edit_message_text(
Use this method to edit text and game messages.

Note:
|editreplymarkup|.
* |editreplymarkup|.
* |bcid_edit_time|

.. seealso:: :attr:`telegram.Game.text`

Expand Down Expand Up @@ -4057,7 +4058,8 @@ async def edit_message_caption(
Use this method to edit captions of messages.

Note:
|editreplymarkup|
* |editreplymarkup|
* |bcid_edit_time|

Args:
chat_id (:obj:`int` | :obj:`str`, optional): Required if inline_message_id is not
Expand Down Expand Up @@ -4132,7 +4134,8 @@ async def edit_message_media(
:attr:`~telegram.File.file_id` or specify a URL.

Note:
|editreplymarkup|
* |editreplymarkup|
* |bcid_edit_time|

.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

Expand Down Expand Up @@ -4191,7 +4194,8 @@ async def edit_message_reply_markup(
(for inline bots).

Note:
|editreplymarkup|
* |editreplymarkup|
* |bcid_edit_time|

Args:
chat_id (:obj:`int` | :obj:`str`, optional): Required if inline_message_id is not
Expand Down
6 changes: 2 additions & 4 deletions telegram/_inline/inlinekeyboardbutton.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,9 @@ class InlineKeyboardButton(TelegramObject):
Caution:
Only ``HTTPS`` links are allowed after Bot API 6.1.
callback_data (:obj:`str` | :obj:`object`, optional): Data to be sent in a callback query
to the bot when button is pressed, UTF-8
to the bot when the button is pressed, UTF-8
:tg-const:`telegram.InlineKeyboardButton.MIN_CALLBACK_DATA`-
:tg-const:`telegram.InlineKeyboardButton.MAX_CALLBACK_DATA` bytes.
Not supported for messages sent on behalf of a Telegram Business account.
If the bot instance allows arbitrary callback data, anything can be passed.

Tip:
Expand Down Expand Up @@ -165,10 +164,9 @@ class InlineKeyboardButton(TelegramObject):
Caution:
Only ``HTTPS`` links are allowed after Bot API 6.1.
callback_data (:obj:`str` | :obj:`object`): Optional. Data to be sent in a callback query
to the bot when button is pressed, UTF-8
to the bot when the button is pressed, UTF-8
:tg-const:`telegram.InlineKeyboardButton.MIN_CALLBACK_DATA`-
:tg-const:`telegram.InlineKeyboardButton.MAX_CALLBACK_DATA` bytes.
Not supported for messages sent on behalf of a Telegram Business account.
web_app (:obj:`telegram.WebAppInfo`): Optional. Description of the `Web App
<https://core.telegram.org/bots/webapps>`_ that will be launched when the user presses
the button. The Web App will be able to send an arbitrary message on behalf of the user
Expand Down
Loading