gpt4 book ai didi

node.js - Viber - 发送键盘消息时隐藏用户字段输入

转载 作者:行者123 更新时间:2023-12-03 08:47:41 26 4
gpt4 key购买 nike

我正在尝试使用键盘发送短信。我发现在docs我可以通过将 InputFieldState 的值设置为隐藏来隐藏用户的输入字段,但当我发送消息时,用户输入字段仍然存在。

预期行为 enter image description here

实际行为 enter image description here

最佳答案

试试这个。定义键盘

const KEYBOARD_JSON = {
"Type": "keyboard",
"InputFieldState": "hidden",
"Buttons": [{ // This is just an example
"Columns": 6,
"Rows": 1,
"ActionType": "reply",
"ActionBody": "Get started",
"Text": "Get started",
"BgColor": "#F0923F",
"TextSize": "regular",
"TextHAlign": "center",
"TextVAlign": "middle",
"Silent": "true"
}]
}

使用带有以下可选参数的 KeyboardMessage 构造函数定义消息。

const your_message = new KeyboardMessage(KEYBOARD_JSON, null, null, null, 3); // If it didn't work with min_api_version 3, try 4

关于node.js - Viber - 发送键盘消息时隐藏用户字段输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60727396/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com