MessageKeyboardBuilder

class MessageKeyboardBuilder(var id: String? = null)(source)

用于更便捷构建 MessageKeyboard 的构建器,Java 中可用链式 API,Kotlin 额外提供一些 DSL API。

Since

4.2.3

Author

ForteScarlet

Constructors

Link copied to clipboard
constructor(id: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
var id: String?
Link copied to clipboard

Functions

Link copied to clipboard

通过 DSL 构建并设置 MessageKeyboard.Action

直接设置 MessageKeyboard.Action

fun action(data: String? = null, unsupportTips: String = "", type: Int = 2, permission: MessageKeyboard.ActionPermission? = null, reply: Boolean? = null, enter: Boolean? = null, anchor: Int? = null): MessageKeyboardBuilder

通过参数构建并设置 MessageKeyboard.Action

Link copied to clipboard
Link copied to clipboard

基于现有 keyboard 填充当前构建器。

Link copied to clipboard

设置按钮 ID。

Link copied to clipboard

通过 DSL 构建并设置 MessageKeyboard.RenderData

fun renderData(label: String, visitedLabel: String = label, style: Int = 0): MessageKeyboardBuilder

通过参数构建并设置 MessageKeyboard.RenderData