在这个示例中,它显示这样的按钮:
Number1ToChoose Number2ToChoose Number3ToChoose Number4ToChoose Number5ToChoose
当我要看到这个时:
Number1ToChoose
Number2ToChoose
Number3ToChoose
Number4ToChoose
Number5ToChoose
到目前为止我还没有找到方法来做到这一点。
恐怕你没有真正阅读文档或源代码。代码如下所示:
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int:
"""Starts the conversation and asks the user about their gender."""
reply_keyboard = [["Boy", "Girl", "Other"]]
reply_keyboard
在文档中定义为行列表。上面是一个包含一行三个按钮的列表。如果你将其更改为:
reply_keyboard = [["Boy"],["Girl"],["Other"]]
然后您将看到三行,每行一个按钮。