我目前正在用python电报机器人开发一个电报机器人。我希望能够得到回复ForceReply的消息。预期的流量如下:
我怎样才能达到预期的结果?谢谢
initial_message = "Hi... Please reply to this message to proceed to the next step..."
def start (update: Update, context: CallbackContext):
chat_id = update.message.chat_id
print(update.message.from_user.username)
context.bot.send_message(chat_id=chat_id, text=initial_message, reply_markup=ForceReply())
要能够处理
ForceReply()
,必须实现ConversationHandler
。一旦用户回复ForceReply
,使用ConversationHandler
,您就可以处理他/她的回复。就是这样做的:相关问题 更多 >
编程相关推荐