From 0e5129e59fd8bd413dea8fade6680744ae277b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannes=20H=C3=B6ke?= Date: Sat, 16 Apr 2016 20:57:50 +0200 Subject: [PATCH] fix method names and parameters for new methods --- telegram/bot.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/telegram/bot.py b/telegram/bot.py index d817d7354..226ffe522 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -1006,7 +1006,7 @@ class Bot(TelegramObject): url = '%s/editMessageText' % self.base_url - data = {} + data = {'text': text} if chat_id: data['chat_id'] = chat_id @@ -1014,6 +1014,12 @@ class Bot(TelegramObject): data['message_id'] = message_id if inline_message_id: data['inline_message_id'] = inline_message_id + if reply_markup: + data['parse_mode'] = parse_mode + if reply_markup: + data['disable_web_page_preview'] = disable_web_page_preview + if reply_markup: + data['reply_markup'] = reply_markup result = request.post(url, data) @@ -1049,9 +1055,9 @@ class Bot(TelegramObject): Returns a telegram.Message object. """ - url = '%s/editMessage' % self.base_url + url = '%s/editMessageCaption' % self.base_url - data = {} + data = {'caption': caption} if chat_id: data['chat_id'] = chat_id @@ -1059,6 +1065,8 @@ class Bot(TelegramObject): data['message_id'] = message_id if inline_message_id: data['inline_message_id'] = inline_message_id + if reply_markup: + data['reply_markup'] = reply_markup result = request.post(url, data) @@ -1091,9 +1099,9 @@ class Bot(TelegramObject): Returns a telegram.Message object. """ - url = '%s/editMessage' % self.base_url + url = '%s/editMessageReplyMarkup' % self.base_url - data = {} + data = {'reply_markup': reply_markup} if chat_id: data['chat_id'] = chat_id