Constructors

Link copied to clipboard
constructor(permission: MessageKeyboard.ActionPermission? = null, data: String?, reply: Boolean? = null, enter: Boolean? = null, anchor: Int? = null, unsupportTips: String)

构造函数。 4.2.2 版本以前作为主构造使用,现在用作兼容性辅助构造。 为了兼容,type 属性默认为 2

Properties

Link copied to clipboard
val anchor: Int? = null

本字段仅在指令按钮下有效,设置后后会忽略 action.enter 配置。 设置为 1 时 ,点击按钮自动唤起启手Q选图器,其他值暂无效果。 (仅支持手机端版本 8983+ 的单聊场景,桌面端不支持)

Link copied to clipboard
val data: String?

操作相关的数据

Link copied to clipboard
val enter: Boolean? = null

指令按钮可用,点击按钮后直接自动发送 data,仅单聊可用,默认 false。支持版本 8983

Link copied to clipboard
Link copied to clipboard
val reply: Boolean? = null

指令按钮可用,指令是否带引用回复本消息,默认 false。支持版本 8983

Link copied to clipboard
val type: Int

设置 0 跳转按钮:http 或 小程序 客户端识别 scheme, 设置 1 回调按钮:回调后台接口, data 传给后台, 设置 2 指令按钮:自动在输入框插入 @bot data。

Link copied to clipboard
@SerialName(value = "unsupport_tips")
val unsupportTips: String

客户端不支持本 action 的时候,弹出的 toast 文案

Functions

Link copied to clipboard
fun copy(permission: MessageKeyboard.ActionPermission? = this.permission, data: String? = this.data, reply: Boolean? = this.reply, enter: Boolean? = this.enter, anchor: Int? = this.anchor, unsupportTips: String = this.unsupportTips): MessageKeyboard.Action

用于兼容截止到 4.2.2 版本的 data class copy 函数而使用的兼容性函数。