hide inline keyboard in conversationbot example (#439)

This commit is contained in:
Blue 2016-11-08 22:14:11 +01:00 committed by Jannes Höke
parent e76ee6bb57
commit a7bfb0c3a1

View file

@ -17,7 +17,7 @@ Press Ctrl-C on the command line or send a signal to the process to stop the
bot.
"""
from telegram import (ReplyKeyboardMarkup)
from telegram import (ReplyKeyboardMarkup, ReplyKeyboardHide)
from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters, RegexHandler,
ConversationHandler)
@ -48,7 +48,8 @@ def gender(bot, update):
user = update.message.from_user
logger.info("Gender of %s: %s" % (user.first_name, update.message.text))
update.message.reply_text('I see! Please send me a photo of yourself, '
'so I know what you look like, or send /skip if you don\'t want to.')
'so I know what you look like, or send /skip if you don\'t want to.',
reply_markup=ReplyKeyboardHide())
return PHOTO
@ -104,7 +105,8 @@ def bio(bot, update):
def cancel(bot, update):
user = update.message.from_user
logger.info("User %s canceled the conversation." % user.first_name)
update.message.reply_text('Bye! I hope we can talk again some day.')
update.message.reply_text('Bye! I hope we can talk again some day.',
reply_markup=ReplyKeyboardHide())
return ConversationHandler.END