nickoala / telepot

Python framework for Telegram Bot API
MIT License
2.42k stars 474 forks source link

How to show different custom keyboard by sending different commands? #418

Open Retul15 opened 6 years ago

Retul15 commented 6 years ago

I used this, but it is not working: elif command == '6': keyboard = ReplyKeyboardMarkup(keyboard=[['Add', 'List'], ['Settings', 'Web']])

codingsett commented 6 years ago

Here is an example you can try and apply the method to your code if command ==1: keys=[] keys.append([InlineKeyboardButton(text='Next', callback_data='next1')]) tags = InlineKeyboardMarkup(inline_keyboard=keys)

Retul15 commented 6 years ago

@codingsett I'm getting this error File "mybot.py", line 49 keys=[] keys.append([InlineKeyboardButton(text='Next', callback_data='next1')]) tags = InlineKeyboardMarkup(inline_keyboard=keys)