From 170442069713792a98f2b0fa543ff76e0d8ff840 Mon Sep 17 00:00:00 2001 From: Lorenzo Delmonte Date: Wed, 12 May 2021 08:52:28 +0200 Subject: [PATCH] Fix wrongly passed positional arguments (#603) Since CallbackQuery.edit_message_text takes 4 arguments and CallbackQuery.edit_message_caption only 3, the reply_markup ends up to be the disable_web_page_preview one. Resolve this by specifying the argument name --- pyrogram/types/bots_and_keyboards/callback_query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/types/bots_and_keyboards/callback_query.py b/pyrogram/types/bots_and_keyboards/callback_query.py index eba23b62..11e749d1 100644 --- a/pyrogram/types/bots_and_keyboards/callback_query.py +++ b/pyrogram/types/bots_and_keyboards/callback_query.py @@ -252,7 +252,7 @@ class CallbackQuery(Object, Update): Raises: RPCError: In case of a Telegram RPC error. """ - return await self.edit_message_text(caption, parse_mode, reply_markup) + return await self.edit_message_text(caption, parse_mode, reply_markup=reply_markup) async def edit_message_media( self,