From bb2bf8483a689cd80db683af93b9aa80ab3efc8c Mon Sep 17 00:00:00 2001 From: ExalFabu <53974096+ExalFabu@users.noreply.github.com> Date: Sun, 26 Jun 2022 00:07:53 +0200 Subject: [PATCH 1/7] Added myself to AUTHORS.rst as contributor --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index d5565b8c01a..ada18a4cecc 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -46,6 +46,7 @@ The following wonderful people contributed directly or indirectly to this projec - `Evan Haberecht `_ - `Evgeny Denisov `_ - `evgfilim1 `_ +- `ExalFabu `_ - `franciscod `_ - `gamgi `_ - `Gauthamram Ravichandran `_ From 6bd5ace04821fa2f6665f5b64ac86fd6986881c2 Mon Sep 17 00:00:00 2001 From: ExalFabu <53974096+ExalFabu@users.noreply.github.com> Date: Sun, 26 Jun 2022 00:19:06 +0200 Subject: [PATCH 2/7] Notes added on 3 methods Methods updated: Bot.edit_message_text Bot.edit_message_caption Bot.edit_message_media --- telegram/_bot.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/telegram/_bot.py b/telegram/_bot.py index 879c31664eb..30c624df8c3 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -3374,6 +3374,10 @@ async def edit_message_text( """ Use this method to edit text and game messages. + Note: + It is currently only possible to edit messages without + :paramref:`reply_markup` or with inline keyboards + Args: chat_id (:obj:`int` | :obj:`str`, optional): Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel @@ -3466,6 +3470,10 @@ async def edit_message_caption( """ Use this method to edit captions of messages. + Note: + It is currently only possible to edit messages without + :paramref:`reply_markup` or with inline keyboards + Args: chat_id (:obj:`int` | :obj:`str`, optional): Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel @@ -3556,6 +3564,10 @@ async def edit_message_media( message is edited, a new file can't be uploaded; use a previously uploaded file via its :attr:`~telegram.File.file_id` or specify a URL. + Note: + It is currently only possible to edit messages without + :paramref:`reply_markup` or with inline keyboards + Args: media (:class:`telegram.InputMedia`): An object for a new media content of the message. From 2528bfa62e7c0a93c7636e2dcaec4b5ba611e45b Mon Sep 17 00:00:00 2001 From: ExalFabu <53974096+ExalFabu@users.noreply.github.com> Date: Sun, 26 Jun 2022 00:42:45 +0200 Subject: [PATCH 3/7] Removed trailing whitespace --- telegram/_bot.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/telegram/_bot.py b/telegram/_bot.py index 30c624df8c3..63a1a93aeaf 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -3374,8 +3374,8 @@ async def edit_message_text( """ Use this method to edit text and game messages. - Note: - It is currently only possible to edit messages without + Note: + It is currently only possible to edit messages without :paramref:`reply_markup` or with inline keyboards Args: @@ -3470,8 +3470,8 @@ async def edit_message_caption( """ Use this method to edit captions of messages. - Note: - It is currently only possible to edit messages without + Note: + Please note, that it is currently only possible to edit messages without :paramref:`reply_markup` or with inline keyboards Args: @@ -3564,8 +3564,8 @@ async def edit_message_media( message is edited, a new file can't be uploaded; use a previously uploaded file via its :attr:`~telegram.File.file_id` or specify a URL. - Note: - It is currently only possible to edit messages without + Note: + It is currently only possible to edit messages without :paramref:`reply_markup` or with inline keyboards Args: From 4e316b1ad53424cdce281da8b2eda64f047c0f57 Mon Sep 17 00:00:00 2001 From: Alex <53974096+ExalFabu@users.noreply.github.com> Date: Sun, 26 Jun 2022 17:49:00 +0200 Subject: [PATCH 4/7] Changed :paramref: to :attr: todo: same in the other notes Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com> --- telegram/_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/_bot.py b/telegram/_bot.py index 63a1a93aeaf..ff37e649234 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -3376,7 +3376,7 @@ async def edit_message_text( Note: It is currently only possible to edit messages without - :paramref:`reply_markup` or with inline keyboards + :attr:`telegram.Message.reply_markup` or with inline keyboards. Args: chat_id (:obj:`int` | :obj:`str`, optional): Required if inline_message_id is not From 879d85ab33bfc8e8a953a7912f5c6b93b183bf9c Mon Sep 17 00:00:00 2001 From: Alex <53974096+ExalFabu@users.noreply.github.com> Date: Sun, 26 Jun 2022 17:49:45 +0200 Subject: [PATCH 5/7] unified note across methods oops.. forgot about this one Co-authored-by: Bibo-Joshi <22366557+Bibo-Joshi@users.noreply.github.com> --- telegram/_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram/_bot.py b/telegram/_bot.py index ff37e649234..d622f915266 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -3471,7 +3471,7 @@ async def edit_message_caption( Use this method to edit captions of messages. Note: - Please note, that it is currently only possible to edit messages without + It is currently only possible to edit messages without :paramref:`reply_markup` or with inline keyboards Args: From c893479a9cb2eba3d3b2d6d2c977d78a37cb3e48 Mon Sep 17 00:00:00 2001 From: ExalFabu <53974096+ExalFabu@users.noreply.github.com> Date: Sun, 26 Jun 2022 17:53:33 +0200 Subject: [PATCH 6/7] Changed :paramref: to :attr: (completed) --- telegram/_bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telegram/_bot.py b/telegram/_bot.py index d622f915266..27849d5fbc7 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -3472,7 +3472,7 @@ async def edit_message_caption( Note: It is currently only possible to edit messages without - :paramref:`reply_markup` or with inline keyboards + :attr:`telegram.Message.reply_markup` or with inline keyboards Args: chat_id (:obj:`int` | :obj:`str`, optional): Required if inline_message_id is not @@ -3566,7 +3566,7 @@ async def edit_message_media( Note: It is currently only possible to edit messages without - :paramref:`reply_markup` or with inline keyboards + :attr:`telegram.Message.reply_markup` or with inline keyboards Args: media (:class:`telegram.InputMedia`): An object for a new media content From ae4611d96142ef29c150818e8a774a706f382ae6 Mon Sep 17 00:00:00 2001 From: ExalFabu <53974096+ExalFabu@users.noreply.github.com> Date: Sun, 26 Jun 2022 17:54:33 +0200 Subject: [PATCH 7/7] Added note on last method --- telegram/_bot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/telegram/_bot.py b/telegram/_bot.py index 27849d5fbc7..2c3c268a8a1 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -3642,6 +3642,10 @@ async def edit_message_reply_markup( Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots). + Note: + It is currently only possible to edit messages without + :attr:`telegram.Message.reply_markup` or with inline keyboards + Args: chat_id (:obj:`int` | :obj:`str`, optional): Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel