0
有沒有辦法自定義鍵盤上的按鍵位置?電報機器人:定製鍵盤上的按鈕位置
例子:我們有
import telegram
def start(bot, update):
kb = [[telegram.KeyboardButton('/command1')],
[telegram.KeyboardButton('/command2')],
[telegram.KeyboardButton('/command3')]]
kb_markup = telegram.ReplyKeyboardMarkup(kb, resize_keyboard=True)
bot.send_message(chat_id=update.message.chat_id,
text="Welcome!",
reply_markup=kb_markup)
因爲我們有鍵盤3個按鍵,在其自己的行每個按鈕的結果。
我想第一行有2個按鈕,第二行有1個按鈕。可能嗎?
的感謝!有用。 –