def intent_extractor(bot, update):
"""
:param bot:
:param update:
:return: Parses the intent and calls the appropriate callback
"""
intent = intent_parser.extract_intent(update.message.text)
global state
feedback, give_reply, state = gf.give_feedback(intent,state)
if give_reply:
bot.sendMessage(update.message.chat_id, text=feedback)
if state.value < States.FINALIZING.value:
process_callback[intent](bot,update)
else:
finalize_schedule(bot,update)
评论列表
文章目录