-2
How can I expect user response after executing a command? I am using Python 3.6 and the lib Telegram-bot-python.
Example:
usuario - /apel
bot - Qual o seu apelido?
usuario - dfop
bot - Uau, seu apelido é dfop
I’ve made it so far:
def apel(bot, update):
update.message.reply_text('Qual o seu apelido?')
resposta = ??
bot.send_message(chat_id = update.message.chat_id, text = "Uau, seu apelido é %s", resposta)
updater = Updater(token)
dispatcher = self.updater.dispatcher
dispatcher.add_handler(CommandHandler('/apel', apel))
updater.start_polling()
updater.idle()
It looks a lot like your last question: https://answall.com/q/335178/5878. What’s the difference?
– Woss
I thought the last one got a little confused so I re-asked the question trying to simplify as much as possible to make it easier to read. I can delete the previous post if it will give any problem.
– dfop02
You could have edited the previous question in the edit button just below the
tag's
question. But now that you’ve done this and the other has no interaction, it’s best to remove the old.– Roberto de Campos