Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
from telegram.ext import Updater, CommandHandler
from telegram import ReplyKeyboardMarkup

updater = Updater(token="")

def favor_keyboard(bot, update):
    # import pdb; pdb.set_trace()
    chat_id = update.message.chat_id
    keyboard = [
                    ['/icecream'],
                    ['/coffee']
                ]
    bot.sendMessage(chat_id, "regster", reply_markup = ReplyKeyboardMarkup(keyboard))

favor_command = CommandHandler('favor', favor_keyboard)

updater.dispatcher.add_handler(favor_command)

updater.start_polling()
updater.idle()
thats what i coded. i want to add some ReplyKeyboardMarkup buttons under ['/icecream']. i mean if the user tap on ['/icecream'] he should be deliverd somewhere he can has another choices. then the result of user's choices should be sent to an especefic user. i will be thanksfull if u write that code for me i searcher a lot and tried many sulotions but i couldnt do that


What I have tried:

i have tried inline buttons and it worked but i need some ReplyKeyboardMarkup keys
Posted
Updated 11-Jul-20 5:30am

1 solution

We are not here to write your code. See Welcome to Python Telegram Bot’s documentation! — Python Telegram Bot 12.8 documentation[^] which explains how to use this package.
 
Share this answer
 
Comments
Mohamad Moin Zade 11-Jul-20 12:08pm    
man
i want to learn from what u write
not just putting the code in th server
i didnt find a sulotion so i asked u to write for learning purpose
Richard MacCutchan 11-Jul-20 12:09pm    
Sorry, this is the Quick Answer forum: Code Project Quick Answers FAQ[^]. If you want sample code or tutorials then Google is the place to look.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900