mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-02-16 18:31:45 +01:00
Merge branch 'bot-api-2.0' into dispatcher-rework
This commit is contained in:
commit
bf5ba9a369
1 changed files with 11 additions and 2 deletions
|
@ -1019,7 +1019,10 @@ class Bot(TelegramObject):
|
|||
if reply_markup:
|
||||
data['disable_web_page_preview'] = disable_web_page_preview
|
||||
if reply_markup:
|
||||
data['reply_markup'] = reply_markup
|
||||
if isinstance(reply_markup, ReplyMarkup):
|
||||
data['reply_markup'] = reply_markup.to_json()
|
||||
else:
|
||||
data['reply_markup'] = reply_markup
|
||||
|
||||
result = request.post(url, data)
|
||||
|
||||
|
@ -1066,7 +1069,10 @@ class Bot(TelegramObject):
|
|||
if inline_message_id:
|
||||
data['inline_message_id'] = inline_message_id
|
||||
if reply_markup:
|
||||
data['reply_markup'] = reply_markup
|
||||
if isinstance(reply_markup, ReplyMarkup):
|
||||
data['reply_markup'] = reply_markup.to_json()
|
||||
else:
|
||||
data['reply_markup'] = reply_markup
|
||||
|
||||
result = request.post(url, data)
|
||||
|
||||
|
@ -1101,6 +1107,9 @@ class Bot(TelegramObject):
|
|||
|
||||
url = '%s/editMessageReplyMarkup' % self.base_url
|
||||
|
||||
if isinstance(reply_markup, ReplyMarkup):
|
||||
reply_markup = reply_markup.to_json()
|
||||
|
||||
data = {'reply_markup': reply_markup}
|
||||
|
||||
if chat_id:
|
||||
|
|
Loading…
Add table
Reference in a new issue