python 的电报机器人:在嵌套对话中无法识别 map_to_parent 状态
telegram bot with python: map_to_parent state is not recognized in nested conversation
我的 child 车队没有转移到 parent 车队。似乎 map_to_parent 中的密钥未被识别?它只是在 child 会议结束后停止。我在这里做错了什么?
我也收到此警告:
UserWarning: Handler returned state methodchoiceend which is unknown to the ConversationHandler.
这是一个 mwe:https://pastebin.com/pnve9gke
我在您链接的示例中看到两个问题:
method_convo_handler
和 count_convo
都用作另一个 ConversationHandler
中的嵌套对话 和 直接通过 dispatch.add_handler
添加.难免打扰。
return METHODCHOICEEND
用于 done_method
,后者又用于
count_convo
。 count_convo
没有 map_to_parent
.
顺便说一句,如果您通过相应的参数为 ConversationHandlers
命名,您提到的警告将显示为
Handler returned state methodchoiceend which is unknown to the ConversationHandler <name>.
使调试更容易一些:)
免责声明:我目前是 python-telegram-bot
的维护者
我的 child 车队没有转移到 parent 车队。似乎 map_to_parent 中的密钥未被识别?它只是在 child 会议结束后停止。我在这里做错了什么?
我也收到此警告:
UserWarning: Handler returned state methodchoiceend which is unknown to the ConversationHandler.
这是一个 mwe:https://pastebin.com/pnve9gke
我在您链接的示例中看到两个问题:
method_convo_handler
和count_convo
都用作另一个ConversationHandler
中的嵌套对话 和 直接通过dispatch.add_handler
添加.难免打扰。return METHODCHOICEEND
用于done_method
,后者又用于count_convo
。count_convo
没有map_to_parent
.
顺便说一句,如果您通过相应的参数为 ConversationHandlers
命名,您提到的警告将显示为
Handler returned state methodchoiceend which is unknown to the ConversationHandler <name>.
使调试更容易一些:)
免责声明:我目前是 python-telegram-bot