From db19f314efc3a4695ac564a70aeb13402d63dabe Mon Sep 17 00:00:00 2001 From: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com> Date: Thu, 8 Feb 2024 18:47:48 +0100 Subject: [PATCH] Updated Bot API Forward Compatibility (markdown) --- Bot-API-Forward-Compatibility.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Bot-API-Forward-Compatibility.md b/Bot-API-Forward-Compatibility.md index fbf0226..25167d2 100644 --- a/Bot-API-Forward-Compatibility.md +++ b/Bot-API-Forward-Compatibility.md @@ -82,7 +82,11 @@ However, PTB provides the method `Bot.do_api_request` that allows you to make an For example, imagine that Telegram adds a new method called `get_message` allowing your bot to fetch information about a specific method. Then calling that method via `await bot.get_message(chat_id=123, message_id=456)` is possible only after PTB was updated. However, you can already do ```python -await bot.do_api_request(endpoint="get_message", api_kwargs={"message_id": 456, "chat_id": 123}, return_type=Message) +await bot.do_api_request( + endpoint="get_message", + api_kwargs={"message_id": 456, "chat_id": 123}, + return_type=Message +) ``` and PTB will call the corresponding Bot API method with the given parameters and return the result as a `Message` object.