mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2026-06-19 07:35:19 +00:00
hide inline keyboard in conversationbot example (#439)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user