mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix #138.
This commit is contained in:
parent
e6105d851c
commit
0eb21aa673
@ -312,7 +312,7 @@ itembtn3 = types.KeyboardButton('d')
|
||||
markup.add(itembtn1, itembtn2, itembtn3)
|
||||
tb.send_message(chat_id, "Choose one letter:", reply_markup=markup)
|
||||
|
||||
# or add strings one row at a time:
|
||||
# or add KeyboardButton one row at a time:
|
||||
markup = types.ReplyKeyboardMarkup()
|
||||
itembtna = types.KeyboardButton('a')
|
||||
itembtnv = types.KeyboardButton('v')
|
||||
|
@ -564,7 +564,10 @@ class ReplyKeyboardMarkup(JsonSerializable):
|
||||
:param args: strings
|
||||
:return: self, to allow function chaining.
|
||||
"""
|
||||
self.keyboard.append(args)
|
||||
btn_array = []
|
||||
for button in args:
|
||||
btn_array.append(button.to_dic())
|
||||
self.keyboard.append(btn_array)
|
||||
return self
|
||||
|
||||
def to_json(self):
|
||||
@ -638,7 +641,10 @@ class InlineKeyboardMarkup(Dictionaryable, JsonSerializable):
|
||||
:param args: strings
|
||||
:return: self, to allow function chaining.
|
||||
"""
|
||||
self.keyboard.append(args)
|
||||
btn_array = []
|
||||
for button in args:
|
||||
btn_array.append(button.to_dic())
|
||||
self.keyboard.append(btn_array)
|
||||
return self
|
||||
|
||||
def to_json(self):
|
||||
@ -1296,6 +1302,7 @@ class InlineQueryResultCachedMpeg4Gif(BaseInlineQueryResultCached):
|
||||
self.input_message_content = input_message_content
|
||||
self.payload_dic['mpeg4_file_id'] = mpeg4_file_id
|
||||
|
||||
|
||||
class InlineQueryResultCachedSticker(BaseInlineQueryResultCached):
|
||||
def __init__(self, id, sticker_file_id, reply_markup=None, input_message_content=None):
|
||||
BaseInlineQueryResultCached.__init__(self)
|
||||
|
Loading…
Reference in New Issue
Block a user